Fpm 之 Apache2 rpm 包定制
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Fpm 之 Apache2 rpm 包定制相关的知识,希望对你有一定的参考价值。
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安装的指定目录
[[email protected] software]# mkdir -p /app/apache2
3、编译安装apr
[[email protected] software]# tar -zxvf apr-1.6.3.tar.gz
[[email protected] apr-1.6.3]# ./configure --prefix=/app/apache2/apr/
[[email protected] apr-1.6.3]# make
[[email protected] apr-1.6.3]# make install
4、编译安装apr-util
[[email protected] software]# tar -zxvf apr-util-1.6.1.tar.gz
[[email protected] apr-util-1.6.1]# ./configure --prefix=/app/apache2/apr-util/ --with-apr=/app/apache2/apr/
[[email protected] apr-util-1.6.1]# make install
5、解压httpd-2.4.33编译包
[[email protected] software]# tar -zxvf httpd-2.4.33.tar.gz
6、把apr-1.6.3与apr-util-1.6.1复制到httpd-2.4.33/srclib/目录下
[[email protected] software]# mv apr-1.6.3 apr
[[email protected] software]# mv apr-util-1.6.1 apr-util
[[email protected] software]# cp -r apr httpd-2.4.33/srclib/
[[email protected] software]# cp -r apr-util httpd-2.4.33/srclib/
7、编译安装apache2
[[email protected] httpd-2.4.33]# ./configure --prefix=/app/apache2/ --with-included-apr --enable-so --enable--deflate=shared --enable-expires=shared --enable-ssl --enable-rewrite=shared
[[email protected] httpd-2.4.33]# make && make install
8、修改apache2配置文件
[[email protected] 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
[[email protected] 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 包定制的主要内容,如果未能解决你的问题,请参考以下文章