简体   繁体   中英

Install Apache Server HTTPD on Ubuntu

I'm trying to install Apache Server on my Ubuntu for using a web page made in PHP . I downloaded pcre , apr and apr-util and I configured, maked and make install all of them.

Then, when I came back to the Apache folder, the following command

sudo ./configure --prefix=/home/test/Apache/srclib/apr-util 
                 --with-apr=/home/test/Apache/srclib/apr 
                 --with-pcre=/home/test/Apache/pcre 
                 --with-included-apr

succeded.

Even the command

sudo make 

succeded. But, when I type sudo make install, I got the following error:

Makefile:79: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory '/home/test/Apache/srclib/apr-util'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/test/Apache/srclib'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Please, could you give me any tip? Thank you

Maybe apr and apr-util versions needed by Apache 2.4.x are missing?. Or maybe you just need the -dev packages?

cd /usr/local/src/httpd-2.4.20/srclib
curl --remote-name http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
curl --remote-name http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
tar -xzvf apr-1.5.2.tar.gz
tar -xzvf apr-util-1.5.4.tar.gz
mkdir apr
mkdir apr-util
mv apr-1.5.2/ apr
mv apr-util-1.5.4/ apr-util
cd ..

Then compile with

./configure --prefix=/usr/local/apache-2.4.20 --with-included-apr

Good resource: http://httpd.apache.org/docs/current/install.html Here is what they say about APR and APR-Util:

APR and APR-Util Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR , unpack them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util (be sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.

Do you have apt-get? If so, you can use
sudo apt-get install apache2 apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-mysql php5-curl php5-gd . This will install all Apache and PHP software.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM