Installing a LAMP Stack on Ubuntu

I am using Ubuntu (Hardy Heron) as my primary desktop OS, and I wanted to install some tools for doing development work. At the same time, I thought I might run through the steps and post them for anyone else that might be looking to do the same thing. I’ll walk you through what I am doing, it’s your typical Linux Apache MySQL PHP (LAMP) stack.

First off, you can use sudo to run these install commands as your own local user, by putting sudo before each command, but I find it easier and more concise to simply use sudo to become root and install that way. I will write this article from that perspective, so if you don’t want to do this as root, simply put sudo before each command here.

You can become root by using this command from a terminal session:

sudo su -

Now that we are root, let us install MySQL which will be our database server:

apt-get install mysql-server

Next, let’s install Apache for our web server:

apt-get install apache2

In my case, I am developing in PHP, so we need to install PHP for Apache:

apt-get install php5 libapache2-mod-php5

Last but not least, if you want a nice database manager, get phpMyAdmin:

apt-get install phpmyadmin

If this is not a box that you have KVM (Keyboard, Video, Mouse) access to, and you will be connecting remotely, you will need to install the OpenSSH server so you can ssh into the server. Do this like so:

apt-get install openssh-server

Once installed, you should be able to log into the server with your user account. Please note that by default, you cannot log in as root via ssh. There you have it, now start writing some cool code!

Ubuntu Desktop Tricks

Anyone that saw how cool Beryl was on older Ubuntu releases will appreciate this.  It appears that Beryl has merged with Compiz and thus isn’t available for Ubuntu Hardy Heron (8.04) like you might be used to. That’s because it’s actually enabled by default!  If your system has an Nvidia card, and you have the “Restricted drivers” in use, you can right click on the desktop and choose “Change Desktop Backround”.  On the “Visual Effects” tab, you can enable the “Extra” settings.  This gives you some great effects for your windows and desktop by default, but what if you are like me and want more, especially to dig in and tweak it just the way you want it?  Glad you asked …

Pull up a command prompt and install the Advanced Desktop Effects Settings manager, after making sure you are fully up to date:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install compizconfig-settings-manager

Once complete, this should add the Advanced Desktop Effects Settings icon to the System -> Preferences menu.  Click that puppy and go crazy!  You can setup all kinds on nifty stuff now, enjoy.

Installing Skype on Ubuntu 64 bit AMD

Here is a tip for anyone like me that is running 64 bit Ubuntu on AMD processors and wanting to install Skype.  This is what I ran into recently and I found a solution so I wanted to share.  This is a one liner that will take care of it for you, or at least it did with me on 8.04 Hardy Heron.

sudo apt-get install ia32-libs lib32asound2 libasound2-plugins;
wget -O skype-install.deb http://www.skype.com/go/getskype-linux-ubuntu;
sudo dpkg -i --force-all skype-install.deb;

See? That’s all there is to it! This installs some supporting libraries as well as Skype itself. I broke this into multiple lines at the semicolons so it would display properly, but you can run it all as one big command or seperately. Enjoy!