Install the tomcat server in linux

Source: Internet
Author: User
Install the tomcat server-linux Enterprise Application-Linux server application in Linux. For more information, see. 1. First, we need to confirm that jdk is installed on the machine. If jdk is not installed or the version is not suitable for the downloaded tomcat, we can download it from the official website: http://java.sun.com/. choose this package to install jdk-6u1-linux-i586-
The installation method is: Switch the terminal directory to the directory where the jdk-6u1-linux-i586-rpm.bin is located, and then enter./jdk-6u1-linux-i586-rpm.bin on it. After installation, the jdk directory is/usr/java/jdk1.6.0 _ 01.
2. Set Environment Variables
Use the vi editor to edit the profile, enter vi/etc/profile on the terminal, and add export JRE_HOME =/usr/java/jdk1.6.0 _ 01
Use ESC and switch to the command line and enter: wq to exit vi
Log out and then log on to make the environment variable take effect.
3. Go to http://tomcat.apache.org/to download atat.6.0.10, and choose download in core tar.gz format.
Decompress the package to any directory. Here we will use the following command to put tomcat under/usr/local.
Change the directory to the directory where apache-tomcat-6.0.10.tar.gz is located, and then enter the following commands in sequence.
Tar xzvf apache-tomcat-6.0.10.tar.gz
Cp apache-tomcat-6.0.10/usr/local/
Switch to the apache-tomcat-6.0.10 directory.
Cd/usr/apache-tomcat-6.0.10
Cd bin
Start the tomcat server and enter
./Startup. sh
Screen Display after execution
Using CATALINA_BASE:/usr/local/apache-tomcat-6.0.10
Using CATALINA_HOME:/usr/local/apache-tomcat-6.0.10
Using CATALINA_TMPDIR:/usr/local/apache-tomcat-6.0.10/temp
Using JRE_HOME:/usr/java/jdk1.6.0 _ 01
Open a browser and enter http: // localhost: 8080
How is it? The server is starting to work.
Finally, we need to set the environment variable JRE_HOME instead of JAVA_HOME, because the linux operating system usually has the default JRE_HOME, and the version is too low, if the environment variable is not set, execute startup. THE sh script is fine, but the tomcat server will not start, and the error cause will be recorded in the tomcat log, saying that the jre version is too low, we must replace the system's own JAR_HOME
Okay, everything is done.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.