linux系统apachetomcat虚拟主机安装配置Linux认证考试
文章作者 100test 发表时间 2009:11:28 15:43:10
来源 100Test.Com百考试题网
多年不用tomcat,应一朋友要求,搭建一个java环境的虚拟主机,经过多次测试,现在把可以正常运行的配置记录下来。
安装jdk
cd /usr/local
sh /mnt/mysql/jdk-6u14-linux-i586.bin
ln -s jdk1.6.0_14/ jdk
echo "export JAVA_HOME=/usr/local/jdk
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib" >.>. /etc/profile.d/java.sh
chmod x /etc/profile.d/java.sh
安装tomcat
wget http://apache.freelamp.com/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
tar xzf apache-tomcat-6.0.20.tar.gz -C /usr/local/
cd /usr/local/
ln -s apache-tomcat-6.0.20/ tomcat
vi ~/.bash_profile
TOMCAT_HOME=/usr/local/tomcat
export PATH TOMCAT_HOME
source ~/.bash_profile
安装jk connector
wget http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz
tar xfz tomcat-connectors-1.2.28-src.tar.gz -C /usr/local/src/
cd /usr/local/src/tomcat-connectors-1.2.28-src/
cd native/
./configure –with-apxs=/usr/local/httpd/bin/apxs