Apache2.4.33安装部署文档

本站所有内容来自互联网收集,仅供学习和交流,请勿用于商业用途。如有侵权、不妥之处,请第一时间联系我们删除!Q群:迪思分享

免费资源网 – https://freexyz.cn/

当前为centos6下安装部署apache2.4.33版本

APACHE依赖安装部署:

下载httpd所需要的源码依赖包 [root@localhost ~]# wget -r http://mirrors.shu.edu.cn/apache/httpd/httpd-2.4.33.tar.gz [root@localhost ~]# wget -r https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.6.3.tar.gz [root@localhost ~]# wget -r https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz [root@localhost ~]# wget -r https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz 解压下载的源代码包 [root@localhost ~]# tar xf httpd-2.4.33.tar.gz -C /usr/src [root@localhost ~]# tar xf apr-1.6.3.tar.gz -C /usr/src [root@localhost ~]# tar xf apr-util-1.6.1.tar.gz -C /usr/src [root@localhost ~]# tar xf pcre-8.42.tar.gz -C /usr/src 安装apr、apr-util、pcre [root@localhost ~]# cd /usr/src/apr-1.6.3 [root@localhost apr-1.6.3]# ./configure –prefix=/usr/local/apr &&make &&make install [root@localhost yum.repos.d]# yum -y install expat-devel //安装apr-util依赖包否则报错 [root@localhost ~]# cd /usr/src/apr-util-1.6.1 [root@localhost apr-util-1.6.1]# ./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr && make &&make install [root@localhost ~]# cd /usr/src/pcre-8.42/ [root@localhost pcre-8.42]# ./configure –prefix=/usr/local/pcre &&make &&make install

安装apache2.4.33

[root@localhost ~]# rpm -e httpd –nodeps //卸载系统自带HTTPD的RPM包 [root@localhost ~]# tar xf httpd-2.4.33.tar.gz -C /usr/src/ [root@localhost ~]# cd /usr/src/httpd-2.4.33/ [root@localhost httpd-2.4.33]# ./configure –prefix=/usr/local/apache –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util/ –with-pcre=/usr/local/pcre –enable-so –enable-rewrite –enable-charset-lite –enable-cgi &&make &&make install [root@localhost httpd-2.4.33]# ln -s /usr/local/apache/bin/* /usr/local/bin/ //优化执行路径[root@localhost ~]# cp -r /usr/src/apr-1.6.3 /usr/src/httpd-2.4.33/srclib/apr [root@localhost ~]# cp -r /usr/src/apr-util-1.6.1 /usr/src/httpd-2.4.33/srclib/apr-util [root@localhost php-7.2.6]# echo -e <?phpn phpinfo ();n?> > /usr/local/apache/htdocs/index.php [root@localhost php-7.2.6]# vim /usr/local/apache/conf/httpd.conf AddType application/x-httpd-php .php //添加一行用来支持PHP [root@localhost php-7.2.6]# service httpd restart [root@localhost httpd-2.4.33]# httpd -v Server version: Apache/2.4.33(Unix) Server built: Jun3 2018 03:07:00

启动服务校验

Apache2.4.33安装部署文档插图
免费资源网 – https://freexyz.cn/


© 版权声明
THE END
★喜欢这篇文章吗?喜欢的话,麻烦动动手指支持一下!★
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容