Linux environment configuration and linux environment
I. JDK Installation
Upload jdk-8u60-linux-x64.gz to linux
2. Unzip the JDK command tar-xzf jdk-8u60-linux-x64.gz
3. Configure the environment variable vi/etc/profile in linux
JAVA_HOME =/usr/local/java/jdk1.8.0 _ 60
JRE_HOME =/usr/local/java/jdk1.8.0 _ 60/jre
PATH = $ PATH: $ JAVA_HOME/bin: $ JRE_HOME/bin
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JRE_HOME/lib
Export JAVA_HOME JRE_HOME PATH CLASSPATH
Save and exit
Ii. Install Mysql
0、upload mysql-5.6.26-1.linux_glibc2.5.x86_64.rpm-bundle.tar to linux Through the xftptool
Decompress [root @ localhost ~] # Tar-xvf MySQL-5.6.26-1.linux_glibc2.5.x86_64.rpm-bundle.tar
1. Delete the existing mysql database in the system first.
Rpm-qa | grep mysql # view existing mysql-related databases in the system
Rpm-e mysql-libs-5.1.66-2.el6_3.i686 -- nodeps # delete old library
Rpm-ivh MySQL-server-5.1.73-1.glibc23.i386.rpm # Install mysql Server
Rpm-ivh MySQK-client5.1.73-1.glibc23.i386.rpm # Install mysql client
2. After installation, a hidden file under root will be displayed. mysql_secret will have a root random password.
Query hidden files
[Root @ localhost ~] # Cat./. mysql_secret
# The random password set for the root user at Tue May 24 19:33:13 2016 (local time): eGNEvAgTNn4vdLJw
3. Start the mysql Service
[Root @ localhost ~] # Service mysql start
Starting MySQL... SUCCESS!
4. log on to mysql
[Root @ localhost ~] # Mysql-uroot-peGNEvAgTNn4vdLJw
Modify the mysql logon Password
Mysql> set password = password ("root ");
Mysql> exit
Log on to mysql again
[Root @ localhost ~] # Mysql-uroot-proot
Authorize Remote Access
Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'root' with grant option;
To change the password of a 64-bit MySql instance after installation:
/Root/. mysql_secret # random password of the root user in mysql generated after installation Service mysql start # start the mysql service Mysql-uroot-p randomp # log on with a random password > Set password = password ("root "); > Flush privileges; > Exit; |
Enable remote access
Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'mypassword' with grant option; Mysql> flush privileges; |