首页 > Web开发 > 详细

08.编译安装httpd

时间:2020-03-23 17:13:39      阅读:58      评论:0      收藏:0      [点我收藏+]

(备注:首先要在本地和远端发现

以下是playbook的内容。它的处理流程是:

1.先在本地下载apr,apr-util,httpd共3个.tar.gz文件。

2.解压这3个文件。

3.安装pcre和pcre-devel依赖包。

4.编译安装apr。

5.编译安装apr-util。

6.编译安装httpd。

---
- hosts: test-openstack2
tasks:
- name: download apr,apr-util,httpd
get_url: url={{item}} dest=/root/pkg
with_items:
- http://mirrors.ustc.edu.cn/apache/apr/apr-1.6.5.tar.gz
- http://mirrors.ustc.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
- http://mirrors.ustc.edu.cn/apache/httpd/httpd-2.4.39.tar.gz
delegate_to: localhost
run_once: True
 
- unarchive: src=/root/pkg/{{item}} dest=/root/
with_items:
- apr-1.6.5.tar.gz
- apr-util-1.6.1.tar.gz
- httpd-2.4.39.tar.gz
tags: unarchive
 
- name: install pcre and pcre-devel
yum: name="{{item}}" state=installed
with_items:
- pcre
- pcre-devel
 
- name: complie apr
shell: |
cd /root/apr-1.6.5
./configure --prefix=/usr/local/apr
make && make install
 
- name: complie apr-util
shell: |
cd /root/apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
- name: complie httpd
shell: |
cd /root/httpd-2.4.39
./configure --prefix=/usr/local/apache --sysconfdir=/etc/apache --enable-mpms-shared=all --with-z --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-mpm=event
make && make install

 

08.编译安装httpd

原文:https://www.cnblogs.com/hackerlin/p/12553199.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!