Configure and install Apache httpd

This is my first time trying to install the Apache HTTP server locally in my mailbox as a regular user (not root).

I downloaded Apache 2.4.1 version of the Apache HTTP server [http://httpd.apache.org/download.cgi]. However, when I try to create and install locally in my inbox, I get below the error:

httpd/httpd-2.4.1 1059> ./configure checking for chosen layout... Apache checking for working mkdir -p... yes checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu Configuring Apache Portable Runtime library ... checking for APR... no configure: error: APR not found. Please read the documentation. 

I'm not sure what dependency he is looking for - I mean, does the download package not contain it? What do I need to do to create / deploy an Apache HTTP server?

Thanks in advance.

+79
apache apr
Feb 24 '12 at 19:30
source share
8 answers

When it tells you Please read documentation , that means you should read the Apache documentation ( http://httpd.apache.org/docs/2.4/install.html ) that tells you

download the latest versions of APR and APR-Util from Apache APR , unzip them to. / srclib / apr and. / srclib / apr-util (make sure the domain names do not have version numbers; for example, the APR distribution should be in. / srclib / apr /)

then do

 ./configure --with-included-apr 
+124
Feb 24 '12 at 19:40
source

For Ubuntu 11.10 this option works well:

  # APR wget http://mirrors.axint.net/apache//apr/apr-1.4.6.tar.gz tar -xvzf apr-1.4.6.tar.gz cd apr-1.4.6/ ./configure make make install cd .. # APR Utils wget http://mirrors.axint.net/apache//apr/apr-util-1.4.1.tar.gz tar -xvzf apr-util-1.4.1.tar.gz cd apr-util-1.4.1 ./configure --with-apr=/usr/local/apr make make install cd .. # Apache wget http://apache.petsads.us//httpd/httpd-2.4.1.tar.gz tar -xvzf httpd-2.4.1.tar.gz cd httpd-2.4.1 ./configure --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-ssl --enable-cgi --enable-vhost-alias --enable-rewrite --enable-so --with-apr=/usr/local/apr/ make make install cd .. 

Learn more about this below.

Source: VaporCreations.com

+36
Apr 07 '12 at 20:10
source

If you have Debian / Ubuntu, you can simply:

 apt-get install libapr1-dev libaprutil1-dev 

Then ./configure

Done

+22
Jan 22 '13 at 18:39
source

Here are the steps how I installed apache-httpd for non-root users:

  1. Download and unzip apache-httpd-2.4.2 (but before. / Configuring, creating and installing, follow the instructions below :)
  2. Download and extract APR & APR-UTIL to the "./srclib/apr" & "./srclib/apr-util" folders. This is required. / configure --with-apr =. / Apache / httpd-2.4.2 / srclib / apr (s) --with-enabled-apr (options).
  3. Download, unzip ,. / configure (with) --prefix = localURL, make and install PCRE in the "./pcre" folder. This is required. / configure --with-pcre = / home / username / apache / pcre (optional).
  4. Configure apache-httpd by entering the following command (I like to enable certain parameters as described in the command below): ./ configure --enable-file-cache --enable-cache --enable-disk-cache --enable-mem -cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-cgi --enable-vhost-alias --enable-rewrite --enable-so --with-apr = /home/username/apache/httpd-2.4.2/srclib/apr --prefix = / home / username / apache / httpd-2.4.2 / --with-enabled-apr --with-pcre = / home / username / apache / pcre Note: When configuring apache-httpd, use the "--enable-ssl" option ONLY if OpenSSL is installed, otherwise DO NOT enable it.
  5. Now at the command prompt, enter the command "make" and "make install".
  6. Open and configure the httpd.conf file, for example: "vi / home / eddie_kumar / apache / httpd-2.4.2 / conf / httpd.conf"

IMPORTANT : do not forget to change the default port from 80 to something else, for example, 8080, this is especially important for a non-root user. (How? Open httpd.conf → search "Listen 80" → change it to "Listen 8080".

And what is it, now open your browser, enter "localhost: 8080 ", it should display "It works!".

+20
May 03 '12 at 13:14
source

If you use Fedora, you can use yum to install APR, APR-Util, and PCRE . You will also need to download apr-devel, apr-util-devel and pcre-devel.

In this case, you can simply run the following command on your terminal and no more than “configure: error: APR not found .... APR-Util and PCRE”.

 yum -y install arp apr-devel apr-util apr-util-devel pcre pcre-devel 

I am using Fedora 17 and plan to use a shell script to install apache 2.4.3. Thus, yum works beautifully, rather than manually loading apr, apr-util and pcre.

+3
Jan 23 '13 at 4:56
source

1 You need APR (apache portable runtime), which is the main component of the apache web server.

2, If you want to do the installation, you may need a root account

3, even if not, apache cannot start listening on an unprivileged port (below 1024) without a root account

4, get the root or ask someone with root to install apache from the official repo (I don’t know which distribution you are running), for example, using yum, apt-get, etc.

+1
Feb 24 '12 at 19:41
source

Corresponding Apr or pcre errors require that the source be loaded, and the Apache HTTPD "configure" process should be informed of these source locations in your file system. For example: if you downloaded the source for APR in. / srclib (regarding apache httpd), you should use --with-included-april
as a configuration parameter.

On the other hand, if you want not to build, but to install APR / APR-UTIL, then you need the following: CentOS / RedHat:
yum install apr-util-devel apr-devel
However, it may happen that the version of APR provided by yum does not match the expected version of Apache httpd. In this case, you can download APR and APR-UTIL and use the --with-included-apr option.

You can also create PCRE using the same “configure, make, make install” process, and then continue when you stopped building Apache httpd.
Or you can install pcre: yum install pcre-devel

If you see "compile: unrecognized option" when creating PCRE, then you might need other dependencies: see details at:
http://khanna111.com/wordPressBlog/2012/09/11/94087-2/
It also covers "mod_deflate" and "zlib".

0
Oct 22 '14 at 19:45
source

Main steps

 tar -xvf httpd-2.4.1-customized.tar -C ../ #Balancer folder will be created tar -xvzf openssl-1.0.1.tar.gz -C /balancer/ cd ->/balancer/openssl-1.0.1 ./config --prefix=/usr/local/ssl/ shared zlib-dynamic enable-camellia make depend make make install tar -xvzf pcre-8.30.tar.gz -C ../balancer/ /balancer/pcre-8.30 ./configure --prefix=/usr/local/pcre/ make make install 

remove pcre and openssl

0
Sep 12 '15 at 21:09
source



All Articles