Ubuntu14.0.4 install MySQL and Java 8

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.