[淋漓笔记]linux搭建Apache
1、安装apr-1.5.1.tar.gz
命令:
wget http://apache.fayea.com/apache-mirror//apr/apr-1.5.1.tar.gz
tar zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure
make
make install
2、安装apr-util-1.3.7.tar.gz
命令:
http://apache.fayea.com/apache-mirror//apr/apr-util-1.5.4.tar.gz
tar zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure
make
make install
3、安装httpd-2.2.29.tar.gz
命令:
wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.2.29.tar.gz
tar zxvf httpd-2.2.29.tar.gz
cd httpd-2.2.29
./configure –prefix=/usr/local/apache2 –enable-dav –enable-modules=so –enable-maintainer-mode –enable-rewrite –with-apr=/usr/local/apr/bin/apr-1-config –with-apr-util=/usr/local/apr/bin/apu-1-config
make
make install
4、启动Apache服务
命令:/usr/local/apache2/bin/apachectl start (启动后即可访问)
5、修改站点配置文件
路径:/usr/local/apache2/conf/httpd.conf
默认站点目录:/usr/local/apache2/htdocs/