Install LAMP on Ubuntu Desktop

My development server is old. You’ll get a chuckle when you see the specs. It runs on a 400Mhz Pentium II CPU with a 128MB RAM and a 40GB drive. This old relic still manages to run Apache, MySQL, PHP and a local DNS. The server has also gone through 4 Ubuntu upgrades from version 7.04 to 9.04. After each upgrade, pages that require MySQL and PHP have slowed down considerably.

You guessed it. It’s about time to move to another machine. So, I’ve decided to install AMP minus the L (Linux) since we are already installing it on the Ubuntu Desktop. The following tutorial will show you how to install Apache, MySQL, PHP as well as the MySQL admin tool called PhpMyAdmin. Let’s get started:

Install Apache

sudo apt-get install apache2

Install PHP. Restart Apache

sudo apt-get install php5
sudo /etc/init.d/apache2 restart

Install MySQL

sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql

Finally PhpMyAdmin
sudo apt-get install phpmyadmin

You’ll be asked to provide passwords on the MySQL and PhpMyAdmin installations. There are a couple of minor tweaks you have to do to make sure the applications are working properly. First, make sure the MySQL extension is set in PHP. Restart Apache again after you make your changes.

MySQL Extension. Restart Apache

sudo vi /etc/php5/apache2/php.ini
sudo /etc/init.d/apache2 restart

Now, open your Firefox browser, and type `localhost` in the address bar. If you see “It Works!,” that means the installation was successful. One final thing before you go, I installed WordPress and the installation was a success, except for the mod_rewrite which wasn’t working if you try to use the permalinks feature. To make the permalinks feature work, first you’ll need to create a .htaccess file and make it writable. Next, turn on mod_rewrite module.

Mod Rewrite

cd /var/www/
touch .htaccess
chmod 777 .htaccess
sudo a2enmod rewrite

Lastly, make sure AllowOverride is set to All. Edit the file:

sudo vi /etc/apache2/sites-available/default

Allow Override

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

Restart Apache

sudo /etc/init.d/apache2 restart 2008 Community Choice Awards

The open-source community have spoken. The winners of the 2008 Community Awards were announced and and phpMyAdmin grabbed more than one category. This year’s nomination were left open to any project or repository. 17 of the finalists were hosted outside of The winners are:

2008 Community Choice Awards Winners

  • Best Project –
  • Best Project for the Enterprise –
  • Best Project for Educators
  • Most Likely to Be the Next $1B Acquisition – phpMyAdmin
  • Best Project for Multimedia VLC
  • Best Project for GamersXBMC
  • Most Likely to Change the World – Linux
  • Best New ProjectMagento
  • Most Likely to Be Ambiguously and Baselessly Accused of Patent Violation – Wine Is Not an Emulator
  • Most Likely to Get Users Sued by Anachronistic Industry Associations Defending Dead Business ModelseMule
  • Best Tool or Utility for SysAdmins – phpMyAdmin
  • Best Tool or Utility for DevelopersNotepad++

ProFTP and MySQL on Fedora 9

I came across an article documenting how to install a ProFTP server that uses MySQL virtual users instead of real system users allowing up to thousands of FTP users on a single machine. The instructions include the installation of ProFTP, MySQL and PHPMyAdmin, the latter is a web administration tool for the MySQL database. It’s an interesting concept which simplifies administration of FTP users if you have thousands of ProFTP users on a single system. However, the tutorial does not include the fine tuning of ProFTP, which in my opinion, is necessary.