As I am currently playing around with CodeIgniter (an open source PHP web application framework), I thought I could write down the few software installation steps one needs to go through in order to get started on a fresh Ubuntu box. And all you really need is a LAMP (Linux Apache MySQL PHP) setup that can be up and running in less than 10 minutes (assuming the OS is already installed of course).
Install Apache
sudo apt-get install apache2
Install MySQL
sudo apt-get install mysql-server
Install PHP (with MySQL support)
sudo apt-get install php5 php5-mysql
Enable the rewrite mod in Apache
This is only needed if you plan to get rid off “index.php” in your CodeIgniter application’s URLs.
sudo a2enmod rewrite sudo gedit /etc/apache2/sites-available/default
<!-- Edit the configuration and change AllowOverride None to AllowOverride All --> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Add your site to your local web server
You could probably just extract the CodeIgniter archive into /var/www/ but you also could have your application in your home folder (/home/lroguet/www.mysite.com/ for instance). In that case, all you need to do is create a symbolic link in the Apache web directory pointing to your application folder.
cd /var/www sudo ln -s /home/lroguet/www.mysite.com/ www.mysite.com
Restart Apache
sudo /etc/init.d/apache2 restart
Here you go, just point your web browser to http://localhost/www.mysite.com/ and you should see the CodeIgniter example pages.