Apache httpd-2.4.46 安装过程 

1.下载httpd-2.4.46 把httpd-2.4.10.tar.gz放到/root

2.进入root  tar -zxvf httpd-2.4.10.tar.gz //解压apache的压缩包 

3.cd httpd-2.4.10 //定位到httpd-2.4.10 文件夹下 

4../configure --help | more)//查看安装apache配置参数

5../configure --prefix=/usr/local/apache --enable-so

出现:configure: error: APR not found . Please read the documentation

解决apr not found问题:

1)tar -zxvf apr-1.7.0.tar.gz 

2)cd apr-1.7.0  

3)./configure --prefix=/usr/local/apr 

4) make && make install 

解决APR-util not found问题 

1)tar -zxvf  apr-util-1.6.1.tar.gz 

2)cd /apr-util-1.6.1 

3)./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config 

4) make && make install 

6 make //编译apache 

7 make install //安装apache 

8cd /usr/local/apache/conf //进入apache的conf目录  

9cp -a httpd.conf httpd.conf- //备份apache配置文件 

vi /usr/local/apache/conf/httpd.conf  

10添加服务器主机

1).vi /usr/local/apache/conf/httpd.conf  

2)搜索#ServerName,并添加ServerName localhost:80 

3) 保存退出编辑 

11chkconfig --list httpd //查看httpd服务是否已存在 

12chkconfig httpd off //关闭系统自带了httpd的服务,如果存在httpd服务 

13service httpd status //查看自带httpd服务状态 

14/usr/local/apache/bin/apachectl -k start //linux启动apache命令 

15 netstat -an | grep :80 //查看linux80端口是否开 

16 ps -aux | grep httpd //linux下查看apache进程 

17 cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd //拷贝httpd启动脚本(取服务名为httpd)  

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值