Cnetos Building Apache Web server

Source: Internet
Author: User
Tags fully qualified domain name automake

1, Apahce Introduction

    • Apache HTTP Server project is a cross-platform open source HTTP Server software that can be run on platforms such as Windows and Linux/nuix
    • The goal of the Apache HTTP Server project is to provide a secure, efficient, and extensible HTTP Service
    • Website address: http://httpd.apache.org
    • Official: Click to enter

2. Apache Installation

  Apache is divided into two methods of installation

    • Binary installation (simple and fast, with RPM or yum source available)
    • Source installation (this kind of installation flexibility is relatively large, can meet the various needs of enterprises)

(1) Binary installation

    • Yum source installation (online)
[[email protected] ~]# yum-y install httpd//installation httpd service loaded plugins:fastestmirrorloading mirror Speeds from Cached Hostfile * base:mirrors.sina.cn * C6-media: * extras:mirrors.skyshe.cn * UPDATES:MIRRORS.CQU.EDU.CNC 6-media | 4.0 kB 00:00 ... extras | 3.4 KB 00:00MARIADB | 2.9 KB 00:00updates | 3.4 KB 00:00updates/primary_db | 1.3 MB 00:26setting up Install processresolving dependencies--> Running Transaction Check---> Package httpd.x86_ 0:2.2.15-47.el6.centos would be installed--> processing dependency:httpd-tools = 2.2.15-47.el6.centos for package:h ttpd-2.2.15-47.el6.centos.x86_64--> Running Transaction Check---> Package httpd-tools.x86_64 0:2.2.15-47. El6.centos'll be installed--> FiniShed Dependency resolutiondependencies resolved================================================================== ============== Package Arch Version Repository size=============================        ===================================================INSTALLING:HTTPD x86_64 2.2.15-47.el6.centos        Updates 830 kinstalling for dependencies:httpd-tools x86_64 2.2.15-47.el6.centos updates Ktransaction Summary================================================================================install 2 Package (s) total download size:907 kinstalled size:3.1 mdownloading Packages: (All): httpd-2.2.15-47.el6.centos.x86_64. RPM |  830 KB 00:05 (2/2): httpd-tools-2.2.15-47.el6.centos.x86_64.rpm |                                           00:01 KB--------------------------------------------------------------------------------Total 113 KB/S | 907 KB 00:08running Rpm_check_dEbugrunning Transaction testtransaction Test succeededrunning Transactionwarning:rpmdb altered outside of Yum. Installing:httpd-tools-2.2.15-47.el6.centos.x86_64 installing:httpd-2.2.15-47.el6.centos.x86 _64 2/2 verifying:httpd-tools-2.2.15-47.el6.centos.x86_64 VERIFYI ng:httpd-2.2.15-47.el6.centos.x86_64 2/2installed:httpd.x86_64 0:2.2.15-47.el6.centosdepen Dency installed:httpd-tools.x86_64 0:2.2.15-47.el6.centoscomplete!
[email protected] ~]# Yum List | grep httpd                    //query is installed successfully @ means that httpd.x86_64 2.2.15-47.el6.centos is already installed          @updateshttpd-tools.x86_64                       2.2.15-47.el6.centos          @updates
[[Email protected] ~]# service httpd start             //Start Services starting Httpd:httpd:apr_sockaddr_info_get () failed for Vforboxhtt Pd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName                                                           [  ok
   
    • Test
    • When the client accesses the Web server using a browser, it sees the following, indicating that the server can be accessed normally.

=================================================================================================== Split                                             Cut                                            Line ===================================================================================================

(2) source code installation

    • Because the installation method is the source installation, the Apache Http Server is installed here Before you need to install a lot of dependent packages
    • RPM package is installed directly with Yum, Some still need to go to the official download source package to manually compile the installation of
