码迷,mamicode.com
首页 > Web开发 > 详细

Fpm 之 Apache2 rpm 包定制

时间:2018-06-19 17:18:46      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:ref   should   util   where   open   fpm   apache2   gen   tar.gz   

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. admin@your-domain.com
#
ServerAdmin you@example.com
```

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 包定制

标签:ref   should   util   where   open   fpm   apache2   gen   tar.gz   

原文地址:http://blog.51cto.com/12965094/2130612

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!