1. JDK dependency required when launching Tomcat
If not installed, please go to the JDK installation under the link Centos/linux
2. Download the Tomcat Compression pack from the official website
Wget-c http://apache.fayea.com/tomcat/tomcat-7/v7.0.79/bin/apache-tomcat-7.0.79.tar.gz
3. Unzip the Tomcat compression pack
TAR-ZXVF apache-tomcat-7.0.79.tar.gz
To see if the decompression was successful
4. Configure Catalina_home
Behind the
Export catalina_home=/root/dev/apache-tomcat-7.0.79
The Tomcat path after you unzip
vim/etc/profile# last line Insert export catalina_home=/root/dev/apache-tomcat-7.0.79
Then save press ESC and then: WQ
Subsequent execution let the file take effect
Source/etc/profile
5. Configure Tomcat character encoding to UTF-8, solve Chinese garbled problem
Modify the Server.xml file under the Conf folder in the Tomcat installation directory
Add uriencoding= "UTF-8"
Vim $CATALINA _home/conf/server.xml
6. Start Tomcat
Start as startup.sh
Close for stop.sh
CD $CATALINA _home/bin./startup.sh./shutdown.sh
Startup success
Shut down
Appendix:
Configure aliases to quickly start and close Tomcat
Vim/etc/profile
On the last side, add
Alias tomcat_start= $CATALINA _home/bin/startup.shalias tomcat_stop= $CATALINA _home/bin/shutdown.sh
Save after input
Source/etc/profile
command to start: Tomcat_start
Closed command: Tomcat_stop
Installing Tomcat under the Centos/linux