HTTPD Compilation and Installation

Source: Internet
Author: User
Tags fully qualified domain name

1. Introduction to the Environment

System: 2.6.32-279.el6.i686

2. Preparing the compilation environment

Yum " Server Platform Development " " Development Tools "  -yuminstall pcre-devel-y

3. Download and install required software

[Email protected] ~]# cd/usr/src #切换到src目录 [[email protected]~]#wgethttp//archive.apache.org/dist/apr/apr-1.5.2.tar.gz #下载apr文件[email protected] src]#wget FTP://ftp.mirrorservice.org/sites/ftp.apache.org/apr/apr-util-1.5.4.tar.gz #下载apr-util file[Email protected] src]#wgethttp//Mirrors.cnnic.cn/apache//httpd/httpd-2.4.25.tar.bz2 #下载httpd文件[Email protected] src]#lsApr-1.5.2.Tar. GZ apr-util-1.5.4.Tar. GZ Debug Httpd-2.4. -.Tar. bz2 Kernels

4. Installing Apr,apr-tuil

 [[email protected] src]# tar  XF apr-. 2 . tar  .gz #解压 [[email protected] src]# cd Apr -1.5 . 2  [[email protected "Apr -2 ]#./configure--prefix=/usr/local/apr/#编译 [[email protected] Apr -1.5 . 2 ] # make  && install #安装  
tar XF apr-util-1.5. 4. Tar . gz [[email protected] src]# CD Apr-util-1.5. 4 [email protected] Apr-util-1.5. 4] #./configure--prefix=/usr/local/apr-util/--with-apr=/usr/local/Apr   [[Email protected] Apr-  1.5. 2  Make  Make Install

5. Compiling httpd

[Email protected] src]#TarXF httpd-2.4. -.Tar. bz2 [[email protected] src]# CD httpd-2.4. -[email protected] httpd-2.4. -]#./configure--prefix=/usr/local/apache--sysconfdir=/etc/httpd24--enable-so--enable-ssl--enable-cgi-- Enable-rewrite--with-zlib--with-pcre--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- Enable-modules=most--enable-mpms-shared=all--with-mpm=event--with-include-Apr[[email protected] httpd-2.4. -] Make&& Make Install 

6. Other necessary configuration

[Email protected] httpd-2.4. -]#LN-sv/etc/httpd24//etc/httpd #创建符号链接 '/etc/httpd''/etc/httpd24/'[email protected] httpd-2.4. -]# vim/etc/profile.d/httpd.SH #添加path变量[email protected] httpd-2.4. -]#Cat/etc/profile.d/httpd.SHExport PATH=/usr/local/apache/bin: $PATH [[email protected] httpd-2.4. -]# source/etc/profile.d/httpd.SH#生效httpd. sh file [[email protected] httpd-2.4. -]# httpd-v #查看版本Server version:apache/2.4. -(Unix) Server built:apr3  .  +:xx: +[email protected] httpd-2.4. -]# vim/etc/Mans. config #配置man文档 # add row Manpath/usr/local/apache/Mans

7 Start httpd

[Email protected] httpd-2.4. -]# apachectl start #启动AH00558: Httpd:could not reliably determine the server's fully qualified domain name, using Localhost.localdomain. Set the'ServerName'directive globally to suppress this messageHTTPD (PID2863) already running[[email protected] httpd-2.4. -]# Elinks-source192.168.168.152 #测试网页It works!

HTTPD Compilation and Installation

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.