CentOS6 install Tomcat 6 and centos6tomcat6

Source: Internet
Author: User

CentOS6 install Tomcat 6 and centos6tomcat6

First, we need to download a tomcat installation package.

Http://ftp.riken.jp/net/apache/

Wget http://ftp.riken.jp/net/apache/tomcat/tomcat-6/v6.0.41/src/apache-tomcat-6.0.41.tar.gz

After downloading the package, decompress it to a directory. My files are stored in/usr/apache-tomcat-6.0.41.

Tar-zxvf apache-tomcat-6.0.41.tar.gz

Check whether tomcat has been started,

Netstat-apn | grep java

Tomcat seems to exist in Java in Linux, and I do not understand it very well.

Next we can go to the/conf directory to modify the corresponding configuration

First, modify server. xml.

Change the port to 8080

Next we are going to modify the configuration of the tomcat-user.xml, here we need to note that tomcat is disabled by default to close the Administrator account, but we can add to him, hey, simply add the following statement in it,

<Role rolename = "manager"/>

<Role rolename = "admin"/>

<User username = "root" password = "root" roles = "admin, manager"/>

Rolename is the role of the user.

Username is the user name.

Password is your password.

Just save and exit After configuring these settings.

Now let's start tomcat.

The startup tomcat file is startup. sh in the/bin directory.

Start directly./startup. sh and the following content will appear:

[Root @ yixian bin] #./startup. sh

Using CATALINA_BASE:/usr/apache-tomcat-6.0.41

Using CATALINA_HOME:/usr/apache-tomcat-6.0.41

Using CATALINA_TMPDIR:/usr/apache-tomcat-6.0.41/temp

Using JRE_HOME:/usr

Using CLASSPATH:/usr/apache-tomcat-6.0.41/bin/bootstrap. jar

This means the startup is successful.

Now let's look at it in the browser.

Localhost: 8080 or 127.0.0.1: 8080. You will be prompted to enter the user name and password, and enter the user name and password you set. Is it easy?

Then you can view the port.

[Root @ yixian bin] # netstat-apn | grep java

Tcp 0 0: 8080: * LISTEN 3027/java

Tcp 0 0: ffff: 127.0.0.1: 8005: * LISTEN 3027/java

Tcp 0 0: 8009: * LISTEN 3027/java

Unix 2 [] stream connected 50863 3027/java

We can see that tomcat on port 8080 has been started.

Stop tomcat or in the/bin directory

[Root @ yixian bin] #./shutdown. sh

Using CATALINA_BASE:/usr/apache-tomcat-6.0.41

Using CATALINA_HOME:/usr/apache-tomcat-6.0.41

Using CATALINA_TMPDIR:/usr/apache-tomcat-6.0.41/temp

Using JRE_HOME:/usr

Using CLASSPATH:/usr/apache-tomcat-6.0.41/bin/bootstrap. jar

Tomcat has stopped


Ladies and gentlemen: Q: What is the difference between the Centos63 with and without interfaces? Does the installation of the character interface affect Tomcat 6?

Haha .. Solution:
 
Centos65 I have installed Tomcat 6. How can I check if Tomcat 6 is started?

Simple: Access: localhost: 8080 (if you use this port ).

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.