首页 技术 正文
技术 2022年11月18日
0 收藏 879 点赞 3,407 浏览 1329 个字

Apache安装过程

Step 1:安装包gcc或gcc-c++
# yum install gcc
#yum install gcc-c++

Step 2:安装包APR和APR-Util
apr-1.4.8.tar.gz apr-util-1.5.2.tar.gz

# tar -zxf apr-1.4.8.tar.gz
# cd apr-1.4.8

新建目录/usr/local/apr,用作安装目录:
# mkdir /usr/local/apr
# ./configure –prefix=/usr/local/apr
# make
# make install

安装apr-util
# ./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr
# make
# make install

Step 3:安装包PRCE
# cd pcre-8.33
#mkdir /usr/local/pcre
./configure –prefix=/usr/local/apache –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util
# make
# make install

Step 4:安装Apache Http Server
# tar zxvf httpd-2.4.6.tar.gz
#cd httpd-2.4.6

#./configure –prefix=/opt/data/apache2 \
–enable-so \
–enable-mods-shared=most \
–with-mpm=worker \
–with-apr=/usr/local/apr \
–with-apr-util=/usr/local/apr-util \
–with-included-apr \
–with-pcre=/usr/local/pcre \

#make
#make install

Step 5:启动Apache服务
#/opt/data/apache2 /bin/apachectl start

用浏览器访问http://localhost时提示It works!

启动报错:
# /usr/local/apache/bin/apachectl start

AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using getlnx05.gfg1.esquel.com. Set the ‘ServerName’ directive globally to suppress this message

这个时候需要编辑httpd.conf配置文件,添加SeraverName的具体IP地址。
SeraverName 192.168.1.123:80

如果从其它电脑连接访问Apache时,输入url地址:http://ip 页面没有显示正常,而上面配置也OK,那么你必须关闭防火墙,有时候甚至需要重启电脑才能OK,重启Apache服务都无效。
# chkconfig iptables off
# chkconfig iptables off
# /usr/local/apache/bin/apachectl restart

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,104
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,580
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,428
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,835
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,918