The problem that Apache encounters the solution of the APR not found problem _linux

Source: Internet
Author: User
Tags documentation iptables

#./configure--prefix ... When you check the editing environment:

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

can use./configure–help | grep Apr view Help. --WITH-INCLUDED-APR use bundled copies of Apr/apr-util--with-apr=path prefix to installed Apr or the full PA th to Apr-config--with-apr-util=path prefix for installed APU or the full PATH to install APR (Apache portable Runtime) Download: H ttp://apr.apache.org/download.cgi

#cd/tmp/52lamp///Source storage location #tar-zxvf apr-1.4.2.tar.gz//unzip-o apr-1.4.2.zip #cd apr-1.4.2 #./configure #make #make Inst All

Check the compilation environment again to appear

Checking for Apr-util ...  No configure:error:apr-util not found. Please read the documentation.

#./configure–help | grep apr-util--with-apr-util=path prefix for installed APU or the full PATH to

Download: http://download.chinaunix.net/download/0001000/472.shtml #tar-zxvf apr-util-1.3.9.tar.gz #cd apr-util-1.3.9 #./ Configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr #make #make Install

./configure still prompts apr-util not found and--with-apr-util=/usr/local/apr-util after adding--WITH-APR=/USR/LOCAL/APR configure: Error:pcre-config for Libpcre not found. PCRE is required and available from http://pcre.org/

#./configure–help | grep pcre--with-pcre=path Use external pcre library

Download: Http://sourceforge.net/projects/pcre #unzip-o pcre-8.10.zip #cd pcre-8.10 #./configure--prefix=/usr/local/pcre # Make #make Install

Add Parameters--with-apr=/usr/local/apr/--with-apr-util=/usr/local/apr-util/--with-pcre=/when continuing to install Apache/httpd,./configure Usr/local/pcre, this problem is solved.

Note: Apache does not check that the parameters are correct when installed, and the wrong parameters are discarded directly and are not reported to the user. However, you can use the echo $? command to check for errors, indicating no errors when the output is 0.

#echo $? 0

#make #make Install

Copy Apache startup file #cp/usr/local/httpd/bin/apachectl/sbin/

Start Apache #apachectl start

Set Apache boot from boot #vi/etc/rc.d/rc.local add one line/sbin/apachectl start

Or add the httpd service to the NTSYSV Service Management tool #apachectl stop//Turn off Apache to avoid unnecessary trouble #cp/usr/local/httpd/bin/apachectl/etc/rc.d/init.d/ httpd #vi/etc/rc.d/init.d/httpd modified to #!/bin/sh # #chkconfig: 345//#不能省略, note the space #description: httpd for 52lamp 2010101 6 21:54//arbitrary string # ...

The meaning of 345 in the second line: # 0-operation completed successfully # 1-# 2-usage error # 3-HTTPD could not B E started # 4-HTTPD could not to stopped # 5-HTTPD could not to started during a restart

Modify the Permissions #cd/etc/rc.d/init.d/#chmod a+x httpd #chkconfig--add httpd

#ntsysv httpd is already in the list, press F1 to see the service description just written httpd for 52lamp 20101016 21:54.

#apachectl start #ps-e |grep httpd 23247?        00:00:00 httpd 23248?        00:00:00 httpd 23249?        00:00:00 httpd 23251?        00:00:00 httpd 23252? 00:00:00 httpd

Enter 127.0.0.1 in the browser and everything looks fine, but the other computers on the LAN can't access it!

#service iptables Stop

If you do not want to shut down the firewall, release the 80 port.

#vi/etc/sysconfig/iptables Add a row-a rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 22-j ACCEPT #service IP Tables restart//reboot firewall

Now everything OK

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.