首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Linux下编译安装Apache2.4及脚本安装

一、安装基本环境工具 yum -y install gcc gcc-c++ wget 二、安装apr Apache在安装时需要一些准备环境,这里需要安装另外一个东西 APR(Apache Portable Runtime)。 wget http://archive.apache.org/dist/apr/apr-1.6.3.tar.gz tar -zxvf apr-1.6.3.tar.gz cd apr-1.6.3     ./configure --prefix=/usr/local/apr/    make && make install 三、安装APR-util wget -c 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   四、安装prce wget -c https://sourceforge.net/projects/pcre/files/pcre/8.42/pcre-8.42.tar.gz tar -zxvf pcre-8.42.tar.gz cd pcre-8.42 ./configure --prefix=/usr/local/pcre make && make install 五、安装Apache wget -c http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.29.tar.gz tar -zxvf httpd-2.4.29.tar.gz cd httpd-2.4.29 ./configure –prefix=/usr/local/apache/ –with-apr=/usr/local/apr/ –with-apr-util=/usr/local/apr-util/ –with-pcre=/usr/local/pcre/ make && make install 六、测试apache /usr/local/apache/bin/apachectl start (启动apache) /usr/local/apache/bin/apachectl stop   (停止apache) /usr/local/apache/bin/apachectl reload   (重启apache) 七、加入开机启动编写启动 1、编写启动脚本:vim httpd

01
领券