Configuring the Tomcat Server
The red color Word is the path, the blue color word is the command
(1) Download the Tomcat compression package on the official website. Apache-tomcat-7.0.57.tar.gz
(2) Enter the Tomact directory you specified, put the compressed package into the directory, and use the command to extract the package.
command: sudo tar apache-tomcat-7.0.57.tar.gz
(3) If the Tomcat is operational, you have successfully configured the JDK environment in a Linux system environment
(4) Tomcat may not be started due to permissions issues. So give the Tomcat the highest privilege
Command: Go to the installation directory of Tomcat, Run command /user/java/tomcat$ sudo chmod 777 *
Go to the next level of the Tomcat installation directory and run the command: /user/java/tomcat/apache-tomcat-7.0.57$ sudo chmod 777 *
go to the bin directory of the Tomcat installation directory and run the command:/user/java/tomcat/apache-tomcat-7.0.57/bin$ sudo chmod 777 *
Go to the Conf directory of the Tomcat installation directory and run the command:/user/java/tomcat/apache-tomcat-7.0.57/conf$ sudo chmod 777 *
Go to the Lib directory of the Tomcat installation directory and run the command:/user/java/tomcat/apache-tomcat-7.0.57/lib$ sudo chmod 777 *
Go to the logs directory of the Tomcat installation directory and run the command:/user/java/tomcat/apache-tomcat-7.0.57/logs$ sudo chmod 777 *
(5) Start the Tomcat server:< Span style= "color: #0000ff;" >< Span style= "color: #0000ff;" >< Span style= "color: #000000;" > Enter the bin directory of the installation directory for Tomcat , Run command: /user/java/tomcat/apache-tomcat-7.0.57/bin$ ./startup.sh
Prompt for startup information:
using CATALINA_HOME: /home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57
Using catalina_tmpdir:/home/ Shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57/temp
Using jre_home: /HOME/SHANGXIAOFEI/USER/JAVA/JDK/JDK1.7.0_71
Using classpath: /Home /shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57/bin/bootstrap.jar:/home/shangxiaofei/user/java/tomcat/ Apache-tomcat-7.0.57/bin/tomcat-juli.jar
Tomcat started.
[email protected]:~/user/java/tomcat/apache-tomcat-7.0.57/bin$ CD. /logs
[email protected]:~/user/java/tomcat/apache-tomcat-7.0.57/ logs$ tail-f catalina.out
< Span style= "color: #000000;" > Prompt for successful information:
January 21, 2015 7:23:56 pm org.apache.catalina.startup.HostConfig Deploydirectory
Info: Deploying Web Application directory/home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57 /webapps/examples
January 21, 2015 7:23:57 pm org.apache.catalina.startup.HostConfig deploydirectory
Info: Deployment of Web application Directory/home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57/webapps/examples has finished In 546 Ms
January 21, 2015 7:23:57 pm org.apache.coyote.AbstractProtocol start
Info: Starting Protocolhandler ["http-bio-8 080 "]
January 21, 2015 7:23:57 pm org.apache.coyote.AbstractProtocol start
Info: Starting Protocolhandler [" ajp-bio-8009 "]
January 21, 2015 7:23:57 pm Org.apache.catalina.startup.Catalina start
Info: Server Startup in 1920x1080 Ms
span>
~/user/java/tomcat/ apache-tomcat-7.0.57/bin$ ./shutdown.sh
< Span style= "color: #0000ff;" >
< Span style= "color: #000000;" >using catalina_base: /home/shangxiaofei /user/java/tomcat/apache-tomcat-7.0.57
using catalina_home: /home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57
using CATALINA _tmpdir:/home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57/temp
Using jre_home: /home/shangxiaofei/user/java/jdk/jdk1.7.0_71
using classpath: /home/shangxiaofei/user/ java/tomcat/apache-tomcat-7.0.57/bin/bootstrap.jar:/home/shangxiaofei/user/java/tomcat/apache-tomcat-7.0.57/ Bin/tomcat-juli.jar
Configure Tomcat under the Linux system and give Tomcat the highest operating rights to start Tomcat and turn off Tomcat