linux下apache(httpd)安装部署
1、源码安装apache(httpd)需要解决依赖关系,需要安装apr和apr-util
2、下载
apache(httpd)下载地址:http://httpd.apache.org/download.cgi
apr和apr-util下载地址:http://apr.apache.org/download.cgi
3、我们将下载的3个安装包放置在/home/soft/下,解压,如图:
4、安装
1)、安装apr
cd /home/soft/apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install
2)、安装apr-util
cd /home/soft/apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make intall
3)、安装apache(httpd)
cd /home/soft/httpd-2.4.45
./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-rewirte --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mods-shared=most --enable-mpms-shared=all --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
make
make install
自此安装基本完成
5、启动
/usr/local/apache/bin/apachectl start
浏览器上访问:http://ip/index.html,如下,则安装成功