Linux configuration Deployment Tomcat7. As a high-performance Web container, Tomcat has been very popular. The Tomcat runtime requires a Java environment.
You need to uninstall your own OEPNJDKP first
Yum-y Remove java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
Yum-y Remove java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
Yum-y Remove Tzdata-java-2013g-1.el6.noarch
1. Prepare two Packs
Apache-tomcat-7.0.73.tar.gz
Jdk-7u80-linux-x64.tar.gz
For Jdk-6u33-linux-x64.bin authorization, run the file
#chmod +x Jdk-6u33-linux-x64.bin
#./jdk-6u33-linux-x64.bin
[[email protected] src]# ls
Apache-tomcat-7.0.73.tar.gz jdk-7u80-linux-x64.tar.gz
[Email protected] src]#
2. Move the generated file to/usr/local/and do a soft link
[[email protected] local]# ls
apache-tomcat-7.0.73 bin etc games include Jave jdk1.7.0_80 Lib lib64 libexec sbin share src
[Email protected] local]#
3 . Configure the local environment variables for Java and test the Java environment for configuration success.
#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
4.
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
5.
Start the Tomcat server
#cd/usr/local/tomcat/bin/
#./startup.sh
We must install the JDK before installing Tomcat, and only if the JDK is installed, Tomcat will work properly.
6.
To install the JDK in the terminal to go to the directory where Jdk-6u1-linux-i586-rpm.bin, in order to add the execution of the permissions to enter the command #chmod +755 jdk-6u1-linux-i586-rpm.bin; Execute the command #./ Jdk-6u1-linux-i586-rpm.bin to generate the jdk-6u1-linux-i586.rpm file. Then execute the command #chmod +755 jdk-6u1-linux-i586.rpm to add the Execute permissions to jdk-6u1-linux-i586.rpm.
http://localhost:8080
centos6.5 under Tomcat