CENTOS7 installation of httpd source package

Source: Internet
Author: User
Tags bz2

Today small make up with everybody to do an exercise, is how to install httpd source package under CENTOS7.

One: Download httpd The latest version of the source package

[Email protected] ~]# Rpm-qa |grep httpd//query whether the HTTPD package is installed on the systemhttpd-tools-2.4.6- $. El7.centos.4. X86_64HTTPD-2.4.6- $. El7.centos.4. X86_64[[email protected]~]# Rpm-qai |grep httpd//query for installed HTTPD package informationname:httpd-Toolssource rpm:httpd-2.4.6- $. El7.centos.4. Src.rpmURL:http://httpd.apache.org/The httpd-Tools package contains tools which can be used Withname:httpdsource rpm:httpd-2.4.6- $. El7.centos.4. Src.rpmURL:http://httpd.apache.org///These two steps are to find the httpd bag .

Two: Unzip the source package

[[email protected]/app]# ls  // Small series put the compression package into the/app httpd-2.4.  /app]# tar-jxf httpd-2.4. tar.bz2  // -j here to extract the compressed package suffix named. tar.bz2 [[email protected]/app]# lshttpd -2.4.  -  httpd-2.4. tar.bz2  // http-2.4.27 directory appears after decompression is complete

Three: Installation package Group Development Tools

[email protected]/app]# Yum Groupinstall Development Tools

Four: Check the Install or Reademe

[Email protected]/app]# CD httpd-2.4. -///go to the extracted directory[Email protected]/app/httpd-2.4. -]# lsabout_apache buildbin.dsp Emacs-style LAYOUT NOTICE srclibacinclude.m4 buildconf httpd.dep libhttpd.dep Nwgnuma Kefile Supportapache-apr2.dsw changes httpd.dsp libhttpd.dsp os testapache.dsw CMakeLists.txt httpd.m AK Libhttpd.mak README versioningapache_probes.d config.layout httpd.spec LICENSE readme.c MAKEAP.D configure include Makefile.inchreadme.platformsbuild Configure.inchINSTALL makefile.win roadmapbuildall.dsp docs INSTALLBIN.DSP Modules Server[[email Protected]/app/httpd-2.4. -]# less INSTALL//The following small part of the interception of content

V: Generate Makefile File

[Email protected]/app/httpd-2.4. ] #./configure--prefix=/app/apache27--sysconfdir=/etc/apache27   // Here Configure is a script file,. Configure execute it;--prefix to specify the installation path under/app,--sysconfdir to specify the configuration file directory, as described in the install

VI: Compile and install

[Email protected]/app/httpd-2.4. ] # Make && make install

Seven: Start httpd service

Seven: Start httpd service [[email protected]/app/apache27]#/app/apache27/bin/apachectl start [[email protected]/app/apache27]# systemctl Status Firewalld.service//View firewall StatusFIREWALLD.SERVICE-FIREWALLD-DynamicFirewall Daemon loaded:loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset:enabled) Active:inactive (Dead) Docs:man:firewalld (1) [[email protected]/app/apache27]# Netstat-ntl//View Network monitoring statusActive Internet connections (only servers) Proto Recv-Q send-Q Local Address Foreign address State TCP00 0.0.0.0:1110.0.0.0:*LISTEN TCP0 0 192.168.122.1: -0.0.0.0:*LISTEN TCP00 0.0.0.0: A 0.0.0.0:*LISTEN TCP00 127.0.0.1:6310.0.0.0:*LISTEN TCP00 127.0.0.1: -0.0.0.0:*LISTEN TCP600:::111:::*LISTEN TCP600::: the:::*LISTEN TCP600::: A:::*LISTEN TCP600::1:631:::*LISTEN TCP600::1: -:::*LISTEN [[email protected]/app/apache27]# Ps-aux |grep httpd//See if the httpd service existsRoot602420.00.1747842336? Ss the: $0:xx/APP/APACHE27/BIN/HTTPD-k Startdaemon602430.00.2 3658324276? Sl the: $0:xx/APP/APACHE27/BIN/HTTPD-k Startdaemon602440.00.2 4313684876? Sl the: $0:xx/APP/APACHE27/BIN/HTTPD-k Startdaemon602450.0 0.2 3658324276? Sl the: $0:xx/APP/APACHE27/BIN/HTTPD-k Startdaemon603350.00.2 3658324280? Sl the: $0:xx/APP/APACHE27/BIN/HTTPD-k Startroot603640.00.0 112648964pts/0r+ the: $ 0:xxgrep--color=Auto Httpd[[email protected]/app/apache27]# lsbin Build CGI-bin error htdocs icons include logs man manual Modules[[email protected]/app/apache27]# CD htdocs/[[Email protected]/app/apache27/htdocs]# Lsindex.html[[email protected]/app/apache27/htdocs]# Vim index.html

Eight: Set path and man paths

' export path= $PATH:/app/apache27/bin/ ' >/etc/profile.d//app/apache27]# cat  /etc/profile.d/apache27.shexport PATH=$ path:/app/apache27/bin/

[email protected]/app/apache27]# man Apachectl

At this point, Centos7 under the installation of HTTPD source code package to complete the exercise, please advise, small part of this waiting for everyone's comments oh.

CENTOS7 installation of httpd source package

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.