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