Vim/etc/profile
The bottom
#jdk
java_home=/usr/local/jdk1.8;
PATH = $PATH: $JAVA _home/bin;
Export Java_home PATH
: Wq
Source/etc/profile let environment variables take effect
Install MySQL:
Rpm-qa | grep mysql* See if MySQL is installed
Yum install MySQL installation mysql client
Installing the MySQL server
Yum Install Mysql-server
Yum Install Mysql-devel
Start MySQL:
Service mysqld Start
To see if it starts: Ps-aux | grep mysql*
To create a root administrator:
Mysqladmin-u Root Password fei417524333
Login: Mysql-u root-p fei417524333
show databases;
Use MySQL;
Show tables;
Select Host,user,password from user;
Remote connection:
1:inset into User (Host,user,password) values ('% ', ' root ', password (' root '));
Open firewall
Vim/etc/sysconfig/iptables
Yyp 22 Copy 22, then change to 3306:wq
Restart Firewall: serivce iptables restart
Restart MySQL service mysqld restart
Authorized Super Admin: Grant all privileges on * * to ' root ' @ '% ';
Set the database character set:
VIM/ETC/MY.CNF Join (do not add to the last)
Default-character-set=utf8
Default-storage-engine=innodb
Configure MySQL boot from boot
Vim/etc/rc.d/rc.local
Linux installation Jdk,mysql