CENTOS7 Mini Configure Linux Server (v) Install and configure Tomcat

Source: Internet
Author: User

Configure the Java runtime Environment, without the server, and Tomcat occupies a large portion of the server, here is a simple record of the Tomcat installation steps.

Download

First, you need to download TOMCAT7 installation files, the address is as follows: http://tomcat.apache.org/download-70.cgi. Get in there.

Core:

    • tar.gz (PGP, MD5, SHA1) Click to download

The first step: Confirm that the JDK is installed, detailed steps see Linux installation on a blog. Place the downloaded package in the usr/local/directory,

Then go to the directory:

cd/usr/local

Extract:

            tar -zxvf apache-tomcat-7.0.57.tar.gz

Remove the installation package after the extract is complete:

      rm -rf apache-tomcat-7.0.57.tar.gz

Step two: To configure the Tomcat environment variables and memory settings, enter the Tomcat bin directory and open the catalina.sh file with the VI command, and add the following configuration:

      JAVA_OPTS="-Xms512m -Xmx1024m -Xss1024K -XX:PermSize=512m -XX:MaxPermSize=1024m"      export TOMCAT_HOME=/usr/local/apache-tomcat-7.0.57      export CATALINA_HOME=/usr/local/apache-tomcat-7.0.57
export JRE_HOME=/[jdk目录]/jdk1.7.0_75/jre       
export JAVA_HOME=/
[jdk目录]/jdk1.7.0_75

加在cygwin=false
adrwin=false之前

第三步:接下来修改一下tomcat端口号,进入tomcat的conf目录下,修改server.xml文件,通过vi命令打开文件后直接输入/8080检索到端口号的位置,进入编辑模式后修改端口号为80

Last input : Wq Save exit.

Next we can try to start Tomcat and switch to the Tomcat Bin directory to enter the start command:

    ./startup.sh       
看到Tomcat started 说明启动成功了

第四步:设置iptables,将tomcat的端口(80)开放允许访问,详情请见iptables配置博客。

到此为止,大功告成,就这么简单。
 



CENTOS7 Mini Configure Linux Server (v) Install and configure Tomcat

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.