LAMP Installation On Ubuntu-Easiest method

For noobs, LAMP stands for Linux Apache MySQL PHP. If you don’t know what LAMP stands for, you probably have no business installing a LAMP server anyways. Installing LAMP on Ubuntu is pretty simple, you just need to install Apache, MySQL and PHP. I know there are many tutorials on how you can do a LAMP server install on your Ubuntu installation but most of them have long steps explaining how you should install and configure each part. This post is meant to tell you the easiest way to install a LAMP server.

If you are using Ubuntu(or any Debian based Linux distro), installing LAMP is easier than you can imagine. Just open a terminal and run-

sudo tasksel

This should show you a list of prefined software collections. Just select LAMP server and select OK. That’s it. Just sit back and relax while your LAMP server is being installed 🙂

Dell Studio Screen Brightness Control Problem in Ubuntu-Part 2

This post is Part 2 of the Dell Studio Screen Brightness Control Problem in Ubuntu. In that post, I mentioned how you can solve this issue by making an edit in the /boot/grub/menu.lst file. But recently, I upgraded my bootlaoder to GRUB 2. Many people would eventually do so in the near future. As I’ve mentioned in that post, editing GRUB 2 files isn’t as straightforward as editing menu.lst.

Here’s a simple solution to get your Dell Studio brightness control buttons working if you are using GRUB 2-

1.Edit the GRUB 2 default options file by running the following in a terminal

sudo gedit /etc/default/grub

2.Look for the line-

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

and change it to-

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash noapic”

3.Now update GRUB by running-

sudo update-grub

4.Reboot your laptop. Your brightness buttons should work perfectly fine now.

Basically, you’ve made the same edit to the GRUB configuration file here too but the method to do it with GRUB 2 is slightly different.

First experiences with GRUB 2

Not very recently, I decided to upgrade my bootloader from GRUB to GRUB 2. The reason I tried doing this was-

Ubuntu 9.10 Karmic Koala is just about to be released. It uses GRUB 2 as the bootloader by default. Although when you upgrade from Jaunty to Karmic, your bootloader won’t be upgraded, curiosity can be tough to handle at times. I feel confident that I know my way around GRUB (and trust the great community support) and can handle any bootloader related problems so I decided to go for the upgrade. Here’s a warning before you try doing anything with your bootloader, upgrading a bootloader is risky and can get messed up at times.

This post is specific to Ubuntu, and some of the parts are specific to Ubuntu 9.04 and later versions.

Installing GRUB 2

It is suggested that you test GRUB 2 before replacing your GRUB installation completely with GRUB 2. You can test GRUB to by installing it as a chainloaded sub-bootloader if you are using Ubuntu 9.04. To get started with testing and installation, open a terminal and run this command-

sudo apt-get install grub-pc

Select “Yes” at the “Chainload from menu.lst” prompt and at the “Linux command line:” prompt just press enter. This should install GRUB 2 and modify menu.lst accordingly.
If you are using Ubuntu Jaunty, you will face a bug which modifies the menu.lst incorrectly. So most probably you will face a problem when you try to boot using GRUB 2 chainloaded. To correct this problem, when the GRUB menu appears, at the “Chainload into Grub 2” menu item, press ‘e’ to edit the configuration. Press ‘e’ a second time to edit the top boot line and change:

root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

to

uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

press Enter after making the change and press b to boot GRUB 2. If everything goes fine, you should be able to boot using GRUB 2 and you are ready to replace GRUB completely by GRUB 2 as the main bootloader. To do that, use the command-

sudo upgrade-from-grub-legacy

IMPORTANT: Make sure that you hit the space bar to select /dev/sda when it asks you the location where grub needs to be installed. If you hit enter on this screen it will not install grub on /dev/sda and your system will not boot.

For any other kind of troubleshooting related to GRUB 2 problems, you can check out this Ubuntu wiki page.

Editing the GRUB 2 Menu

After I installed GRUB 2, I started taking a look around its files. Editing the GRUB menu was really simple. You just needed to edit the /boot/grub/menu.lst file. GRUB 2 is a bit different in this regard. The GRUB 2 configuration file is /boot/grub/grub.cfg. This file is not supposed to be edited directly. It is an automatically generated file. You can actually make out from the comments what part of grub.cfg is generated by which file. The files that are used to generate the grub.cfg file are those located in the /etc/grub.d folder and the /etc/default/grub file. Editing these files isn’t as simple as editing menu.lst. You need to have some programming knowledge to understand these files. But you don’t need to worry, I’ll be posting ways to implement some common menu.lst edits in grub.cfg using the GRUB 2 files in some other posts.

My first experience of working with GRUB 2 was fun. Had a good time experimenting with stuff. You can also experiment a bit but always remember to keep backups before editing any file and playing around with your bootloader can be dangerous and is not recommended.

Dell Studio Screen Brightness Control Problem in Ubuntu

When I installed Ubuntu on my Dell Studio 1555, I faced more than one problem. I forgot to mention about this issue in my last post. In Ubuntu, the brightness control buttons of my laptop refused to work. They worked for the first 30 seconds or so after startup and after that the brightness and wireless buttons refused to work. The brightness slider too was unable to control the screen brightness. Brightness control is a very important feature and its something you can’t live without if your laptop runs on battery power very often.

As usual, the reason I’m writing this post is because I did find a solution to the issue and managed to get the buttons working. Here’s the simple solution-

1.Edit the GRUB menu.lst file by running the following code in the terminal

sudo gedit /boot/grub/menu.lst

2.Look for the line

# defoptions=quiet splash

and change it to

# defoptions=quiet splash noapic

Save the file and close the text editor.
3.Now update grub by running-

sudo update-grub

4.Reboot your laptop. Your brightness buttons should work perfectly fine now.

The GNOME Power Manager offers quite a bit of configuration but at times you feel the need for some more configuration options. You can make those customizations by editing a few keys in the GNOME Configuration Editor. Be careful, you should edit a key only if you are sure about what you are doing. To open the configuration editor, run ‘gconf-editor’ in the terminal. The GNOME Power Manager keys can be found under /apps/gnome-power-manager. You can control settings like how much the brightness is reduced when on battery power and actions to perform under various circumstances. This way you can make more customizations than the GUI offers.

Note: This method will only work with the GRUB legacy bootloader. If you are using GRUB 2, wich is very likely after the release of Ubuntu 9.10 Karmic Koala, you should have a look at part 2 of this post- Dell Studio Screen Brightness Control Problem in Ubuntu-Part 2