|
RootSmart.com Podcast|Rootsmart Podcast #40 9/10/06 Episode
Get It Now!
Contact Details:
Email: questions@rootsmart.com
Voicemail: (206) 734-4825
Skype: rootsmart
Vote for us at Podcast Alley
We are Back!
Content:
This will be the last podcast in our linux series
installing software on linux can be quite hard
it is generally the hardest part for windows users to get used to
over the years it has gotten much easier
we are going to go from hard to easy
to start we are going to compile
this is the way software has been installed on linux for quite a while
first we are going to need to download the source code
the source code is generally in what is called a "tarball"
these tarballs usually have a .tar.gz ending
the .tar section stands for Tape ARchive
it was from back in the days of tape backup
tar will bring a folder structure together into one file
the .gz part is GunZipped
tar might bring everything to together, but it doesn't compress anything
so the .gz part compresses the .tar part to make a compressed file
this made a ton of sense when on dial-up but it has now just become common practice
so we need to find the source code tarball
you can do this one of two ways
you can either go the projects main site
or you can do it how I do it and go to freshmeat.net
freshmeat is a search engine for linux projects
and on the project pages they have links to the source code as well as any other distribution methods
today we are going to use gaim as our example application
so head over to the gaim project page
Now we are going to download it through a command line utility
the command line utitlity is called wget
wget is a command line internet tool used to download files.
so you are going to need to get the url location of the tarball
this is pretty easy to do, you just have to go through one of sourceforge's mirrors
now the syntax for wget is wget url
so just type in wget and then the url of the tarball
now this will download the file to your current working directory
I usually try to download source code and other temporary things in my /tmp directory
that way it is all in one place
so now it will take a little time to download and you have this tarball
we need to extract the contents of this
initially you needed to use two different processes to extract tarball
gunzip would decompress the file, and then tar would actually extract it
since tarballs are so popular tar has the gunzip part built in
to extract an archive you are going to type tar xvzf tarball
replace tarball with the name of the .tar.gz file
you will see a long list of things
these are the files being extracted from the tarball
now you should have a folder in the directory called what the tarball was called without the .tar.gz
now you have the source code extracted
this is where it gets fun
so lets cd into that directory
most source code comes with a configure script
this does a lot of work for you
so lets assume that the configure script is there
if it isn't you will have to read through a lot of documentation to configure the make
so to run this configure script type ./configure
now a lot of things will happen
it checks many different things
the most important is it checks for gcc
gcc is the c compiler that is very popular
almost all of the distributions either have gcc already installed or a gcc package
make sure that you have gcc installed
when you do this configure script it might come up with an error
most of the time the errors from the configure script is a missing library
libraries are little pre done code samples that programmers use
to get those libraries you want to look through your package manager
if the library isn't in there, then you might have to download them and compile them
google will tell you your answers
so once you get a successful configure it will say that it is making some files
now you will notice that you have a new makefile in the directory
so now we need to do a make command
this make command will do the actual compiling
this will probably take the longest time to do
simply just type make
all kinds of these will go across your screen
when that is done everything is compiled
now that everything is compiled, you need to put it in the correct place
you don't need to do this manually
to move all of the correct files just type make install
this will move everything
now everything is installed
look through the documentation for the location of the executable
now you can remove the tarball and that source code folder
you know have that program installed from source
one of the biggest downfalls of compiling is trying to uninstall
there is no real good way to uninstall compiled applications
the only way to do it is to do a search for the application and then remove all of the files you find
the next way to install software is through a package manager
these days there are two main package managers
there is the Red Hat Package Manager and the Debian package manager
Red Hat Package Mangers are rpms and Debian packages are deb files
first we are going to look at rpms, then debs
operating systems such as fedora and suse use rpms
for package management they use there own tools
they still generally use the rpm program for command line tools that install a single package
there are two different ways to use the package mangers
one is to use a software such as yum for fedora
this will go out and look at a repository that someone maintains and then resolve any dependencies
then there is just single file install which is just using the rpm command
first download the rpm file
then you can install the file with a rpm -i file command
this will install, you can use the -u command if it is updating
now that will look for all of the dependencies it needs
if you don't have one it will alert you and it won't install
now the better way to do this is to use a tool like yum
yum is for fedora, yast is for suse
they generally have the same syntax
yum doesn't require you to download anything up front
you can use it by typing yum install app
it will then look at a repository that is managed by someone
it looks for the file and then if there are any dependencies that you don't have installed on your system, it will download those also
the deb system also has both a package manager and then a command line tool
to use the download command line tool download the .deb
then install it with dpkg -i package
that will install the file but not any dependencies
now I find they have the best repository manager called apt-get
apt-get works the same as yum
just type apt-get install package
this is the basics of installing
[ Tue, 12 Sep 2006 19:09:42 -0400 ]
|