Friday, October 30, 2009

Install Gnome Do from PPA in 9.10


I always like to have the latest and greatest of Gnome Do. This can be achieved by installing from their PPA. These instructions are for Ubuntu 9.10 Karmic Koala so they may not work with older versions. Follow the steps below if you want to install Gnome Do from PPA.
  1. Open System > Administration > Software Sources
  2. Click Other Software tab and then click the Add button.
  3. Add these two lines one by one.
deb http://ppa.launchpad.net/do-core/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu karmic main
  1. Click Close and then Reload. It will complain about a GPG error but we will fix that in the next steps.
  2. Open up a terminal and input these commands.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 77558DD0
sudo apt-get update
  1. Now you can install Gnome Do with this command.
sudo apt-get install gnome-do
Congratulations! You now will have the latest Gnome Do installed on your system. Now when the next release of Gnome Do happens you will get it right away instead of waiting for it to be put into mainstream.

Monday, August 24, 2009

Ubuntu Google Web Toolkit Setup


It's easy to get started with the Google Web Toolkit and Ubuntu 9.04. There are a couple of steps you will want to take to ensure a proper setup.
First let me start by mentioning that the easiest way to do this is to use Eclipse. Eclipse is a full-featured Java IDE. Many complain that it is too slow, crashes, etc. Since Google developed a plugin for Eclipse and most likely their software engineers are using it, I think it would be best to use it as well. Now on to the actual steps.
Get Eclipse Installed and Working
  1. Don't use synaptic to install Eclipse. If you already have it installed through synaptic that's okay, but you will have two versions of Eclipse on your computer.
  2. Download the latest copy of Eclipse at http://www.eclipse.org/downloads. Don't worry about all the different versions. Just download the Eclipse Classic at the bottom of the list.
  3. Extract to a directory on your hard drive. I happen to put all of my programs that I install manually in a folder, /home/username/Software. This helps me keep track of all my programs I've installed manually.
  4. You should be able to start Eclipse either through the command line (after you change to the directory) or by double-clicking eclipse inside of the folder.
Install Google Web Toolkit Plugin
  1. Start Eclipse if you haven't already.
  2. Help > Install new software...
  3. Click the add button. Put GWT Plugin for name and paste in for the url:

    http://dl.google.com/eclipse/plugin/3.5
  4. Check the boxes labeled Plugin and SDKs. 
  5. Follow through the wizard. You will have to agree to the license.
  6. Once you finish with that window you will want to restart Eclipse. After that you can begin working with GWT in Ubuntu.
This worked for me on 32bit and 64bit Ubuntu. Hopefully you will be able to start building your Google Web Toolkit applications in Ubuntu.

Monday, May 11, 2009

Upgrade Ubuntu Desktop from 8.10 to 9.04


Doing a distribution upgrade always makes me feel uncertain. I used to use another flavour of Linux that was very poor at upgrading. In fact, every time I tried to upgrade between versions it broke. I ended up doing a clean install every time there was a new version. Since switching to Ubuntu I have not had that problem, but I must be scarred from my previous experiences because I still get uneasy about upgrading. I have even waited to make sure that other people can do successful upgrades.

Ubuntu makes it dead simple to perform a distribution upgrade. All one really needs to do is to run update-manager. Generally this runs each time after you start up to check for upgrades but you may have disabled that. Once the program finds that there is a new distribution there is a button that can be pressed to perform a distribution upgrade. Even though the upgrade is seamless I suggest making a backup before you perform the upgrade. You should see some similar screens on your computer that I have posted here. You pretty much let it work and at the end it will want you to reboot.

If you have a successful reboot then the upgrade went fine. If you had some issues then you may want to check out the Ubuntu forums or try to google it.

Sunday, May 10, 2009

9.04 Ubuntu Netbook Remix

So I just got an Asus 1000HA and I just had to put the netbook version of Jaunty on it. This was actually very easy to do by way of this tutorial. Having such a portable computer has never been better.

Of course the default install is lacking as far as applications goes. Once I have all of the applications that I use installed, I'll give a run down of what I did after the installation. For now, I'm just happy that it installed just fine without having to do anything special.

Tuesday, April 21, 2009

Just 2 days left for Ubuntu 9.04

I have been pleasantly surprised with the improvements to Ubuntu. I have been using the Beta since its release on my computer at work. I have only experienced a couple of issues related to printing, but printing is not a huge issue for me. What have been your experiences with Ubuntu 9.04? What do you like, or not like? Leave a comment below.

Thursday, March 26, 2009

Passwordless SSH

