Linux install Tomcat server

2010-05-02  来源:本站原创  分类:Java  人气:344 

In order to learn java, need a server, it was decided to use popular tomcat. According to on-line presentation on the installation of tomcat, the installation itself, and now has succeeded, and now recorded the installation process, but also for everybody to learn information.
First, from the official site to download tomcat package.
http://tomcat.apache.org/
Click to download a version of the left, I chose tomcat6.x, you can select your own situation to install, click the hyperlink, select the Binary Distributions under the tar.gz (pgp, md5) zip file, download Second, after downloading to a local, to extract

# Tar zxvf apach-tomcat-6.0.16.tar.gz 【if the command does not help, use the following command】
Broken down into: # gunzip apach-tomcat-6.0.16.tar.gz

# Tar apach-tomcat-6.0.16.tar

# Mv apach-tomcat-6.0.16 / usr / local
【Here in the / usr / local can be as apache-tomcat-6.0.16 get hold of a shortcut, the command:

# Ln-s apache-tomcat-6.0.16 Tomcat6】
Third, the environment configuration for tomcat (if need to install the jdk) 【if you can not configure the direct implementation of the】
# Vi / etc / profile

export JAVA_HOME = "/ usr/local/jdk1.6.0_04"
export TOMCAT_HOME = "/ usr/local/apach-tomcat-6.0.16"
Save Exit
# Source / etc / profile / / to the current configuration take effect immediately

Fourth, start the tomcat server
$ / Usr/local/apach-tomcat-6.0.16/bin/startup.sh

【Under implementation or in the bin. / Startup.sh】

My computer will appear the following:
Using CATALINA_BASE: / usr/local/apache-tomcat-6.0.16
Using CATALINA_HOME: / usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: / usr/local/apache-tomcat-6.0.16/temp
Using JRE_HOME: / usr/local/jdk1.6.0_20

5, using the "ps-ef | grep tomcat" tomcat has started to show

[Root @ bogon tomcat] # ps-ef | grep tomcat
root 7545 1 0 21:58 pts / 2 00:00:03 / usr/java/jdk1.6.0_20/bin/java-Djava.util.logging.config.file = / usr/local/apache-tomcat-6.0. 26/conf/logging.properties-Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager-Djava.endorsed.dirs = / usr/local/apache-tomcat-6.0.26/endorsed-classpath / usr / local / apache-tomcat-6.0.26/bin/bootstrap.jar-Dcatalina.base = / usr/local/apache-tomcat-6.0.26-Dcatalina.home = / usr/local/apache-tomcat-6.0.26-Djava . io.tmpdir = / usr/local/apache-tomcat-6.0.26/temp org.apache.catalina.startup.Bootstrap start
root 7908 5422 2 22:46 pts / 2 00:00:00 grep tomcat

6, test access

Method 1) in the browser, enter http://localhost:8080/ you will see the log of tomcat
This concludes the installation of tomcat.

Method 2) Use "wget http://localhost:8080 "to test the whether the Internet.
If you can not then turn off the firewall "service iptables stop", then ". / Shutdown.sh" end of the Tomcat service can also use the "kill PID" kill the Tomcat process.

7, add the following to the Tomcat from the start.

Method 1) modify / etc / rc.local file (this is the shortcut to the real file is / etc / rc.d / rc.local), then finally add the following content
JAVA_HOME = / usr/java/jdk1.6.0_16
export JAVA_HOME
/ Tomcat6/bin/startup.sh

eg:

[Root @ tpwb ~] # vi / etc / rc.d / rc.local

#! / Bin / sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.

touch / var / lock / subsys / local

export JAVA_HOME = / usr/java/jdk1.6.0_16
/ Usr/local/apache-tomcat-6.0.26/bin/startup.sh
# This is my directory so the system can automatically restart after the start Tomcat.

Method b) is not clear how this method, not collated

chmod + x tomcat
chkconfig - add tomcat
chkconfig tomcat on
Then restart linux, you can self-starting tomcat.

This article comes from CSDN blog, reproduced, please indicate the source: http://blog.csdn.net/striveman/archive/2008/04/21/2313374.aspx

