I have started my internship at Human Rights First (HRF), with the task of revamping their website and moving it to a WordPress platform. The only problem being that I've never worked in WordPress before (d'oh, my blog is on Blogger!), so I had to start learning. And the first step was setting up WordPress on a local Linux machine.
This thing took way too much, because for some reason Ubuntu versions 8.10 and 9.10 doesn't recognize my wireless card, or when it does it just wouldn't allow me to click on "enable wireless"... Really frustrating, especially since I had decided to change my current (WORKING!) installation to 9.10, the most recent one. And it took me a looong time to realize that the working installation was 9.04, not 8.10, because I was beginning to think I destroyed something... Anyway, after using a virtual remote Ubuntu 9.10 server at www.linode.com (HRF bought some space there) and using putty and winscp to install LAMP and eventually WordPress there (which proved to be more complicated than necessary since I only had a command line and most online instructions use GUIs), I managed to become an expert in this (from the command line) and got the chance to prove that to myself last night after I managed to reinstall Ubuntu 9.04. It only took 15 minutes, including the download time!!!
Linux
I will assume you have a working version of Ubuntu. If you want to be able to uninstall ubuntu at any time without destroying your Windows boot, I suggest you use Wubi: http://wubi-installer.org/.
First off, let me show you something neat: http://repogen.simplylinux.ch/. This cool little website lets you choose where your Ubuntu package gets its updates. Choose country and distro. I suggest you select everything up to 3rd Parties Repos, but except for Proposed and Backports in Ubuntu Updates (we don't want to destroy our linux installation!). You can decide what's interesting in 3rd Parties Repos. Click generate. Copy the text.
Since nano is the easiest way to edit text in the terminal and you need administrator priviledges that can only be achieved with sudo in order to edit this file (I don't know why but my distro just says I cannot save the file because I'm not admin instead of asking me for the password, and all other versions did the same), I will use nano to edit my setup files. But feel free to use whatever you'd like. Open the terminal and write:
Press enter. Input your password and press enter. You will have to delete the contents of this file (fastest way to do this in nano is Ctrl+K as it erases each row, but be careful cause I think it cuts, so you'll have to copy the repos again). Paste the generated repos. Close the file (Ctrl+X), you will be prompted to save, say yes (y), you will be asked about the name of the file, press enter without modifying anything.$ sudo nano /etc/apt/sources.list
Now, in terminal, do a:
$ sudo apt-get updatePress enter.
Now, we are ready to install LAMP. I'm basically using this tutorial: http://www.supriyadisw.net/2006/12/lamp-installation-on-ubuntu, with a hint of
Apache
In terminal, write and press enter:
$ sudo apt-get install apache2
PHP
Install PHP:
$ sudo apt-get install php5 libapacheRestart Apache:
$ sudo /etc/init.d/apache2 restartMySQL
Install MySQL Server:
$ sudo apt-get install mysql-serverDuring the installation, if prompted, select a password for user.
Remove connection to localhost restriction:
$ sudo nano /etc/mysql/my.cnfFind the line bind-address = 127.0.0.1 and comment it out (remove the ; ) then save the file.