在CentOS6安装apache源码包

本文详细介绍如何在Linux环境下安装Apache Web服务器,包括安装前的准备、具体安装步骤及启动过程中遇到的问题解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、安装准备

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值