Ansible Compiling httpd Playbook Example

Source: Internet
Author: User

The following is the content of playbook. Its processing flow is:

1. First download APR,APR-UTIL,HTTPD a total of 3. tar.gz files locally.

2. Unzip the 3 files.

3. Install the Pcre and Pcre-devel dependent packages.

4. Compile and install Apr

5. Compile and install Apr-util

6. Compile and install httpd

---        -hosts:all tasks:-Name:download apr,apr-util,httpd Get_url:url="{{Item}}"dest=/root/pkg/
With_items:
-Https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.6.2.tar.gz
-Https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.0.tar.gz
-Https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.27.tar.gz
Delegate_to:localhost
Run_once:true
-unarchive:src="/root/pkg/{{item}}"dest=/root/With_items:-httpd-2.4. -.Tar. GZ-apr-1.6.2.Tar. GZ-apr-util-1.6.0.Tar. GZ tags:unarchive-Name:InstallPcre and pcre-develYum: name="{{Item}}"State=installed With_items:-Pcre-pcre-devel-Name:complie Apr shell:cd/root/apr-1.6.2&&./configure--prefix=/usr/local/apr && Make&& Make Install-Name:complie apr-util Shell:|CD/root/apr-util-1.6.0 ./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/Apr Make&& Make Install-name:complie httpd Shell:|CD/root/httpd-2.4. - ./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

After compiling, there are a series of actions, such as setting the PATH environment variable, setting the man path, modifying the configuration file, starting httpd, and so on. These are too lazy to put in.

back to Linux series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.htmlReprint Please specify Source: http://www.cnblogs.com/f-ck-need-u/p/7604386.htmlNote: If you think this article is not bad please click on the lower right corner of the recommendation, your support can inspire the author more enthusiasm for writing, thank you very much!

Ansible Compiling httpd Playbook Example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.