Posted by: jasonk2600 | December 23, 2009

Quickie HowTo: Debian GNU/Linux Based AMP Server

Synopsis

This quickie howto will explain how to setup Debian GNU/Linux to run an AMP server.  AMP stands for Apache, MySQL, and PHP.  This howto assumes that the Debian GNU/Linux system will be connecting to a remote MySQL server that has already been configured and running.

Installation

Install Apache Web server, MySQL client, and PHP using the aptitude software management utility.

# aptitude install apache2
# aptitude install libapache2-mod-php5 php5-cli php5-common php5-cgi
# aptitude install mysql-client
# aptitude install php5-mysql

 

Configuration

After the software packages have been installed, a basic AMP server has been configured and started.  Optionally, you may edit Apache’s configuration file (/etc/apache2/apache.conf) to tweak any settings or performance variables.  If you have modified any settings be sure to restart Apache for them to take effect.

# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting ...

 

Testing

HTML files and PHP scripts are stored in /var/www/ by default. Create a test PHP script to test the newly installed software.

# echo '<?php phpinfo(); ?>' >> /var/www/test.php

 

Open your preferred Web browser locally and point it at http://localhost/test.php. A PHP settings information page should appear with information about the version of Apache, MySQL, and PHP that are being used. If the page does not appear check /var/log/apache2/error.log for more information. If the test is successful, you may start creating and using PHP scripts and a remote MySQL server.

 

References:

 

  [EoF]
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

Categories

%d bloggers like this: