CentOS system installation and configuration nginx+tomcat server environment

1. Install tomcat: (1), install jdk: [root@localhost java]# mkdir -p /usr/java [root@localhost java]# tar zxvf jdk-7u3-linux-x64.tar.gz -C /usr/java/ [root@localhost java]# vi /etc/profile JAVA_HOME=”/usr/java/jdk1.7.0_03″ JRE_HOME=”/usr/java/jdk1.7.0_03/jre”# Without this configuration, tomcat will report an error when it is closed. CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH export JAVA_HOME export JRE_HOME export CLASSPATH export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC [root@localhost java]# source /etc/profile [root@localhost java]# java -version java version “1.7.0_03” Java(TM) SE Runtime Environment (build 1.7.0_03-b04) Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode) 2. Install tomcat: Tomcat download: # tar zxvf apache-tomcat-7.0.26.tar.gz -C /usr/src/ # cd /usr/src/ # cp -rf apache-tomcat-7.0.26 /usr/local/tomcat # cp -rf apache-tomcat-7.0.26 /usr/local/tomcat1 Install the first TOMCAT in /usr/local/tomcat # cd /usr/local/tomcat # vi /etc/profile Add $TOMCAT_HOME/common/lib/servlet.jar after CLASSPATH Add after PATH: $CATALINA_HOME/lib export TOMCAT_HOME=/usr/local/tomcat export CATALINA_HOME=/usr/local/tomcat export CATALINA_BASE=/usr/local/tomcat export PATH=$PATH:$CATALINA_HOME/lib export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib/servlet.jar Install the second TOMCAT in /usr/local/tomcat1 Setting environment variables #vi /etc/profile Add $TOMCAT_2_HOME/common/lib/servlet.jar after CLASSPATH Add after PATH: $CATALINA_2_HOME/lib export TOMCAT_1_HOME=/usr/local/tomcat1 export CATALINA_1_HOME=/usr/local/tomcat1 export CATALINA_1_BASE=/usr/local/tomcat1 export PATH=$PATH:$CATALINA_1_HOME/lib export CLASSPATH=$CLASSPATH:$CATALINA_1_HOME/common/lib/servlet.jar Save and exit :wq Enabling environment variables to take effect #source /etc/profile Modify the TOMCAT configuration file vi /usr/local/tomcat1/conf/server.xml (if the two tomcats are not on the same machine, you don’t need to modify the port) Put the following…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索