I try to compile Apache 2.4.28 from source, I can't use command
apt-get install apache2
Because this command install Apache 2.4.18 only.
Here is my install step:
Install dependency
apt-get install build-essential apt-get install libexpat1-dev apt-get install libpcre3-dev libssl-dev
Download apache2.4.28
cd /usr/local/src wget http://mirrors.viethosting.com/apache//apr/apr-1.6.2.tar.gz wget http://mirrors.viethosting.com/apache//apr/apr-util-1.6.0.tar.gz wget http://archive.apache.org/dist/httpd/httpd-2.4.28.tar.gz
Compile apache 2.4.28
tar xzvf apr-1.6.2.tar.gz tar xzvf apr-util-1.6.0.tar.gz tar xzvf httpd-2.4.28.tar.gz mv apr-1.6.2/ httpd-2.4.28/srclib/apr mv apr-util-1.6.0/ httpd-2.4.28/srclib/apr-util ./configure --prefix=/etc/apache2 --enable-mods-shared="reallyall" --enable-mpms-shared="all"
make && make install
ln -s /etc/apache2/bin/apachectl /etc/init.d/apache update-rc.d apache defaults----> It has this warning "insserv: warning: script 'apache' missing LSB tags and overrides" service apache start
After performing the above steps, Apache 2.4.28 has been run. But I when I use
apache2 -v ----> it's not show the version of apache2
Then I install PHP5.6 like this:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php5.6
When I use this command it not only install php5.6 but also install apache2.4.18 and when I test PHP by:
echo "hello world"; ----> it not show any thing.
And
root@ubuntu:~# ps -aux | grep httpd
root 991 0.0 0.1 75268 3848 ? Ss 02:47 0:00 /usr/local/apache2/bin/httpd -k start
@Edit: as the comment I change:
./configure --prefix=/etc/apache2 --enable-mods-shared="reallyall" --enable-mpms-shared="all"
to
./configure --prefix=/usr/local/apache2 --enable-mods-shared="reallyall" --enable-mpms-shared="all"
Please help me, thank in advance.
which apache2
and lets see what you get! – George Udosen Oct 12 '17 at 07:49/etc/
and I don't think that the right place for a binary at least on Ubuntu! – George Udosen Oct 12 '17 at 08:10