Apache httpd Service--Installation

Source: Internet
Author: User
Tags install openssl

Yum Installation

Installation:

Yum-y Install httpd

Configuration file:

/etc/httpd/conf/httpd.conf

And

Under All files ending with. conf

Service Control:

Systemctl Start|restart|stop|reload httpd

Site Web page document root directory:

/var/www/html

Module file path:

/usr/lib64/httpd/modules

Main Program Files:

/usr/sbin/httpd

Main process file:

/run/httpd/httpd.pid

Log file directory:

/var/log/httpd

Offline Help documentation Package:

Yum-y Install Httpd-manual

After restarting the service, you can enter it in the browser. http://IP/manual/

Compiling the installation

System Environment: CentOS6.9

ARP version: 1.6# wget http://mirror.bit.edu.cn/apache//apr/apr-1.6.3.tar.gz

Arp-util Version: 1.6# wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

HTTPD version: 2.4# wget http://mirrors.shu.edu.cn/apache//httpd/httpd-2.4.33.tar.gz

? 1) Install the required packages

~]# yum-y Groupinstall "Development tools" ~]# yum-y install Openssl-devel expat-devel pcre-devel

? 2) Configuring the compilation Installation

~]# tar xf apr-1.6.3.tar.gz~]# tar xf apr-util-1.6.1.tar.gz~]# tar xf httpd-2.4.33.tar.gz~]# cp-a apr-util-1.6.1 httpd-2. 4.33/srclib/apr-util~]# cp-a apr-1.6.3 httpd-2.4.33/srclib/apr~]# cd httpd-2.4.33httpd-2.4.33]#./configure--prefix= /data/httpd24  --enable-so  --enable-ssl  --enable-cgi  --enable-rewrite  --with-zlib  -- With-pcre   --with-included-apr  --enable-modules=most  --enable-mpms-shared=all  --with-mpm= preforkhttpd-2.4.33]# make-j 4 && make install

? 3) Configure Environment variables

~]# Echo ' export path=/data/httpd24/bin: $PATH ' >/etc/profile.d/httpd.sh~]# echo ' Manpath/data/httpd24/man ' > >/etc/man.config
~]# source/etc/profile.d/httpd.sh~]# Source/etc/man.config

4) Start the service and test

~]# Apachectl Start

  

Apache httpd Service--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.