安装apache2.4.27笔记
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装apache2.4.27笔记相关的知识,希望对你有一定的参考价值。
编译安装遇到太多问题,记录几点遇到的坑
系统centos 7.3 http版本2.4.27
1.安装apr、apr-util
./configure --prefix=/usr/local/apr make makeinstall ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/ make make install
./configure --prefix=/usr/local/apr-util-httpd/
--with-apr=/usr/local/apr-httpd/
make
make instal
apr
/
apr-util
apr
/
apr-util
2.安装apache
./configure --prefix=/etc/httpd/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/
对apache进行make的时候报错如下:
make[2]: *** [htpasswd] Error 1make[2]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.0.63/support‘make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.0.63/support‘make: *** [all-recursive] Error 1 把 apr、aprutil的目录copy到httpd的目录下 cp -r apr-1.6.2 /opt/httpd-2.4.27/srclib/apr cp -r apr-util-1.6.0 /opt/httpd-2.4.27/srclib/apr-util ./configure --prefix=/etc/httpd/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-included-apr make make install
3.将httpd添加为系统服务
cp /etc/httpd/bin/apachectl /etc/rc.d/init.d/httpd vi /etc/rc.d/init.d/httpd # chkconfig: 345 85 15 # description: Activates/Deactivates Apache Web Server 注意:“#”也要有
添加自启动
systemctl enable httpd
以上是关于安装apache2.4.27笔记的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu 17.10 用 apt 搭建 lamp 环境安装 phpmyadminredis 及扩展mysql 扩展开启错误提示配置虚拟主机