Installing Apache with PHP5 and SSL support on Debian 7.5

The web server component of our development server has multiple purposes in our environment and is used for

  • the development of client solutions;
  • the development of software products;
  • the hosting of version control software, namely Subversion and Mercurial; and
  • the hosting of project management software, including time and issue tracking, namely Redmine.

Installing Apache

We install the required packages by executing the following command in a “root” shell.

apt-get install apache2 apache2-doc

Installing PHP

To enable the processing of PHP scripts, we install PHP and the PHP Apache Module by executing the following command in a “root” shell.

apt-get install php5 libapache2-mod-php5 php-doc

Installing PHP Modules

To enable the use of some additional functionality in PHP, we install the PHP modules by executing the following command in a “root” shell.

Retrieving files

To enable the retrieval of files, we install the php5-curl package by executing the following command in a “root” shell.

apt-get install php5-curl

Handling graphics

To enable the handling of graphics, we install the php5-gd package by executing the following command in a “root” shell.

apt-get install php5-gd

The module supports the PNG, JPEG, XPM formats as well as Freetype/Truetype fonts.

Finding a Location

To enable the determination of the geographical location of an IP address, we install the php5-geoip package by executing the following command in a “root” shell.

apt-get install php5-geoip

Internationalisation

To enable internationalisation in PHP scripts, we install the php5-intl package by executing the following command in a “root” shell.

apt-get install php5-intl

Encryption

To enable encryption in PHP scripts, we install the php5-mcrypt package by executing the following command in a “root” shell.

apt-get install php5-mcrypt

Memcached

To enable memcached functionality in PHP scripts, we install the php5-memcache package by executing the following command in a “root” shell.

apt-get install php5-memcache

MySQL

To enable MySQL functionality in PHP scripts, we install the php5-mysql package by executing the following command in a “root” shell.

apt-get install php5-mysql

PostScript

To enable PostScript functionality in PHP scripts, we install the php5-ps package by executing the following command in a “root” shell.

apt-get install php5-ps

XML-RPC

To enable XML-RPC functionality in PHP scripts, we install the php5-xmlrpc package by executing the following command in a “root” shell.

apt-get install php5-xmlrpc

XSL parser

To enable the XSL parser functionality in PHP scripts, we install the php5-xsl package by executing the following command in a “root” shell.

apt-get install php5-xsl

PHP Extension and Application Repository

To enable the PHP Extension and Application Repository (PEAR), we install the php-pear package by executing the following command in a “root” shell.

apt-get install php-pear php5-dev
MongoDB

To add the MongoDB extension to the repository, we install the mongo extension by executing the following command in a “root” shell.

pecl install mongo

Once the extension has been compiled and installed, we need to register the extension by executing the following command in a “root” shell.

echo 'extension=mongo.so' > /etc/php5/conf.d/mongo.ini

Enabling SSL support

To enable SSL support for our web server, we execute the following command in a “root” shell.

a2enmod ssl

Once all configuration has been done, we need to restart the web server by executing the following command in a “root” shell.

service apache2 restart

3 thoughts on “Installing Apache with PHP5 and SSL support on Debian 7.5

Comments are closed.