--apache installation of server Building

Source: Internet
Author: User

--apache installation of server Building


: http://httpd.apache.org/download.cgi


In the event of an accident:

Download httpd-2.2.6.tar.bz2 put the httpd-2.2.6.tar.bz2 under the/soft.
[[Email protected] ~] #cd/soft
[[email protected] soft] #tar JXVF httpd-2.2.6.tar.bz2//Unzip the Apache package
[[email protected] soft] #cd httpd-2.2.6//Navigate to the httpd-2.2.6 folder
[[email protected] httpd-2.2.6] #ls//View the contents of the Display httpd-2.2.6 folder
[Email protected] httpd-2.2.6]#./configure--help | More//View install Apache configuration parameters
[[email protected] httpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so//Configure Apache Path
[[email protected] httpd-2.2.6] #make//Compile Apache
[[email protected] httpd-2.2.6] #make Install//installation Apache
[[email protected] httpd-2.2.6] #cd/usr/local/apache//Enter Apache directory
[Email protected] apache]# CD conf/
[[email protected] conf] #cp-a httpd.conf httpd.conf-//backup Apache configuration file
[[email protected] conf] #chkconfig--list httpd//See if the HTTPD service already exists
[[email protected] conf] #chkconfig httpd off//Shut down system comes with httpd service if there is httpd service
[[email protected] conf] #service httpd status//view your own httpd service status
[[email protected] conf]#/usr/local/apache/bin/apachectl-k start//linux launch Apache command
[[email protected] conf] #netstat-an | GREP:80//See if the linux80 port is turned on
[[email protected] conf] #ps-aux | grep httpd//linux under View Apache process
[[email protected] conf] #cd. /..
[[email protected] local] #cp/usr/local/apache/bin/apachectl/etc/rc.d/init.d/apache//copy Apache boot script
[[email protected] local] #vi/etc/rc.d/init.d/apache//This is the edit Apache startup script
At the beginning of the #! /bin/sh below add
#chkconfig: 2345 85 15
[[email protected] local] #chkconfig--add Apache//Add Apache Service
[[email protected] local] #chkconfig--list Apache//list Apache Service
[[email protected] local] #service Apache stop//Stop Apache Service
[[email protected] local] #netstat-an | GREP:80//Check whether the 80 port of Linux is off
[[email protected] local] #ps-aux | grep httpd//To see if a httpd service exists, and if the previous httpd service starts, the newly added Apache service fails to start
[[email protected] local] #service Apache start//Start Apache Service
Open your server IP address to see if there's a Tomcat default home page, and if so, congratulations.
Installing Apache under Linux has been successful.



If the error message when compiling:

Checking for APR ... no
Configure:error:APR not found. Please read the documentation


Workaround:

1. Download the required packages:

 
   
  
  1. wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
  2. wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
  3. wget Http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

The steps are as follows:

A: Solve Apr not found problem >>>>>>

 
   
  
  1. [Email protected] test]# TAR-ZXF apr-1.4.5.tar.gz
  2. [Email protected] test]# CD apr-1.4.5
  3. --prefix =/usr/local/apr
  4. [[email protected] apr-1.4.5]# make && make install

B: Solve apr-util not found problem >>>>

 
   
  
  1. [Email protected] test]# TAR-ZXF apr-util-1.3.12.tar.gz
  2. [Email protected] test]# CD apr-util-1.3.12
  3. --prefix --with- Apr =/usr/local/apr/bin/apr-1-config


C: Solve pcre problem >>>>>>>>>

 
   
  
  1. [[email protected] test] #unzip-o pcre-8.10.zip
  2. [[email protected] test] #cd pcre-8.10
  3. --prefix =/usr/local/pcre

4. When you finally compile Apache, add:

--with-apr=/usr/local/apr

--with-apr-util=/usr/local/apr-util

--with-pcre=/usr/local/pcre

Successful compilation completed ~


--apache installation of server Building

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.