相关文章
  • Linux install Tomcat server 2010-05-02

    In order to learn java, need a server, it was decided to use popular tomcat. According to on-line presentation on the installation of tomcat, the installation itself, and now has succeeded, and now recorded the installation process, but also for ever

  • Linux, apache, tomcat server configuration 2010-07-21

    Jsp development environment under Linux, apache, tomcat server configuration process: (Unless specified: all reference to this article on the Internet, through personal practice and concluded that if the configuration has encountered a problem please

  • linux install tomcat 2010-03-25

    Prior to jdk already installed OK 1. To spread linux tomcat server 2.gunzip tomcat-6.0.20.tar.gz 3.tar-zxvf tomcat-6.0.20.tar 4. Get all the Tomcat files. And then copy it to your location to install, such as / usr/local/tomcat-6.0.20 / 5. In the / e

  • Linux install Apache server Daquan 2010-08-13

    Linux install Apache (1) Install Apache Linux 1. First went to www.apache.com download apache, here I was under the httpd-2.2.3.tar.gz 2. Copy the zip file to the installation directory where I put him on the / usr / local / under 3. Unzip the file t

  • linux install tomcat (3) 2010-05-26

    Need to install before you install tomcat j2sdk, which is JDK.

  • Svn in linux install stand-alone server configuration 2010-07-21

    Original Address: http://blog.sina.com.cn/s/blog_5dc960cd0100e8di.html subversion (hereinafter referred to as svn) version of the rise in recent years, management tools, is the successor to cvs. svn server has two kinds of operation modes: stand-alon

  • Elaboration on the Course Linux install tomcat 2010-09-21

    Premise must be downloaded from the official website to the linux version of jdk and tomcat, specifically how to go under all Internet search 1. First of all, Linux, root is / root, if we are to apache-tomcat-6.0.29.tar.gz and jdk-6u21-linux-i586-rpm

  • linux install mysql server and client in the role of 2011-03-04

    Mysql Server package is the server suite provides users with core mysql service client to connect mysql service package is a client tool to facilitate the server administrators and developers on a variety of management. In the windows, the two compon

  • linux install vmware server and build rhel5.4 + oracle10g 2010-04-21

    The document records document the experiment, for the time being is not recorded as the final document. ======================================

  • linux install svn Share 2010-03-30

    Svn in linux install stand-alone server configuration SVN Technology Network www.svn8.com 2008-03-07 22:44:39 Source: Author: Comments: 0 Views: 91 subversion (hereinafter referred to as svn) version of the rise in recent years, management tools, is

  • tomcat server clusters 2010-09-20

    Cluster Background 1.1 Definition of terms Services software is b / s or c / s s part of the structure, b or c for the provision of services of software systems. Services that provide computing services hardware hardware, such as pc machine, pc serve

  • linux install jdk and tomcat 2010-02-23

    1, jdk jdk installed installed as: jdk-6u17-linux-x64-rpm.bin (linux under the 64-bit) 1. To upload files to linux 2. In the current directory input sh jdk-6u17-linux-x64-rpm.bin 3. See the installation program asks if you respect the license agreeme

  • linux install jdk tomcat 2010-07-20

    1, jdk jdk installed installed as: jdk-6u17-linux-x64-rpm.bin (linux under the 64-bit) 1. To upload files to linux 2. In the current directory input sh jdk-6u17-linux-x64-rpm.bin 3. See the installation program asks if you respect the license agreeme

  • linux install java and tomcat 2011-06-28

    Quote http://www.java.com/zh_CN/download/help/linux_install.xml http://www.linuxidc.com/Linux/2011-06/37357.htm http://appdemo.iteye.com/blog/305670 (the fly) Better way is to use the official website of the bin file to install The following instruct

  • Linux install jdk.tomcat.mysql.Jdk 2011-09-11

    1, install JDK: Bin file directly executed in the implementation of the money you need to modify file access permissions chmod + x jdk-6u7-linux-i586.bin In the jdk directory: ./jdk-6u7-linux-i586.bin profile configuration: (profile file for all user

  • linux install jdk, tomcat, myeclipse 2010-10-03

    1, first of all to the official website to download JDK1.6 and Tomcat6 JDK Download: http://download.java.net/jdk6/ Tomcat6 Download: http://itsoul.javaeye.com/blog/776660 (Annex) 2, install JDK1.6 File in the download directory, which is jdk-6u23-ea

  • general linux install jdk + tomcat + eclipse + myeclipse 2011-08-10

    1.Linux under the JDK installation as download the JDK binary executable file, not cover it here, we go directly to the official website to download it. (1) I downloaded the JDK installation file name: jdk-1_5_0_14-linux-i586-rpm.bin, I save it in /

  • Linux install configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 Detailed 2010-10-20

    Linux install configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 details Java code This to Redhat AS5, the kernel is Linux 2.6.18-8.el5 as an example, Redhat / Fedora basically the same series, the other version of Linux or both can refer to. S

  • Centos 5.3 yum install tomcat 2010-10-27

    Today, installed with yum intall tomcat5 tomcat and jiava, then where to install the tomcat in the end? How to start tomcat? How did your site layout under Linux? With the above three questions we started to explore. First, we enter the / usr / bin d

  • linux install jdk6.tomcat6 2010-11-05

    1, to the sun download jdk rpm package jdk-6u11-linux-i586-rpm.bin; 2, in / usr under a java directory, copy the jdk-6u11-linux-i586-rpm.bin to the java directory; 3, to the jdk-6u11-linux-i586-rpm.bin with execute permissions, Command: chmod a + x j