Linux configuration Deployment Tomcat7. As a high-performance Web container, Tomcat has been very popular. The Tomcat runtime requires a Java environment.
Tools/Materials
- Jdk-6u33-linux-x64.bin
- Apache-tomcat-7.0.2.tar.gz
Method/Step
Take the Redhat series 64-bit operating system as an example to download the required Toolkit Jdk-6u33-linux-x64.bin and apache-tomcat-7.0.2.tar.gz to Apache and Oracle's official website, and
Upload two packages to a Linux server.
For Jdk-6u33-linux-x64.bin authorization, run the file
#chmod +x Jdk-6u33-linux-x64.bin
#./jdk-6u33-linux-x64.bin
Move the resulting file to/usr/local/and do a soft link
Configure the local environment variable for Java and test the Java environment for a successful configuration.
#vim/etc/profile
Java_home=/usr/local/java
Jre_home=/usr/local/java/jre
Classpath= $JAVA _home/lib: $JAVA _home/jre/lib
Path= $JAVA _home/bin: $PATH
Export PATH CLASSPATH Java_home
#source/etc/profile
#java-version
Unzip the Tomcat package apache-tomcat-7.0.2.tar.gz and move the extracted files to/usr/local
Modify the Tomcat configuration file. Enter the bin directory of Tomcat
#cd/usr/local/tomcat/bin/
#vim catalina.sh
Add under 85 lines
Java_opts= "-server-xms800m-xmx800m-xx:permsize=64m-xx:maxnewsize=256m-xx:maxpermsize=128m-djava.awt.headless= True "
Configure memory size, save configuration after modification is complete
Start the Tomcat server
#cd/usr/local/tomcat/bin/
#./startup.sh
END
Precautions
- You need to be careful when configuring your Java environment, and it will be cumbersome to follow if the Java environment is problematic.
- Currently the latest version of Apache is 8.0.15, but based on compatibility, stability here is still selected 7.0.2.
Linux installation Tomcat