Build Ubuntu Server 9.10 64 bit All-in-One LAMP server – Linux Apache MySQL PHP Subversion Trac and Samba – Part 2

This guide is provided for users who want to test these in testing environment. Please use this guide at your own risk.

Part 2 will focus on LAMP server installation and configuration

Install Linux Apache MySQL PHP server

tasksel install lamp-server

Add Fully Qualified Domain Name to Apache

echo "ServerName" > /etc/apache2/conf.d/fqdn

Restart Apache

/etc/init.d/apache2 restart

Enable remote MySQL connection from other hosts and enable innoDB file per table option

emacs /etc/mysql/conf.d/my.cnf

Example file content

bind-address =

Restart mysql

/etc/init.d/mysql restart

Install PHPMyAdmin

aptitude install phpmyadmin

Create VirtualHost for phpmyadmin with different port [Optional]
Move default phpmyadmin configuration to available site configuration for apache

mv /etc/apache2/conf.d/phpmyadmin.conf /etc/apache2/sites-available/phpmyadmin

Add VirtualHost configuration to phpmyadmin

emacs /etc/apache2/sites-available/phpmyadmin

Example file content

# phpMyAdmin default Apache configuration

Listen 8080
#Alias /phpmyadmin /usr/share/phpmyadmin

<VirtualHost *:8080>
DocumentRoot /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .


# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
Require valid-user

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All

Enable edited site phpmyadmin.conf

a2ensite phpmyadmin

Restart Apache

/etc/init.d/apache2 restart

Now phpmyadmin is available at

Leave a Reply

Your email address will not be published. Required fields are marked *