Installing the JDK
1. Upload a local download of the compressed package, in the terminal input:yum install lrzsz wait for the installation to complete after input:rz Select File Add
2. go to the local directory to create the Java Directory folder:cd/usr/local/ Create folder Java :mkdir java
3. set permissions for the newly created folder:sudo chmod-r 777/usr/local/java
4. Copy the uploaded jdk files to the development directory:cp jdk-8u171-linux-x64.tar.gz/usr/local/ Java
5. go to Java directory:Cd/usr/local/java unzip in current directory:TAR-ZXVF Jdk-8u171-linux-x64.tar.gz a jdk1.8.0_171 folder will appear after decompression
6. set permissions for the current folder:sudo chmod-r 777 jdk1.8.0_171
7. Configure environment variables:VI /etc/profile Press i to enter edit mode at the end, add the following:
Export java_home=/usr/local/java/jdk1.8.0_171
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
(The configured directory must be consistent with your own directory)
When you are finished editing, press ESC shift+q appears: Edit wq save to exit
6. Verify that the environment is installed: java javac appears as follows:
Installing Tomcat
1. Similarly, the locally downloaded Tomcat is uploaded to the centos system via securecrt
2. Enter the/usr/local directory to create the Tomcat directory folder mkdir/usr/local /tomcat
1. Copy the uploaded file to the specified directory:CP apache-tomcat-9.0.8.tar.gz/usr/local/tomcat
2. go to the development directory to begin decompression:cd/usr/local/tomcat tar-zxvf apache-tomcat-9.0.8.tar.gz
3. after decompression there will be a folder:apache-tomcat-9.0.8
4. Open the file /etc/profile file and append the code to the end of the file:
catalina_home=/usr /local/tomcat/apache-tomcat-9.0.8
catalina_base=/usr/local/tomcat/apache-tomcat-9.0.8
Path= $PATH: $CATALINA _base/bin
Export PATH Catalina_base
Press ESC shift+q Wq save to exit
go to the Make directory CD /usr/local/tomcat/apache-tomcat-9.0.8
./bin/startup.sh start the Tomcat service
Install MySQL
1. test whether MySQL has been installed , enter command:mysql-server
the following message appears stating that MySQL has not been installed
2. you need to download it manually and then install mysql-server, which uses the wget command (yum install wget This command is important, or the MySQL package cannot be loaded .
Local download http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
3. use the RZ command to upload to centos , terminal input command:rpm -IVH mysql-community-release-el7-5.noarch.rpm
Check if installation is successful, such as installation : ls-1/etc/yum.repos.d/mysql-community*
Install the Mysql-server as soon as it is installed.
Yum Install Mysql-server
start service mysqld Start,
To create a root administrator: mysqladmin-u root Password 123456
Log in to MySQL: mysql-u root-p
If the installation is successful:
CentOS installation JDK, Tomcat, MySQL deployment