Housebaked!

What's New :

The Quickest Introduction to CSS!

May 9, 2008

If you're new to CSS this is the place to start! Real life examples with complete descriptions and step-by-step instructions. read more

Pre-Planning a Website

Apr 21, 2008

Every person new to Web Development should have a peek at this article. In depth advice on the pre-planning of your website in six simple steps. read more

The Linux Guide - Update!

Apr 10, 2008

TLG has been updated after we've received contribution to the project. Thanks Hazel! read more

Win Friends and Make Them Think Like You

Apr 06, 2008

How can we change the way the people around us think? I explain just how human nature works and how we can all be happier. read more

My Weblog

Mar 29, 2008

Here's my Weblog for the little things which don’t fit here and is a place where I’ll enjoy myself rather than being too serious. Visit my Blog

How to install Software in Linux

Mar 18, 2008

I'm working on most of the other methods of installing software in Linux but for now I'll only cover installing from source-code.

You've probably downloaded a package with an extension of one of the following: tar.gz, tar.bz2 or zip. As a user from a previous OS you are most likely familiar with the zip extension but the other may seem archaic to you. They are archives that use either the gzip, bzip (tar.bz) or bzip2 compression and if you're on a modern, popular distribution of Linux you can right click the archive and extract it. Much like you would do on Windows.

I am going to cover extracting these from the shell however for the sake of it as it is just important basics. Simply navigate to the location where you downloaded the file, for example, if it's on your desktop you'd do cd (change directory) like this.

cd /home/<username>/Desktop/

Be sure to replace <username> with your own and obviously exclude the brackets. You may want to check if the file is present by prompting the shell with the ls command (list directory contents).

Extracting tar.gz.

tar -zxvf filename.tar.gz

And extracting from tar.bz2 all you need to do is change 'z' to 'j'.

tar -jxvf filename.tar.bz2

If the filename is long, type the first few characters thereof and press the 'TAB' key on your keyboard to auto-complete the line. The above command will create a folder that will contain the name of the original file. Change your working directory to the newly extracted directory with the cd command. Example:

cd My_package_filename/

Check again if your files are present within the new directory with the ls command, if there is an INSTALL file or a README file you might want to review their instructions with the more command. Issue as follows:

more INSTALL

Many packages have specific parameters to be used or just specific instructions on installing and compiling to be aware of. If nothing, you can now safely start the process of actually putting the program into place after configuring, compiling and installing.

./configure

This command checks whether you have the necessary requirements to run the software. If you encounter an error message be sure to check the package's documentation and search around forums in case the problem has been addressed before. It also creates a Makefile, the file that we will compile using the make utility. Before we can do this we need to change to the root user (administrator) with the su command (switch user).

su root

Enter the password when prompted. If all went well we can now compile.

make

Then:

make install

Assuming all went well, you will in most cases be able to run the application by just entering the name in the shell and hitting enter but in case that doesn't work, refer to the documentation of the program on launching the program.

Update

Mar 26, 2008

For those who can't remember all the tar arguments here's a little script that will do the work for you.

#!/bin/bash
# tar files and folders

NAME=$1
LOCATION=$2

if [[ -z $LOCATION ]]; then
      echo "tarer <compressed-name>.tgz </location/to/start>"
      echo " - use absolute location if planning restores."
      exit;
fi

tar -czpvf "$NAME".tgz "$LOCATION"