[[email protected] ~]# yum-y install gcc autoconf automake make pcre pcre-devel OpenSSL openssl-devel//install Apache depending on Lai software loaded plugins:fastestmirrorloading mirror speeds from cached Hostfile * base:mirrors.sina.cn * c6-media: * Extras: mirrors.neusoft.edu.cn * updates:mirrors.cqu.edu.cnSetting up Install processpackage gcc-4.4.7-16.el6.x86_64 already Installed and latest Versionpackage 1:make-3.81-20.el6.x86_64 already installed and latest versionresolving dependencies--> Running Transaction Check---> Package autoconf.noarch 0:2.63-5.1.el6 would be installed---> Package Automake.noarch 0:1.11.1-4.el6 'll be installed---> Package openssl.x86_64 0:1.0.1e-15.el6 'll be updated--- > Package openssl.x86_64 0:1.0.1e-42.el6 'll be a update---> Package openssl-devel.x86_64 0:1.0.1e-42.el6 'll be installed--> processing dependency:krb5-devel for package:openssl-devel-1.0.1e-42.el6.x86_64---> Package Pcre.x86_64 0:7.8-6.el6 'll be updated---> Package PCRE.x86_64 0:7.8-7.el6 'll be a update---> Package pcre-devel.x86_64 0:7.8-7.el6 'll be installed--> Running Transa Ction Check---> Package krb5-devel.x86_64 0:1.10.3-42.el6 'll be installed--> processing dependency:krb5-libs = 1. 10.3-42.el6 for package:krb5-devel-1.10.3-42.el6.x86_64--> processing dependency:libselinux-devel for package: Krb5-devel-1.10.3-42.el6.x86_64--> processing dependency:libcom_err-devel for package: Krb5-devel-1.10.3-42.el6.x86_64--> processing dependency:keyutils-libs-devel for package: krb5-devel-1.10.3-42.el6.x86_64--> Running Transaction Check---> Package keyutils-libs-devel.x86_64 0:1.4-5. El6 'll be installed--> processing dependency:keyutils-libs = 1.4-5.el6 for package:keyutils-libs-devel-1.4-5.el6.x 86_64---> Package krb5-libs.x86_64 0:1.10.3-10.el6_4.6 'll be a updated---> Package krb5-libs.x86_64 0:1.10.3-42. El6 'll be a update---> Package libcom_err-devel.x86_64 0:1.41.12-22.el6 'll be installed-->Processing Dependency:libcom_err = 1.41.12-22.el6 for package:libcom_err-devel-1.41.12-22.el6.x86_64---> Package Libselinux-devel.x86_64 0:2.0.94-5.8.el6 'll is installed--> processing dependency:libselinux = 2.0.94-5.8.el6 for P ackage:libselinux-devel-2.0.94-5.8.el6.x86_64--> processing Dependency:libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.8.el6.x86_64--> processing Dependency:pkgconfig (LIBSEPOL) for package: libselinux-devel-2.0.94-5.8.el6.x86_64--> Running Transaction Check---> Package keyutils-libs.x86_64 0:1.4-4. El6 'll be updated---> Package keyutils-libs.x86_64 0:1.4-5.el6 would be a update---> Package libcom_err.x86_64 0:1 .41.12-18.el6 'll be updated--> processing dependency:libcom_err = 1.41.12-18.el6 for package:e2fsprogs-libs-1.41.1 2-18.el6.x86_64--> processing Dependency:libcom_err = 1.41.12-18.el6 for package:libss-1.41.12-18.el6.x86_64-- > Processing Dependency:libcom_err = 1.41.12-18.el6 for package: E2FSPROGS-1.41.12-18.EL6.X86_64---> Package libcom_err.x86_64 0:1.41.12-22.el6 'll be a update---> Package Libselinux.x86_64 0:2.0.94-5.3.el6_4.1 'll is updated--> processing dependency:libselinux = 2.0.94-5.3.el6_4.1 for P ACKAGE:LIBSELINUX-UTILS-2.0.94-5.3.EL6_4.1.X86_64---> Package libselinux.x86_64 0:2.0.94-5.8.el6 'll be a Update---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 'll be installed--> Running transaction Check---> Package e2fsprogs.x86_64 0:1.41.12-18.el6 'll be updated---> Package e2fsprogs.x86_64 0:1.41.12-22.el6 would be is an UPDA TE---> Package e2fsprogs-libs.x86_64 0:1.41.12-18.el6 is updated---> Package e2fsprogs-libs.x86_64 0:1.41.12-22.el6 'll be a update---> Package libselinux-utils.x86_64 0:2.0.94-5.3.el6_4.1 'll be updated---> Pac Kage libselinux-utils.x86_64 0:2.0.94-5.8.el6 'll be a update---> Package libss.x86_64 0:1.41.12-18.el6 would be updat Ed---> Package libss.x86_64 0:1.41.12-22.el6 'll be a UPdate--> finished Dependency resolutiondependencies resolved=================================================== ============================= Package Arch Version Repository size============== ==================================================================installing:autoconf Noarch 2.63- 5.1.el6 Base 781 k automake Noarch 1.11.1-4.el6 base 550 k openssl-              Devel x86_64 1.0.1e-42.el6 Base 1.2 M pcre-devel x86_64 7.8-7.el6                      Base Kupdating:openssl x86_64 1.0.1e-42.el6 base 1.5 M pcre       x86_64 7.8-7.EL6 Base 196 kinstalling for Dependencies:keyutils-libs-devel x86_64 1.4-5.el6 base k krb5-devel x86_64 1.10.3-42.el6 Ba Se 502 k Libcom_err-devel         x86_64 1.41.12-22.el6 base k libselinux-devel x86_64 2.0.94-5.8.el6 Base 137 k libsepol-devel x86_64 2.0.41-4.el6 base kupdating for dependencies : E2fsprogs x86_64 1.41.12-22.el6 base 554 k e2fsprogs-libs x86_64 1. 41.12-22.el6 Base 121 k keyutils-libs x86_64 1.4-5.el6 base k krb5- Libs x86_64 1.10.3-42.el6 base 768 k libcom_err x86_64 1.41.12-2 2.el6 base Notoginseng k libselinux x86_64 2.0.94-5.8.el6 base 108 k libselinux-u         TILs x86_64 2.0.94-5.8.el6 base LIBSS x86_64 1.41.12-22.el6                 Base Ktransaction summary================================================================================ Because of too much informationThe surface is omitted ...     
[Email protected] ~]# cd/usr/local/src[[email protected] src]# wget http://mirror.bjtu.edu.cn/apache/httpd/ httpd-2.2.31.tar.gz            //download HTTP package [[email protected] src]# wget http://mirror.bjtu.edu.cn/apache/apr/ apr-1.5.2.tar.gz                //Download the package that HTTP depends on [[email protected] src]# wget http://mirror.bjtu.edu.cn/apache/apr/ apr-util-1.5.4.tar.gz      //download packets that are dependent on HTTP

  

Cnetos Building Apache Web server

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.