@Fancy-Bai
2015-08-17T09:17:11.000000Z
字数 1999
阅读 2355
Apache,Tomcat
新建一个目录用于存放安装包
# cd /usr/local
# mkdir software
# cp /usr/local/software/apr-1.5.2.tar.gz /usr/local
# cd /usr/local
# tar -zxvf apr-1.5.2.tar.gz
# cd apr-1.5.2
# ./configure --prefix=/usr/local/apr
# make && make install
# cp /usr/local/software/apr-util-1.5.4.tar.gz /usr/local
# cd /usr/local
# tar -zxvf apr-util-1.5.4.tar.gz
# cd apr-util-1.5.4
# ./configure --prefix=/usr/local/apr-util
# make && make install
# cp /usr/local/software/pcre-8.36.tar.gz /usr/local
# cd /usr/local
# tar -zxvf pcre-8.36.tar.gz
# cd pcre-8.36.tar.gz
# ./configure --prefix=/usr/local/pcre
# make && make install
# cp /usr/local/software/httpd-2.4.12.tar.gz /usr/local
# cd /usr/local
# tar -zxvf httpd-2.4.12.tar.gz
# cd httpd-2.4.12.tar.gz
# ./configure --prefix=/usr/local/apache --enable-so -enable-proxy -enable-proxy_http=shared --enable-module=so --enable-mods-shared=all --enable-proxy-ajp=shared --enable-proxy-balancer -with-mpm=worker --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
# make && make install
# cp /usr/local/software/tomcat-connectors-1.2.40-src.tar.gz /usr/local
# cd /usr/local
# tar -zxvf tomcat-connectors-1.2.40-src.tar.gz
# cd tomcat-connectors-1.2.40-src
# chmod 755 buildconf.sh
# ./buildconf.sh
# ./configure --with-apxs=/usr/local/apache/bin/apxs
# make && make install
# cp ./apache-2.0/mod_jk.so /usr/local/apache/modules/
修改apache的配置文件:
# vi /usr/local/apache/conf/httpd.conf
ServerName
,修改:
ServerName 162.16.1.229:8000 # 对应Linux服务器的IP
Listen
,修改为:
Listen 8000
index.html
后面添加index.jsp
<IfModule dir_module>
<DirectoryIndex index.html index.jsp
</IfModule>
#Include conf/extra/httpd-mpm.conf
#Include conf/extra/httpd-default.conf
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
启动Apache:# /url/local/apache/bin/apachectl start
打开浏览器,输入:http://162.16.1.229:8000 (根据个人机器IP不同),如果页面出现It's Workds!
说明Apache
安装成功。