Fpm 之 Apache2 rpm 包定制
阿新 • • 發佈:2018-06-19
ould 編譯 onf XA ref apach .gz PE ESS Fpm 之 Apache2 rpm 包定制
一、下載Apache2 的所需的安裝編譯包
apr包下載:(/app/software)
wget http://mirror.bit.edu.cn/apache//apr/apr-1.6.3.tar.gz
arp-util包下載:(/app/software)
http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
httpd-2.4.33包下載:(/app/software)
wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.33.tar.gz
二、開始編譯安裝apache2
1、安裝依賴包 yum -y install expat-devel openssl pcre gcc 2、創建apache2安裝的指定目錄 [root@localhost software]# mkdir -p /app/apache2 3、編譯安裝apr [root@localhost software]# tar -zxvf apr-1.6.3.tar.gz [root@localhost apr-1.6.3]# ./configure --prefix=/app/apache2/apr/ [root@localhost apr-1.6.3]# make [root@localhost apr-1.6.3]# make install 4、編譯安裝apr-util [root@localhost software]# tar -zxvf apr-util-1.6.1.tar.gz [root@localhost apr-util-1.6.1]# ./configure --prefix=/app/apache2/apr-util/ --with-apr=/app/apache2/apr/ [root@localhost apr-util-1.6.1]# make install 5、解壓httpd-2.4.33編譯包 [root@localhost software]# tar -zxvf httpd-2.4.33.tar.gz 6、把apr-1.6.3與apr-util-1.6.1復制到httpd-2.4.33/srclib/目錄下 [root@localhost software]# mv apr-1.6.3 apr [root@localhost software]# mv apr-util-1.6.1 apr-util [root@localhost software]# cp -r apr httpd-2.4.33/srclib/ [root@localhost software]# cp -r apr-util httpd-2.4.33/srclib/ 7、編譯安裝apache2 [root@localhost httpd-2.4.33]# ./configure --prefix=/app/apache2/ --with-included-apr --enable-so --enable--deflate=shared --enable-expires=shared --enable-ssl --enable-rewrite=shared [root@localhost httpd-2.4.33]# make && make install 8、修改apache2配置文件 [root@localhost apache2]# vi conf/httpd.conf ``` # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. [email protected] # ServerAdmin [email protected] ``` 9、啟動測試apache2 [root@localhost apache2]# ./bin/apachectl start
三、Fpm 定制工具包
fpm -s dir -t rpm -n apache2 -v 2.4.33-d ‘pcre,expat-devel,openssl,openssl-devel‘ -f /app/apache2/
Fpm 之 Apache2 rpm 包定制