Installing the LAMP stack and Joomla!

As I want to be able to develop web based application I need to install the LAMP Stack. The term “LAMP” refers to a collection of applications that are required to run dynamic websites on a Linux system.

  • Linux : Operating System (in this case Ubuntu)
  • Apache : Web Server
  • MySql : Database
  • PHP (or PERL, Python etc) : Programming Language.

There are a number of methods for doing this but most use that I found required interaction at the command line which can be a bit daunting for new users (like me) and also turns the process into something of a Black Art. Coming from a Windows background I feel more comfortable with a graphical user interface (GUI). Having said that, when I initially installed the LAMP stack on my spare Hard Drive I had used the command line approach and all went well.

Of course I nver wrote the commands down so when it came to installing LAMP on my dual boot setup and had to Google it again but this time found a method for using for Installing LAMP using the Synaptic Package Manager. That’s more like it – a GUI approach. The link will take you to a page that refers to Ubuntu 7.10 but take my word for it that it does work on 8.10 as well.

Now that I have LAMP installed, I can have a go at installing Joomla which is going to be my playform of choice for CMS-type development.

Again, there are a number of resources detailing the installation of Joomla but I chose to follow the one in the Ubuntu Community Documentation. Now I know that this is a command line process but as Joomla is not in the repository so it has to be installed manually.

Following the process led to a fully functional installation although I did miss the command to delete the installation directory post-install but once I sorted that it was fine, all I have to do now is to work out how to use Joomla itself.

Dual Booting Vista and Ubuntu

In a previous post I stated that have installed Ubuntu 8.10 (Intrepid Ibex) alongside Vista on my Toshiba laptop but this was not as straightforward as I had hoped.
I had upgraded the laptop with a 160GB hard drive and Vista was reporting that there was about 90GB free. Great, I only want about 20-30GB for Ubuntu so I should have no problems at all – should I?

The problem is that when i installed Vista I clicked on the ‘Use Entire Drive’ option – which is what I wanted at the time. Now Vista has the ability to shrink a volume so I thought this would come to my rescue – I was wrong! Even though I had 90GB free the shrink tool would only reclaim about 200MB of it!

I initially suspected that the problem lay with Vista spreading itself across the available disk, i.e. there was some data at the far edge of the disk which was was acting as an outer marker. So surely a ‘quick’ defrag would sort that out – erm, no. Following the 3 hour defrag I ran the Shrink Tool again which now reported that I could reclaim …. absolutely nothing! Damn it!

So I would have to bite the bullet and repartition the drive. The problem was that I had experience of partitioning drives in the past and been burnt on a couple of occasions.

Well this time I had the Internet on my side and I was going to research the hell out of this before I put my system at risk of total destruction.

Well as it turned out I didn’t need to search too far before it became obvious that GParted was the tool of choice. I duly downloaded the .ISO and burnt it to a CD which I then booted my system from. I’ll not bore you with the details but the process was pretty straightforward you just had to make 100% certain that you are not about the destroy the main partition, i.e the one with Windows on it. I made absolutly certain and the partition was duly created.

So I had a new partition, separate from Vista, all I needed now was an operating system on it.

The Ubuntu installation was totally uneventful – a few simple selections and a few next buttons later and I was done. Again, make sure that you are installing on the right partition!

The end result is that when I boot up I get the GRUB bootloader where I can select whether I want to boot into Vista or Ubuntu. The default configuration is for the topmost item to be highlighted initially with a 10 second delay before it is automatically selected and the boot process commences. The problem (if you can call it that) is that the top item is Ubuntu – which may not be what you want, it certainly was not what I wanted at the time – mainly because my girlfriend uses the laptop and if it booted into something other than Vista while I was not around I would be in serious trouble!

Well there is a solution to this but it requires running a command at the Ubuntu command line.

If you want to set the default to be your Windows configuration just follow these steps:

  • Boot into Ubuntu
  • Open a Terminal session (which you’ll find in the Applications menu under Accessories)
  • Enter the following sudo gedit /boot/grub/menu.lst
  • Enter your password and press enter

gedit (which is a text editor similar to Notepad) will then open with the contents of the file displayed.

About a dozen lines down you will see a line that reads:

default 0

This is the value that needs to be changed but determining what number to enter is not obvious. The business end of the file is right at the bottom, this is where the options listed by grub are located. The two important things to remember are that the first option is numbered zero, not one and that the divider (which reads ‘Other Operating Systems’) should also be counted.
Basically you need to count, from zero, the lines that start with ‘title’ until you reach ‘Windows Vista/Longhorn (loader)’. This is the value you need to enter as the default.

Now while that works OK right now, when you install a new kernel (and you will) the list will increase in length and the next time you boot up you will see that the wrong option is selected. No big deal, just log into Ubuntu again, edit the file again and reboot. You can remove items from the list but I’d advise that leaving the new kernel and the previous one.

New Years Resolution 2008/9

Like many other people around the world I have made numerous New Years resolutions over the years and come March they are all but forgotten. Now I don’t smoke and I don’t drink (to excess anyway) but I do carry a few extra pounds around with me – and they have been there for a few years now despite numerous “I will eat less/better this year” resolutions. 

The fact of the matter is this; If you don’t want to do something, you won’t. Simple as that. So this year I thought that I would think of something that I would want to do (and not something that other people think I should do!) I currently work as a developer for a company using the Microsoft .NET 2.0 technologies and consider myself to be competant in VB.NET and C# for the development of ASP.NET applications. However, the technologies never stand still and I have still to look at the advances in .NET 3.5 such as LINQ so maybe I should resolve to dig into 3.5 even though the company does not yet implement it. I mean, I may not be working here forever and in the current climate it is wise to keep yourself as up to date as possible. 

Mind you, when i was looking for a new job recently (and found this one) there were a lot of vacancies for developers with experience in the Open Source languages such as Python, PHP, Perl etc. Now I have tinkered with Python and PHP in the past when I was at University but never carried on once I had graduated. I have also toyed around with Linux (mainly Red Hat) but never really put the time into it for it to become anything more than a bit of fun. 

So what if I could come up with some way of keeping my Microsoft knowledge upto date and add some of the Open Source skills as well? I cannot move from one side of the fence to the other but to climb up onto the fence so that I can see both sides. 

So, this is my resolution:

“I’ll devise some pet projects that will require the acquisition of new skills in the latest .NET Framework AND attempt to replicate the same functionality in an Open Source language.”

I have selected C# and Python as my Microsoft and Open Source options respectively for Desktop Based applications and ASP.NET(C#) and PHP for my Browser Based applications. I may change this in the future but it seems like a good place to start for now.