Linux apache tomcat
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux apache tomcat相关的知识,希望对你有一定的参考价值。
[[email protected] ~]# mv jdk-7u79-linux-x64.tar.gz /usr/local/
[[email protected] ~]# cd /usr/local/
[[email protected] local]# tar jxvf jdk-7u79-linux-x64.tar.gz
[[email protected] local]# cd jdk1.7.0_79/
[[email protected] jdk1.7.0_79]# pwd
/usr/local/jdk1.7.0_79
[[email protected] jdk1.7.0_79]# vim /etc/profile
JAVA_HOME=/usr/local/jdk1.7.0_79
JAVA_BIN=/usr/local/jdk1.7.0_79/bin
PATH=$PATH:$JAVA_BIN
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
[[email protected] jdk1.7.0_79]# source /etc/profile
[[email protected] jdk1.7.0_79]# java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
[[email protected] ~]# mv apache-tomcat-7.0.79.tar.gz /usr/local/
[[email protected] local]# tar zxvf apache-tomcat-7.0.79.tar.gz
[[email protected] local]# cd apache-tomcat-7.0.79
[[email protected] apache-tomcat-7.0.79]# cd bin/
[[email protected] bin]# vim catalina.sh
CATALINA_HOME=/usr/local/apache-tomcat-7.0.79
[[email protected] bin]# ./catalina.sh start
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.79
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.79
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.79/temp
Using JRE_HOME: /usr/local/jdk1.7.0_79
Using CLASSPATH: /usr/local/apache-tomcat-7.0.79/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.79/bin/tomcat-juli.jar
Tomcat started.
[[email protected] apache-tomcat-7.0.79]# cd logs/
[[email protected] logs]# ls
catalina.2017-07-08.log host-manager.2017-07-08.log localhost_access_log.2017-07-08.txt
catalina.out localhost.2017-07-08.log manager.2017-07-08.log
[[email protected] logs]# tail -f catalina.out
Jul 08, 2017 1:09:24 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.79/webapps/docs
Jul 08, 2017 1:09:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/local/apache-tomcat-7.0.79/webapps/docs has finished in 185 ms
Jul 08, 2017 1:09:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 08, 2017 1:09:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 08, 2017 1:09:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5448 ms
[[email protected] ~]# tar zxvf apr-1.6.2.tar.gz
[[email protected] ~]# cd apr-1.6.2
[[email protected] apr-1.6.2]# mkdir /usr/local/apr
[[email protected] apr-1.6.2]# ./configure --prefix=/usr/local/apr/
[[email protected] apr-1.6.2]# make
[[email protected] apr-1.6.2]# make install
[[email protected] ~]# tar zxvf apr-util-1.6.0.tar.gz
[[email protected] ~]# cd apr-util-1.6.0
[[email protected] apr-util-1.6.0]# mkdir /usr/local/apr-util
[[email protected] apr-util-1.6.0]# ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/bin/apr-1-config
[[email protected] apr-util-1.6.0]# make
[[email protected] apr-util-1.6.0]# make install
[[email protected] ~]# unzip pcre-8.41.zip
[[email protected] ~]# cd pcre-8.41
[[email protected] pcre-8.41]# mkdir /usr/local/pcre
[[email protected] pcre-8.41]# ./configure --prefix=/usr/local/pcre/ --with-apr=/usr/local/apr/bin/apr-1-config
[[email protected] pcre-8.41]# make
[[email protected] pcre-8.41]#make install
[[email protected] ~]# tar httpd-2.4.26.tar.gz
[[email protected] ~]# cd httpd-2.4.26
[[email protected] httpd-2.4.26]#./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre/ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
[[email protected] httpd-2.4.26]# make
[[email protected] httpd-2.4.26]# make install
[[email protected] httpd-2.4.26]# vim /usr/local/apache/conf/httpd.conf
ServerName 192.168.183.129:80
[[email protected] logs]# /usr/local/apache/bin/apachectl start
以上是关于Linux apache tomcat的主要内容,如果未能解决你的问题,请参考以下文章