So you have a bunch of Ubuntu servers and you use SSH to do administrative tasks on the machines. It is beginning to be a pain to always type the password each time you login to a server. You want a way where you can log straight in without having to type a password. That is where key authentication comes in. You can use a program to generate a public and private key for your computer. You can then distribute your public key to each of your servers and then your authentication will come from the keys and not from a password. Please read through these steps carefully and you can have these useful passwordless SSH logins.
  1. Install OpenSSH on your computer and all of the servers (You probably have done this already).
    sudo apt-get install openssh-server
  2. Generate your public and private keys. When it asks for a passphrase leave it empty.
    ssh-keygen -t rsa
  3. You now need to distribute your public key (~/.ssh/id_rsa.pub) to each servers .ssh/authorized_keys file. This can be done in several ways.
  4. If you have not made the authorized_keys file on the server you can do this:
    scp ~/.ssh/id_rsa.pub username@servername:.ssh/authorized_keys
  5. If you have other entires in the authorized_keys folder then you can use cut and paste between two text editors. Open ~/.ssh/id_rsa.pub in the text editor of your choice on your computer. Open a normal SSH session on the server and open the ~/.ssh/authorized_keys in nano, vi, or any other terminal text editor. Copy the text straight from the text editor on your computer to the terminal window. Make sure that it ends up as one line in the authorized_keys file.
WARNING: Not setting a password on your keys can pose a security risk. IF someone were to get your private key they could pose as YOUR computer and access the servers just like you do. Guard your private key with your life.

You can even set this for other users on the server as well as the root user. It is considered a bad practice to log in as root unless you are doing serious administrative tasks. If you run into problems after copying your public key onto your server, just simply move your keys out of your .ssh folder and then you can login to the server using your password to fix the issue. In that case make sure that your public key was all on one line.

Sunday, March 15, 2009

Installing Komodo Edit 5

Here is another useful tip for having a good development environment. Since there are many Integrated Development Environments on the market I have been going through each one to see what I like and don't like. I have tested many different IDEs available for PHP programming and I have come to like Komodo-Edit. This is the light (free) version of the Komodo IDE 5 program. Since this is not available via a repository let me show you how to install this into your Ubuntu system.
  1. Download the latest release for Linux by visiting this link (click the link that says download now).
  2. If you are using the gnome desktop you can right-click and select extract here or you can extract using the tar command.
    tar zxvf Komodo-Edit-5.0.3-2767-linux-libcpp6-x86.tar.gz
  3. Open up a terminal and move to that directory using cd. Mine is on my desktop so the command looks like this:
    cd Desktop/Komodo-Edit-5.0.3-2767-linux-libcpp6-x86/
  4. Now run:
    sh install.sh
  5. When you are asked where you would like to install it go ahead and type the directory to where it should be installed. Personally I put all custom installs into a folder called Software in my home directory:
    /home/myuser/Software/Komodo-Edit-5
  6. Once it finishes you still have one more step, inserting the executable into your PATH variable. This can be done with a simple command:
    sudo ln -s "/home/myuser/Software/Komodo-Edit-5/bin/komodo" /usr/local/bin/komodo
I have tested Komodo Edit on both x86 and x86_64 and it works fine even on the 64 bit system. If you get frustrated with other IDE setups go ahead and check out Komodo Edit, it may be your next best editor. By the way you can also edit Perl, Python, Ruby, Tcl, Javascript, CSS, XHTML, and some template languages besides PHP.

Tuesday, March 3, 2009

RAID 1 and Ubuntu Server 8.10

Since I have recently acquired another 80 GB drive I decided to put it to good use in one of my older computers. It already had an 80 GB drive and what better way to use two equal size hard drives than to set up a RAID 1 array. For some reason when I used to hear the word RAID I assumed that in order to set that up one would need to know a lot. In all reality, setting up a RAID 1 array was quite easy. Since this computer will be a back-up server to my other computers it is nice to know that even if one drive fails I won't lose my data.

I will assume that the reader knows the basics of installing the Ubuntu Server. First of all you will need to download the Server ISO and burn it to disk. Once you have that, the only other item you will need is a computer to test it out on that is ready to have a RAID 1 array put on it. In order for it to be ready it will need to have at least 2 drives of equal size. If you don't happen to have a physical computer you could set up a virtual host will two small drives of equal size. Either way you will need a system that you can do a fresh install of Ubuntu Server 8.10. The screenshots you will see will be from a virtual machine.

