Unzip it to a jdk1.8.0 _ 05 folder. 3. Move the folder to the installation directory $ sudomvjdk1.8.0 _ 05 usrlocal.
Ubuntu 14.0.4 install MySQL and Java 8 install Java (JDK 8) 1, download JDK 8 jdk-8u5-linux-x64.tar.gz from the official website 2, unzip $ tar-zxvf jdk-8u5-linux-x64.tar.gz extract is a jdk1.8.0 _ 05 folder 3, move the folder to the installation directory $ sudo mv jdk1.8.0 _ 05/usr /local/
Install MySQL and Java 8 on Ubuntu 14.0.4
Install Java (JDK 8)
1. Download JDK and download JDK 8 from the official website.
Jdk-8u5-linux-x64.tar.gz
2. Decompress
$ Tar-zxvf jdk-8u5-linux-x64.tar.gz
Decompress the file to a jdk1.8.0 _ 05 folder.
3. Move the folder to the installation directory.
$ Sudo mv jdk1.8.0 _ 05/usr/local/
4. Configure environment variables and change the/etc/profile file.
Sudo gedit/etc/profile
Add the following lines at the end of the file:
Export JAVA_HOME =/usr/local/jdk1.8.0 _ 05
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH
Export CLASSPATH = $ CLASSPATH:.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
5. Change the default configuration options and execute the following commands in sequence:
Sudo update-alternatives -- install/usr/bin/java/usr/local/jdk1.8.0 _ 05/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/local/jdk1.8.0 _ 05/bin/javac 300
Sudo update-alternatives -- install/usr/bin/jar/usr/local/jdk1.8.0 _ 05/bin/jar 300
Sudo update-alternatives -- install/usr/bin/javah/usr/local/jdk1.8.0 _ 05/bin/javah 300
Sudo update-alternatives -- install/usr/bin/javap/usr/local/jdk1.8.0 _ 05/bin/javap 300
Install MySQL
1. install the database: sudo apt-get install mysql-server
Set a password during installation.
2. install the client: sudo apt-get install mysql-client
3. log on to MySQL: mysql-u root-p
4. configuration file:/etc/mysql/my. cnf
A. Set Remote Access: Assign 127.0.0.1 in bind-address = 127.0.0.1 to the local IP address, so that the database supports remote network access. After the configuration is complete, restart the mysql service: service mysql restart
B. Enable, disable, and restart the database:/etc/init. d/mysql [start | stop | restart | reload | force-reload | status]
5. exit the database: exit
6. uninstall MySQL:
A. Delete mysql
1 sudo apt-get autoremove -- purge mysql-server-5.0
2 sudo apt-get remove mysql-server
3 sudo apt-get autoremove mysql-server
4 sudo apt-get remove mysql-common