The server of Apache

Source: Internet
Author: User

OCT 8 2016

Basic installation procedures for Apache services

first, in order to avoid port conflicts, you need to uninstall the Linux system in the RPM installation of httpd

~] # Rpm-qa | grep httpd

  ~] # rpm-e httpd--nodeps (here nodeps to ignore Dependencies)

second, the download obtained httpd source package decompression and release to The/usr/src/directory

~] # tar zxvf httpd-2.2.17.tar.gz-c/usr/src

~] # cd/usr/src/httpd-2.2.17

three, configuration: Custom Compilation options

  ~] # ./configure--prefix=/usr/local/httpd (specify installation Path)

                           without shutting down the Server. Span style= "font-family:microsoft yahei; font-size:18px; " >

                                     --enable-rewrite ( Enable Web page address Rewriting: uploading a webpage does not require a service to be closed

                                     --enable-charset-lite ( Enable character Set support)

--enable-cgi (enable CGI scripting Support)

Iv. Compilation and Installation

~] # make && make install (where the && symbol is interpreted as: the following do install commands will not continue until the made is successful, and the make command requires support from the GCC and gcc++ compilation Environments. Install with Yum tool, or select " development tools "options. )

five, Confirm the installation results

  ~] # ls/usr/local/httpd

Briefly enumerate the main contents of THE/USR/LOCAL/HTTPD Folder:

/bin: executable program files, commands, etc. that store httpd services

/conf: Directory of configuration file httpd.conf

/htdocs: default storage path for Web page files

/logs: Log file directory

/modules: The module folder that holds the HTTPD service

/cgi-bin: storing various CGI program files

Vi. Optimization of execution paths

Compile the installed HTTPD service through the source code, The program path is not in the default search path, in order to make the service easier to use, you can add a link to the relevant program

  ~] # ln-s/usr/local/httpd/bin/*/usr/local/bin

We can run it right now.

~] # apachectl-v command to view the version of the Apache service

Vii. add httpd to System services

~] # cp/usr/local/httpd/bin/apachectl  /etc/init.d/httpd

~] # VIM/ETC/INIT.D/HTTPD

Modify the first three lines

# ! /bin/bash

#  chkconfig:35  85  21     (3 and 5 run Level Open service "-" is not on, 85th is turned on, 21st is closed)
span>

#  description: ———— parameter description line ————

(note: The general configuration file begins with # to comment out this line, but the first three lines of the Apache service must be # and take effect, with the # sign followed by a space, and 35 preceded by a space)

~] # Chkconfig--add httpd (turn on restart Loading)

  ~] # chkconfig--list httpd(check if it takes Effect)

  

  

                     

The server of Apache

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.