源码编译安装httpd-2.4.41

文章目录

  • 源码编译安装httpd-2.4.41
    • 解压
    • 将apr、apr-util的解压目录放到 httpd-2.4.41/srclib/目录下
    • 安装依赖包
    • 编译安装
    • 开机启动

源码编译安装httpd-2.4.41

解压

tar xvf apr-1.7.0.tar.bz2
tar xvf apr-util-1.6.1.tar.bz2
tar xvf httpd-2.4.41.tar.bz2

将apr、apr-util的解压目录放到 httpd-2.4.41/srclib/目录下

cp -r apr-1.7.0 httpd-2.4.41/srclib/apr
cp -r apr-util-1.6.1 httpd-2.4.41/srclib/apr-util

安装依赖包

yum install gcc pcre-devel openssl-devel expat-devel -y

编译安装

cd httpd-2.4.41/
./configure --prefix=/app/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-included-apr --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork
make -j4 && make install

开机启动

vim /etc/rc.d/rc.local
	/app/httpd24/bin/apachectl start
chmod +x /etc/rc.d/rc.local

你可能感兴趣的:(APACHE)