APACHE安装与配置

来源:互联网 发布:刺身 寄生虫 知乎 编辑:程序博客网 时间:2024/05/21 18:45

Apache安装

cd /data/software/

wget http://apache.fayea.com//httpd/httpd-2.4.27.tar.gz

tar -zxvf httpd-2.4.27.tar.gz

cd httpd-2.4.27

./configure --enable-so --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

make

make install


Apache配置

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

修改

Listen 端口号

DocumentRoot 根目录


Apache启动

cd /usr/local/httpd/bin

./apachectl start


错误处理:

错误:configure: error: APR not found.  Please read the documentation.

wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz

tar -zxvf apr-1.5.2.tar.gz

cd apr-1.5.2

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

make

make install

错误:configure: error: APR-util not found.  Please read the documentation.

wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz

tar -zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4

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

make

make install




原创粉丝点击