CENTOS7 installation configuration Apache httpd Service

Source: Internet
Author: User
Tags bz2

Official Document: Http://httpd.apache.org/docs/2.4/install.html#comments_section

1. Preparation

  Main package:

Httpd-2.4.17.tar.gz http://mirrors.cnnic.cn/apache//httpd/httpd-2.4.17.tar.gz

  Depend on:

Apr-1.5.2.tar.gz, http://apache.dataguru.cn//apr/apr-1.5.2.tar.gz

Apr-util-1.5.4.tar.gz, http://apache.dataguru.cn//apr/apr-util-1.5.4.tar.gz

Pcre-8.37.tar.gz, http://exim.mirror.fr/pcre/pcre-8.37.tar.gz

to configure Apache to integrate with Tomcat:

TOMCAT-CONNECTORS-1.2.41-SRC http://apache.fayea.com/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz

2. Upload the above package to the server (I put them under/var/public_root, ready to install the HTTP service under/OPT)

2.1 Decompression Pcre    

    # tar jxvf pcre-8.37.tar.gz
2.2 解压httpd
    
# tar jxvf httpd-2.4.16.tar.gz
2.3 将apr与apr-util解压到httpd-2.4.17/srclib目录下
 
    # tar jxvf apr-1.5.2.tar.bz2 -C httpd-2.4.17/srclib
    # tar jxvf apr-util-1.5.4.tar.bz2 -C httpd-2.4.17/srclib
2.4 将apr-1.5.2和apr-util-1.5.4分别改名为apr和apr-util
    # cd /var/public_root/httpd-2.4.17/srclib/
    # mv apr-1.5.2 apr
    # mv apr-util-1.5.4 apr-util
3. 安装依赖包
  安装位置: /opt/软件名
  apr与apr-util不需要单独安装,只需要在安装httpd的时候指定一下
  3.1
安装pcre
    
# cd /var/public_root/pcre-8.37
    # make & make install 编译并安装
    # make clean 清楚make产生的垃圾
4. 安装httpd
    
# cd /var/public_root/httpd-2.4.17
    # ./configure --prefix=/usr/local/apache -with-pcre=/usr/local/pcre-8.37/bin/pcre-config -with-included-apr
    # make & make install
    # make clean
5. 配置httpd.conf
Edit/usr/local/apache/conf/httpd.conf
    • Listen value changed to 9080
servername value changed to localhost:9080  

6. Start

# cd /opt/apache/bin/ 

  # ./apachectl -k start 

7. Enter localhost:9080 in the browser to see it works! It means success.

 
 
 
 
< EM id= "__mcedel" > < Span class= "Hljs-preprocessor" >&NBSP;    


CENTOS7 installation configuration Apache httpd Service

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.