How to configure the necessary server environment on a linux system

1 Check whether the linux host has yum, if not, install yum and download it from the corresponding website. Here we use vsftp and ftp to upload and download related files. Use apache's server version httpd to publish your website.

2 After yum is installed, you can check whether the machine has vsftp, ftp, httpd, and other software related to building a server. If not, there are the following operations: yum list installed vsftp. If it is not installed, use yum install vsftpd. Then check yum list installed ftp, the operation is as above, and the same is true for httpd operation.


3 yum install mysql 
3.1 First, yum list mysql* 3 to check whether there is a mysql file on the machine. If not, proceed to the next step
3.2 yum install mysql #install mysq client
3.3 yum install mysql-server yum install mysql-devel #Install msyql server
3.3 service mysqld start #Start mysql
3.4 mysqladmin -u root password 123456 (set by yourself) #Create root administrator and login password

 3.5 mysql -u root -p #Administrator root login (enter password below)
4 Install jdk (there are many ways here, I uploaded a jdk-8u172-linux-x64.tar.gz with ftp)
4.1 tar -zxvf  jdk-8u172-linux-x64.tar.gz 

4.2 mv jdk-8u172-linux-x64   /usr/local/jdk


4.3 vim /etc/profile # Edit system configuration Write the following

export JAVA_HOME=/usr/java/jdk
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH

Then wq save and exit

4.4 source /etc/profile #Reload system files


5 Install tomcat 

5.1 Compress and upload apache-tomcat-8.5.28.tar.gz to the Linux server using the previously configured ftp 

5.2 tar -zxvf apache-tomcat-8.5.28.tar.gz #decompress

5.3 mv apache-tomcat-8.5.28 /usr/local/tomcat8 #Move the file to the /usr/local/ directory and rename it to Tomcat8

5.4 It is better to change the port but backup the basic configuration file server.xml before changing the port 

5.5 cat /usr/local/conf/server.xml>tomatserver.xml #Backup server.xml file

5.5 vim /usr/loacl/conf/server.xml Modify the following content

<Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8444" />

I have changed port 8080 to port 8081 to prevent other applications in the system from occupying port 8080

Finally enter the bin directory 


./ startup.sh #Start the server The following is the information about the successful startup of tomat

Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_161
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.

6 Enter the ip of your service on the browser: 8081 to access the welcome page of tomcat appears, indicating that the configuration is successful

7 Pack your project into xxx.war, upload it to the server with ftp, then move mv to /usr/local/tomcat8/webapps. This file can automatically parse your project and then assign your sql file to mysql in the database

8 Then enter ip:8081/project name in the browser to access your own project









Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326750644&siteId=291194637
Recommended