安装环境说明:
a.操作系统版本:Linux as4 2.6.9-42.ELSmp
b.软件包说明: apache:httpd-2.2.4.tar.gz
tomcat :apache-tomcat-5.5.23.tar.gz
jdk:jdk-1_5_0_09-linux-i586.rpm
安装步骤说明:
JDK1.5.0_09安装及配置
a. rpm -ivh jdk-1_5_0_09-linux-i586.rpm #安装目录为 /usr/java/jdk1.5.0_09
b.配置java环境变量 vi /etc/profile 添加如下行
export JAVA_HOME=/usr/java/jdk1.5.0_09
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
c.安装测试 #java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
# 安装jdk ok
Tomcat5.5.23安装及配置
a. tar -zxvf apache-tomcat-5.5.23.tar.gz #解压tomcat 文件包
b. mv apache-tomcat-5.5.23 /usr/local/tomcat
c.配置tomcat 环境变量 vi /etc/profile 添加如下行
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$CATALINA_HOME/bin
export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib
d. 使配置文件生效 #source /ect/profile
e.startup.sh #启动tomcat
f.访问tomcat服务器 #### 测试ok
Apache2.2.24 安装及配置
a.tar -zxvf httpd-2.2.4.tar.gz #解压apache文件包
b./httpd-2.2.24/srclib/apr/configure --prefix=/usr/local/apache/apr
c.make&make install
d./httpd-2.2.24/srclib/apr-util/configure --prefix=/usr/local/apache/apr-util --with-apr=/usr/locol/apache/apr
e.make&make install
f./httpd-2.2.24/configuer --prefix=/usr/local/apache\
>--enable-so\
>--enable-rewrite=share\
>--enable-proxy=share\
>--enable-proxy-ajp=share\
>--with-apr=/usr/local/apache/apr\
>--with-apr-util=/usr/local/apache/apr-util
g.make&make install
h.更改apache配置文件 vi /usr/local/apache/conf/httpd.conf 修改如下行
ServerAdmin 为 ServerAdmin
添加行: ServerName 192.168.10.247
DocumentRoot "/usr/local/apache//htdocs"
为 DocumentRoot "/usr/local/tomcat/webapps/ROOT"
为
DirectoryIndex index.html
为
DirectoryIndex index.jsp index.html
去掉 #Include conf/extra/httpd-vhosts.conf 的#号注释
i.更改 httpd-vhosts.conf vi /usr/local/apache/conf/extra/httpd-vhosts.conf
DocumentRoot /www/docs/dummy-host.example.com
为 DocumentRoot /usr/local/tomcat/webapps/ROOT
ServerAdmin
为 ServerAdmin
ServerName dummy-host.example.com
为 ServerName
添加以下两行
ProxyPass / ajp://127.0.0.1:8009/
ProxyPassReverse / ajp://127.0.0.1:8009/
ErrorLog logs/dummy-host2.example.com-error_log
CustomLog logs/dummy-host2.example.com-access_log common
两行改为:
ErrorLog logs/cms-error_log
CustomLog logs/cms-access_log common
j.启动tomcat apache并测试页面
startup.sh
/usr/local/apache/bin/apachectl start
访问服务器:
#页面为tomcat index.jsp 页
#页面为tomcat index.jsp 页
。。。。。。。。。。。。。。。。。。。安装ok
阅读(3661) | 评论(0) | 转发(0) |