Install Apache under Debian

Source: Internet
Author: User

Installing Apache today is encountering a pit, so write a record.

Native environment

System: Personal PC debian/deepin-15.5, this tutorial is for the Debian system

Installing the Software

Target software: apache-httpd, Apache Server Software, currently (02/20/2018) version 2.4.29, download official website http://httpd.apache.org/, recommended direct access to Tsinghua Mirror download.

May encounter the Pit

Mainly software missing and command error, this is the purpose of this article

Software that may need to be installed in advance:

    • Gcc-c++ (You can use 'gcc-v' to see if GCC is installed), download the official website GNU-GCC
    • Expat(function: Parse xml), download the official website expat, but it is recommended to use the command 'sudo apt-get install libexpat-dev' installation

If you encounter a heap during the installation process: Undefined reference to ' Xml_. ', such as

I follow the stackoverflow of the word,

In the './configure--prefix= installation directory--with-included-apr' stage, use the './configure--prefix= installation directory-- WITH-INCLUDED-APR --with-included-apr-util' substitute, the error disappears

Note: If the above method does not solve the problem, please Google

The following is the basic installation process:

In addition to the above software, download the following software

    • APR, download official website apr&apr-util
    • Apr-util, download website ibid.
    • PCRE (This see other tutorials need to install, I do not use when installing, you can according to make phase mentioned PCRE decide whether to install), download official website PCRE

Process:

Using the ' sudo tar-zxvf file path ' to extract the tar.gz format file, the default decompression to the current folder, you can attach the '-C target path ' to specify the decompression path (trick: Your terminal may support the input sudo tar-zxvf directly after the file is dragged into the terminal, Save time to enter file path).

  1. Press the method, unzip the httpd-2.x.xx.tar.gz
  2. Unzip apr-1.x.x.tar.gz and apr-util-1.x.x.tar.gz to folder httpd-2.x.xx/srclib/
  3. The second step to extract the name of the two folder "Apr" and "apr-util" ( note : Need to elevate permissions to operate, I am directly Modify permissions chmod 777- R Srclib then renamed, you can modify the folder name through the terminal )
  4. To configure, use the './configure--prefix= installation directory--with-included-apr with-included-apr-util ' will install the directory Modify the location that you want to install, suggest /usr/local/apache2(at the moment your terminal is under folder httpd-2.x.xx )
  5. Then use the command ' Make', This step is longer, if your time is short, it is recommended to check the end of the terminal if there is an error word, my terminal normal end return make[1] leaving directory/usr/local/ Apache2, you might be different, but make sure there's no error
  6. Use the command ' make install ' if this step is wrong, it is recommended to check whether the above step is wrong, I normally end up with a previous step to return the normal end of the word
  7. Installation complete, go to your installation directory/bin , use ./apachectl start to launch Apache server, 127.0.0.1 in browser input get it works Word Success (Note: If you start other server software at the same time, you may get conflict, additional port number may solve the problem, please Google for specific)

Install Apache under Debian

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.