手工安装linux ubutun的apache2.4.1

下载gz包.

tar xzvf gz包名 解压

more INSTALL 查看一下安装步骤

./configure --prefix=/var/apache  指定安装目录

出错提示没有 apr,按提示下载放到srclib中.

再次configure,提示没有pcre,到提示官方下载,gz包,按提示安装完成(见pcre手工安装文章)

再次configure成功.

make生成,极慢......

再make install 安装完成

ln -s /var/apache/bin/apapchectl /etc/init.d/apache 链接到自动启动目录中

update-rc.d apache defaults 更新自动启动项

启动 apache start提示错误

 ../bin/apachectl
/var/apache/bin/httpd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory

 

 find / -name libpcre.so.0 查找文件,

 ln -s /usr/local/lib/libpcre.so.0 /var/apache/lib/libpcre.so.0 链 接过来

再次运行提示

 ../bin/apachectl
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

 

进入conf/httpd.conf配置它们

再次运行root@chrd-mail:/var/apache/lib# ../bin/apachectl
httpd (pid 14117) already running

ok安装成功

reboot重启测试自动启动情况.

访问域名,ok,自动启动成功.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值