Manually install Apache2

If you work with both Ubuntu and CentOS you will realise that if you install Apache2 from the repositories you will end up with 2 very different configuration folders. So i usually install Apache2 manually on new versions of Ubuntu like so:

  • Before you start the installation of Apache2 you may need to install the following libraries if they are missing (in CentOS these libraries are not in the repositories, you have to download them):
sudo apt-get install libapr1-dev libaprutil1-dev
  • The go to http://httpd.apache.org and download the latest apache server
  • Extract the folder from the archive and then open the command terminal.
  • In the command terminal navigate to the folder you extracted and run the following commands:
./configure --prefix=/etc/apache --enable-so --enable-mods-shared=all
make
sudo make install
  • Issue the following command to start the server:
sudo /etc/apache/bin/apachectl restart

Your configuration file will be /etc/apache/conf/httpd.conf. Your logs will be in /etc/apache/logs.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s