当前位置:   article > 正文

在CentOS6安装apache源码包_centos6镜像安装apache

centos6镜像安装apache

一、安装准备

1.安装C语言编辑器:gcc

2.在http://mirror.bit.edu.cn/apache/httpd上下载安装包

3.安装WinSCP

  将下载在windows上的httpd安装拷贝到Linux /root下

 


二、安装

1.解压httpd安装包:在/root下输入  tar -zxvf httpd-2.2.34.tar.gz。

2.进入解压目录:cd httpd-2.2.34。

3.查看安装帮助:vi INSTALL。(步骤在INSTALL文件中带$的语句)

4.指定安装路径: ./configure --prefix=/usr/local/apache。

  我安装时出现错误:configure error:Cannot use an external APR with the bundled APR-util。

  此时需要安装apr和apr-util。

5.安装apr:

cd srclib/apr

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

make && make install

6.安装apt-util:

cd srclib/apr-util

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make && make install

7.安装apache:

./configure --prefix=/usr/local/apache  --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

make && make instal


三、启动

prefix/bin/apachectl start:/usr/local/apache/bin/apachectl start。

报错httpd:Could not reliably determine the server's fully qualified domain name,using localhost.localdomain for ServerName.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/936523
推荐阅读
相关标签
  

闽ICP备14008679号