一、查看版本
httpd -d
二、安装过程
1、参考过程
设置目录命令
./configure --prefix=/usr/local/web/apache
2、如果需要安装arp、arp-util可参考
不用安装pcre
3、
启动httpd
service httpd start
4、验证安装是否成功:浏览器输入localhost,默认端口为80
安装异常
1、configure: error: no acceptable C compiler found in $PAT
解决:yum install gcc
2、Apache: 提示configure: error: APR not found
解决:安装apr、apr-util
http://davis.zhang2004.blog.163.com/blog/static/2276015220128131455729/
3、安装apr-util执行
./configure
报错,改为以下语句
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
三、设置(修改端口)
1、apache默认目录:/etc/httpd/conf
2、默认端口:改为81
如果是linux自己带的apache的话就使用命令
service httpd start 启动
service httpd stop 关闭
service httpd restart 重新启动
service httpd start 启动
service httpd stop 关闭
service httpd restart 重新启动
本文详细介绍了Apache服务器的安装步骤及常见问题解决方法,并提供了如何更改默认端口等配置技巧。
862

被折叠的 条评论
为什么被折叠?



