Detailed Ali cloud deployment ECS server CentOS7 install jdk, tomcat, mysql-- configuration jdk, tomcat (2)

Ready to work

Servers are present jkd1.8, tomcat8, mysql-5.7

Download jkd1.8

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Here to download the jdk-8u211-linux-x64.tar.gz

 

Download tomcat8

https://tomcat.apache.org/download-80.cgi

Here are downloaded apache-tomcat-8.5.41.tar.gz

Configuration directory

First, open Xsell, enter the password into the connection

Enter into the cd usr usr directory and enter mkdir java under which to create a java directory

Create two directories under jdk and tomcat java

Next, open Xftp, respectively, to the / usr / java / jdk and / usr / java / tomcat transmission jdk-8u211-linux-x64.tar.gz with apache-tomcat-8.5.41.tar.gz

Configuration jdk

Then open Xsell, under the jdk directory

Input tar -zxvf jdk-8u211-linux-x64.tar.gz

Decompressing

Then enter cd ../ three times to exit the root directory

Then enter vim / etc / profile, editing the input i

#set java environment

export JAVA_HOME=/usr/java/jdk/jdk1.8.0_211

export JRE_HOME=/usr/java/jdk/jdk1.8.0_211/jre

export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH

Then press Esc and then shift;! Wq to save the key input

Input source / etc / profile and java -version, appear as the configuration was successful

Configuration tomcat8

In the Open Xsell, under the tomcat directory

输入tar -zxvf apache-tomcat-8.5.41.tar.gz

 

进入到上面的apache-tomcat-8.5.41的bin文件夹下:

cd /usr/java/tomcat/apache-tomcat-8.5.41/bin

写入配置

vim setclasspath.sh 

在文件的最后写入

export JAVA_HOME=/usr/java/jdk/jdk1.8.0_211
export JRE_HOME=/usr/java/jdk/jdk1.8.0_211/jre

然后按Esc键  再按shift和 ; 键 输入 wq! 进行保存
保存后验证

在cd /usr/java/tomcat/apache-tomcat-8.5.24/bin 目录下执行  ./startup.sh ,出现如下则配置成功

 

配置MySQL

 

 

Guess you like

Origin blog.csdn.net/qq_41937388/article/details/91383590