[SLES] SUSE安装Apache httpd 2.4

SUSE 安装 Apache httpd 2.4


安装

SUSE与Ubuntu安装区别仅在于依赖包名,直接复制以下命令后全部执行即可完成安装。


安装aprapr-util


zypper in expat libexpat-devel gcc gcc-c++ wget openssl libopenssl-devel numactl libnuma-devel

 

wget http://mirror.bit.edu.cn/apache//apr/apr-1.7.0.tar.gz

wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

 

tar xzvf apr-1.7.0.tar.gz

cd apr-1.7.0

./configure --prefix=/usr/local/apr

make -j 48&& make -j 48 install

cd ..

 

tar xzvf apr-util-1.6.1.tar.gz

cd apr-util-1.6.1

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

make -j 48&& make -j 48 install

cd ..

 

安装pcre

 

wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz

tar xzvf pcre-8.44.tar.gz

cd pcre-8.44

./configure --prefix=/usr/local/pcre --with-apr-util=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

 

make -j 48 && make -j 48 install

cd ..

 

安装httpd

 

wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.41.tar.gz

tar xzvf httpd-2.4.41.tar.gz

cd httpd-2.4.41

aprapr-util的解压文件放入httpd解压后的srclib目录中

cp -r ../apr-1.7.0 srclib/apr

cp -r ../apr-util-1.6.1 srclib/apr-util

 

./configure --prefix=/usr/local/httpd --with-pcre=/usr/local/pcre --with-apr-util=/usr/local/apr-util --with-apr=/usr/local/apr --with-included-apr

 

make -j 48 && make -j 48 install


启动

配置文件路径:/usr/local/httpd/conf/httpd.conf,按需要配置后启动httpd

/usr/local/httpd/bin/apachectl start