B 安装Apache
# cd /usr/local/
# tar xvfz httpd-2.0.54.tar.gz
# cd httpd-2.0.54
# ./configure --prefix=/usr/local/apache --enable-module=so
# make
# make install
# cd /usr/local/apache/conf
# vi ./httpd.conf
将Listen 80 修改为Listen 127.0.0.1:80 (219行)
将ServerName 修改为ServerName LocalHost:80 (291行)
在DirectoryIndex中添加 index.jsp (394行)
# cd /usr/local/apache/bin/
# ./apachectl configtest
显示Syntax ok则表明安装成功
#./apachectl start
启动apache服务,浏览器中访问本机80端口,查看端口是否正常,输入127.0.0.1:80
# ./apachectl stop
关闭服务
备注:prefix定义apache的安装路径
C安装Tomcat
# cd /usr/local/
# tar xvfz jakarta-tomcat-5.5.9.tar.gz
# ln ?s /usr/local/jakarta-tomcat-5.5.9 /usr/local/tomcat
# vi /usr/local/tomcat/bin/catalina.sh
第46行加入此句
JAVA_HOME=/usr/java/jdk-1_5_0_04
启动服务后,访问本机8080端口,查看端口是否正常(输入127.0.0.1:8080)
# /usr/local/tomcat/bin/startup.sh /startup.bat
关闭服务
# /usr/local/tomcat/bin/shutdown.sh /shutdown.bat
【内容导航】
第1页:Linux下jsp环境:apache,tomcat的配置 第2页:Linux下jsp环境:apache,tomcat的配置
第3页:Linux下jsp环境:apache,tomcat的配置