Initial Set-up and the /boot partition
  1. Proceed as normal through the installation steps until you get to the part where you need to partition your drive.
  2. Choose Manual
  3. We want to create these partitions: 100 MB for /boot; 256 MB for swap; the rest for /;
  4. Select the first hard drive.
  5. If it asks you to create an empty partition table choose "Yes."
  6. Repeat four and five for the other drive as well and now you should have something like this.
  7. Now we are going to make the partitions on each drive. Select the first drive to partition it's free space.
  8. Choose create a new partition.
  9. Enter 100 MB for its size.
  10. Choose Primary.
  11. Choose Beginning.
  12. Now select the Use as: option and change it to "physical volume for RAID." Also turn the bootable flag on. (This is going to be the /boot partition remember).
  13. Then choose "Done setting up the partition."
  14. Repeat 8 through 13 for the other drive as well.
Setting up the Swap partition
  1. Now we need to set up the swap partition. Select the "FREE SPACE" on the first drive.
  2. Choose Create a new Partition.
  3. Enter 256 MB for the size.
  4. Choose Primary.
  5. Choose Beginning.
  6. Select the Use as: option but this time choose "swap area."
  7. Select "Done setting up the partition"
  8. Repeat steps 2 through 7 for the other drive.
Setting up the / Partition
  1. You should have a similiar set-up as the screenshot below. We could break our root partition down into /home, /usr, /var, etc. I want this to be simple and easy to do. Once you can do this basic set-up you will know how to do the more elaborate.
  2. Choose the "FREE SPACE" on the first hard disk.
  3. Choose Create a new partition.
  4. Use the default value that is already supplied. In my case it is 8.2 GB. This will use the rest of the disk for the root partition.
  5. Choose primary.
  6. Now select the Use as: option and change it to "physical volume for RAID."
  7. Select "Done setting up the partition."
  8. Repeat steps 2 through 7 for other drive.
  9. You should have a similar screen as below. Go ahead and choose "Configure software RAID." (It's at the top)
Configuring Software RAID
  1. Your next screen will ask you if you are really sure about your partitioning. Choose "Yes."
  2. Now select "Create MD device."
  3. Choose "RAID1"
  4. Now it will ask you how many active devices for the RAID1 array. Since we only have two drives we will leave it at 2 and continue.
  5. Now it asks about spares. We don't have any so we will leave it at 0 and continue.
  6. Now we need to choose the two partitions that are going to mirror each other. In my example it will be /dev/sda1 and /dev/sdb1. Choose both using the space bar to select/deselect and then continue.
  7. That's it. You've created the MD device for the /boot partition. Repeat steps 2 through 6 but choose /dev/sda3 and /dev/sdb3 in the last step.
  8. Once you have created both MD devices you can select "Finish."
Last but not Least
  1. We still have to give those RAID1 devices a mount point and filesystem. Follow the steps below to do it.
  2. Select the partition under RAID1 device #0. Mine says "#1 98.6 MB"
  3. Select the Use as: option and choose Ext3 (or whichever one you want).
  4. Change the Mount point: to /boot
  5. Then you can select "Done setting up the partition."
  6. Now repeat steps 3 through 5 for RAID1 device #1, the 8.2 GB partition. This partition will be mounted to /, which is root.
  7. Once you have these partitions made you can select "Finish partitioning and write changes to disk"
  8. Before it makes the changes it gives a nice warning about destroying data. Choose "Yes" to write the changes to disk.
  9. You may get another screen warning about the kernel not being able to access the RAID devices. Just continue and the base system will install as normal.
Conclusion
That's really all it takes to set up a RAID1 array with two hard disks of the same size. Now you can know that if one of your drives were to fail you would still have all of the data because of the RAID1 array. Back-ups must still be made in the case of the failure of both of the drives. That's why I will use rsync and an external drive. Hope this is useful for everyone!

Tuesday, February 24, 2009

#!CrunchBang Linux

I have always loved to take different flavors of Ubuntu for a spin and recently I set up Crunchbang Linux on my Laptop. I'll post a screen shot of my desktop at the end. Aside from being based on Ubuntu the main thing with Crunchbang is that it is heavily based on using lightweight applications. Its main window manager is Openbox, but it also has gtk in there too. Since my laptop is getting older (nearly five years old now) it needs the lightweight applications.

Crunchbang was very easy to set-up. I had zero problems with the install. It is as simple as putting the CD into the drive and letting it boot up to a live environment. Once you are the live environment you can play around with it to see if you like it. If you want to install it you can use the right-click menu to install Crunchbang to your hard drive. I had just installed Windows XP Pro (needed for games/work) on my 60 GB drive. So then I installed Crunchbang after that and it easy dual boots between both. You can find Crunchbang here. The most recent edition is 8.10.2 and it is also the edition that I installed.

If you want something that is not heavy on your system resources or maybe you have an older laptop like mine give Crunchbang a try.

(Desktop photo from interfacelift.com)

Wednesday, January 21, 2009

Create a Static IP from the Command Line

Creating a static IP from the command line is a very short task. All you need to edit is one configuration file and restart the networking service. You will need to know the settings for your network to do this. I will show how to set a static IP of 192.168.0.101 on a network with a gateway of 192.168.0.1.
  1. Open the configuration file in your favorite editor (mine is nano)
    sudo nano /etc/network/interfaces
  2. Comment out the section where dhcp is being used (put the # in front of the line):
    #auto eth1
    #iface eth1 inet dhcp
  3. Add a section like this example:
    auto eth1
    iface eth1 inet static
    address 192.168.0.101
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
  4. Close and save the file
  5. Reload the network service:
    sudo /etc/network restart
  6. Check to make sure you can access other computers/internet by using ping:
    ping www.google.com
  7. If you don't get a response then you may have set your network information incorrectly. Just go back and repeat this process at step 3.
Make sure you have entered the correct information for YOUR network. Once you have the static IP set up properly you can then have your other computers access that computer through it's IP address.

Tuesday, January 20, 2009

Add extra storage on the fly with LVM2

Currently I am in the process of creating a file/print server for my home network. It's an older computer but I wanted to experiment with various set-ups and configurations. Two of my requirements were that I must be able to add extra storage on the fly and I must be able to see the two hard drives as one logical unit. The only way (at least that I know of) is to use LVM. I have used it in the past, but I never really needed so I usually did not pick it during the install. In fact my current Ubuntu desktop does not have LVM on it.

During my internet searches I came across this great article, A Beginners Guide to LVM. Read this all the way through and you should get a good grasp of the main commands of LVM. Since that article did not really explain how to what I wanted I had to adapt it to my needs. Here are the steps I used to get my 80GB Maxtor(sda) and 60GB Western Digital(sdb) to work together as one logical unit. I am also using ext3 as my filesystem because it supports on-line resizing.
  1. Fresh install of Ubuntu Server 8.10
  2. Run updates:
    sudo aptitude update && sudo aptitude safe-upgrade
  3. Reboot because of kernel upgrade
  4. Figure out what the extra hard drive is (mine is sdb):
    sudo fdisk -l
  5. Partition the hard drive as Linux LVM:
    sudo fdisk /dev/sdb
  6. Initialize partition for use by LVM (on my system sdb1 is swap):
    sudo pvcreate /dev/sdb2
  7. Display attributes of volume groups to find your group name (mine is ubuntu-server):
    sudo vgdisplay
  8. Add my physical volume to my volume group:
    sudo vgextend ubuntu-server /dev/sdb2
  9. Now extend the logical volume root to include the new physical volume:
    sudo lvextend -L128G /dev/ubuntu-server/root
  10. Lastly, resize the filesystem to include the new free space:
    sudo resize2fs /dev/ubuntu-server/root
After reading the beginners guide posted above I was able to go through these steps and add extra storage without unmounting the root parition. This is one of the features of ext3, but I do not know whether you can do that with other filesystems. Now I am able to use both drives to the fullest extent and when I want to add another drive it will be quite easy.

Thursday, January 15, 2009

Developing with NetBeans IDE

Programming is a hobby of mine and in recent days I have been testing out various IDEs (Integrated Development Environments). One such that I have really enjoyed using is the NetBeans IDE. One of the greatest features (at least in my opinion) is that no matter what OS I am using I can still be editing my programs with Netbeans. In my daily routines I will end up using Windows, Mac, and Linux so cross platform applications will always get a plus in my book. I also find that one of my greatest frustrations about programming is that most developers only create programs for a specific OS. Now, I understand why they do this (majority), but for people like me (minority) it is always a drawback to an application that only works in one OS. Enough ranting though lets get the latest NetBeans installed in your Ubuntu computer.
  1. Go to http://www.netbeans.org/downloads/index.html to download the version you want. Personally I chose the Java version but if you want Ruby, C++, or PHP you will want the All version. At the time of this writing the current version is 6.5 and my download was 208 MB.
  2. Wait for download to complete...
  3. Open a terminal and cd to the directory you saved it in. For me I saved it to my desktop so I typed in: cd Desktop/
  4. Now type: ./netbeans-6.5-ml-java-linux.sh (or whatever your version happens to be, use tab to autocomplete).
  5. If that doesn't work then it is possible that it needs the permission to execute. You could right-click>properties. Then under permissions check the box that says "Allow executing file as program" or you could type into command line: chmod +x ./
  6. You should see a screen much like the one above. Just follow the prompts and you will have NetBeans installed in no time.
Below is a screenshot of NetBeans right after opening it for the first time. Now all that needs to be done is some programming projects. Hope this is useful!