Intall Apache, MySQL and PHP on Ubuntu 8.10

WARNING: Please use this method to install Apache, PHP and MySQL because its more suitable for most of your needs and has options to auto-upgrade your installation. The following method is obsolete and not recommended.

After trying to install Apache, MySQL and PHP on Ubuntu 8.10 via several methods listed over the web. I opted for xampp package for linux.

It is as easy as ABC

Download the xampp linux package from their official website

wget http://nchc.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.7.tar.gz

(I have selected NCHC, Taiwan as the mirror to download this package, you may try another)

Extract the files

sudo tar xvfz xampp-linux-1.7.tar.gz -C /opt

Chmod the files to have nobody ownership

sudo chown -R nobody:root /opt/lampp/

Configure xampp security

sudo /opt/lampp/lampp security

Start xampp with this command

sudo /opt/lampp/lampp start

Stop xampp

sudo /opt/lampp/lampp stop

Restart xampp

sudo /opt/lampp/lampp restart

Login to ftp using the username nobody and the password that you have set up in the “xampp security”

To uninstall xampp

sudo rm -fr /opt/lampp

Enjoy!!

Download files from a http authenticated directory using wget

I wanted to download something off a sub-domain using wget that I have password protected using .htaccess
so the following command was NOT working

wget http://secure.asim.pk/myfiles.tar 

Luckily, we can pass two arguments to the same command and tell wget what the username and password is

wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass 

Works Great!!

If you are using Ubuntu 8.10, have not enabled root user and trying to download to a directory that has “nobody” or “root” as owner then try pre-pending it with sudo

sudo wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass