Environment: centOS6.8, jdk1.8,tomcat-8.5.15,mysql-5.7.18 1. Installing the JDK
Note:rpm and software-related commands are equivalent to software Assistant management software under windows
Steps:
1) View current Linux whether the system has been installed Java
grep Java
Enter the above instructions to check whether the installation is not unnecessary, and then uninstall it with the following command
RPM-E--nodeps software to uninstall
2) upload jdk-8u131-linux-x64.tar.gz to Linux
3) Unzip the JDK to the directory you want to unzip
tar -zxvf jdk-8u131-linux-x64. tar. Gz-c/usr/local/
4) Configure the JDK environment variable, open the/etc/profile configuration file with the following command,
Vim/etc/profile
Copy the configuration below (thejava_home path is configured according to its actual decompression path )
#set java environmentjava_home=/usr/local/jdk1. 8 . 0_131classpath=.: $JAVA _home/Lib.tools.jarPATH= $JAVA _home/bin: $PATHexport java_home CLASSPATH PATH
5) Reload the/etc/profile configuration file
Source/etc/profile
5. Test whether Java commands are available
Authentication method is the same as Windows
2. Tomcat installation
The tomcat configuration is simple, just unzip the folder you want to unzip.
Steps:
1) upload Tomcat to Linux
2) Unzip the Tomcat to the desired decompression
TAR-ZXVF apache-tomcat-8.5. tar.gz-c/usr/local/
3) Open Linux port 8080 for external access
8080 -j ACCEPT
Permanently save open ports
/etc/rc.d/init.d/iptables Save
4) Start off Tomcat
Enter Tomcat under the bin to start:
./startup.sh
Enter Tomcat under the bin to close:
./shutdown.sh
This installs well and you can access tomcat through the browser to test for successful startup
3.mysql Installation
1) See if the current CentOS system has MySQL
Rpm-qa | grep MySQL
Enter the above instructions to check whether the installation is not unnecessary, and then uninstall it with the following command
RPM-E--nodeps software to uninstall
2) upload Mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar to Linux
3) Extract MySQL to the directory you want to unzip
TAR-XVF mysql-5.7. 1. el6.x86_64.rpm-bundle.tar-c/usr/local/mysql-5.7. /
These files are available after decompression:
4) Install MySQL dependency (lack of dependencies to install, not missing can skip this step)
Yum Install-y libaio*
Yum Install-y libnuma*
5) Install MySQL (be sure to install in this order, or there will be a lack of dependency problem)
RPM-IVH mysql-community-common-5.7. 1. el6.x86_64.rpm
RPM-IVH mysql-community-libs-5.7. 1. el6.x86_64.rpm
RPM-IVH mysql-community-client-5.7. 1. el6.x86_64.rpm
RPM-IVH mysql-community-server-5.7. 1. el6.x86_64.rpm
6) Start MySQL
Service mysqld Start
7) Add MySQL to the system service and set the boot up
Add to System services:
Chkconfig--add mysqld
Auto Start:
Chkconfig mysqld on
8) Next log in to MySQL
Get the default password for MySQL's initial build first
' Temporary password ' /var/log/mysqld.log
The following results appear, with the initial password in the red box
Then log in to MySQL
Mysql-uroot-p2gd6oq:kxkuf
Change password immediately after login or the following error will occur
Enter the following instructions to change the password
' Root '@'localhost'123456';
If you change your password, the following error indicates that the password is too simple
If the password is not simple, there are the following errors, can be modified as follows
Set Global validate_password_policy=0;
Set Global validate_password_length=1;
And then change the password again, okay?
Telnet on MySQL
MySQL is not supported by default MySQL for security purposes, if you want to telnet, you need to set the remote login MySQL permission
' Root ' @'%'root';
Explanation: Grant all on * * to username @ "%" identified by "password"; This user name and password is a telnet user name and password
Refresh Permissions Table
Flush privileges;
Open Linux port 3306 for external access
3306 -j ACCEPT
Permanently saving modifications to the firewall
/etc/rc.d/init.d/iptables Save
Install Jdk,tomcat and MySQL under Linux