Apachehttpd installation in Linux lacks the associated software

Source: Internet
Author: User
After Fedora12 is installed, httpd is available by default. If not, download httpd at http://httpd.apache.org/manually. For this demonstration, I uninstalled the original httpd, re-downloaded and installed apache. Uninstall method: yum-ehttpd.1: Go to the apache official website http://httpd.apache.org/download.cgidownload the latest version of the apache, then decompress, execute such command

After Fedora 12 is installed, httpd is available by default. If not, download httpd at http://httpd.apache.org/manually.

For this demonstration, I uninstalled the original httpd, re-downloaded and installed apache. Uninstall method: yum-e httpd.

1: Go to the apache official website http://httpd.apache.org/download.cgi to download the latest version of apache, and then extract, execute the following command:

./Configure-prefix =/root/soft/apache

Configure: error: APR not found. Please read the documentation.

2: prompt the lack of apr, download the http://apache.freelamp.com/apr/, after compiling and installation of apr, continue to compile apache.

3: Compile (./configure -- prefix =/root/soft/apr-util-with-apr =/root/soft/apr)

Configure: error: APR-util not found. Please read the documentation

4: If apr-util is missing, download and compile apr-util to continue compiling apache.

/Configure -- prefix =/root/soft/apache -- with-apr =/root/soft/apr/-- with-apr-util =/root/soft/apr-util/

Configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

5: Again prompt the lack of pcre, download the http://sourceforge.net/projects/pcre/ compilation and installation (I here are installed in the/root/soft directory, such as./configure -- prefix =/root/soft/pcre)

. /Configure -- prefix =/root/soft/apache -- with-apr =/root/soft/apr/-- with-apr-util =/root/soft/apr-util /-- with-pcre =/root/soft/pcre

6: The compilation is successful.

7: as shown in the following example, make and make install and run the command in the/root/soft/apache/bin directory. /apachectl start, start the httpd service, and enter 127.0.0.1 in the browser for testing. The page is displayed, but the error 403 Forbidden appears, because my www directory is in the/root/soft/apache/htdocs directory by default, this directory is the root directory, and web users are not authorized to access it. Modify apache/conf/httpd. conf. Modify DocumentRoot to/var/www/html (you can create these directories under var). You also need to modify to, save, and execute apachectl restart.

8: apache supports ipv4/ipv6 by default in linux. In the browser, enter [: 1]. The long-awaited web page appears...

Enjoy It!

Appendix:

1: In configure, if you encounter a lack of other software, you can first look at the help, for example, if the installation process prompts the lack of apr, then

./Configure-help | grep apr

2: My apache compilation command:

. /Configure -- prefix =/root/soft/apache -- withpr =/root/soft/apr -- with-apr-util =/root/soft/apr-util/-- with-pcre =/root/soft/pcre/-- enable-so

Related Article

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.