I. Upload the apache-tomcat-7.0.64.tar.gz andjdk-7u79-linux-x64.tar.gz to the directory/home/zwl/tomcat/command using the FTP tool
Because the Tomcat runtime requires a Java environment, the Java environment must be configured first.
One. Building a Java environment
1. Create a Java directory
Make Dir/usr/local/java
2. Move the JDK to the Java directory
MV JDK file /usr/local/java
3. Unzip the JDK file
Decompression jdk-7u79-linux-x64.tar.gz decompression
Tar zxvf jdk-7u79-linux-x64.tar.gz
4. Edit profile
in the unset I, Unset-f Pathmunge two lines before adding something:
java_home=/usr/java/jdk1.7.0_79
Jre_home=/usr/java/jdk1.7.0_79/jre
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Export Java_home jre_home PATH CLASSPATH
5. Verify that the Java environment is configured to complete
Java-version, Javac-version appears the following information:
Java Version "1.7.0_79"
Javac 1.7.0_79
The Java environment configuration was successful.
Two. Build Tomcat
1. Create a Tomcat directory
mkdir apache-tomcat-8091
2. Move tomcat to the Tomcat directory
MV Tomcat file /home/tomcat/
3. Unzip the apache-tomcat-7.0.64.tar.gz file
Tar zxvf apache-tomcat-7.0.64.tar.gz
4. Copy the project to Tomcat's WebApps directory and modify the configuration file in Tomcat's Conf folder
5. Start Tomcat
Go to the Bin directory of Tomcat and execute the start command
./start.sh
6. View Logs
Enter Tomcat's logs directory to view the log
Cat Catalina.out View Log, if no exception, can be accessed in the browser
Access format:/HTTP Access Destination IP: Access destination port/Access Target project name/xxxx/login.jsp
If the page appears, the deployment is complete!!!
Deploying Tomcat on Linux (including configuration of the Java environment)