installing softwares in linux
Results 1 to 10 of 10

Thread: installing softwares in linux

  1. #1

    installing softwares in linux

    Well friends, generally when users from the Windows background enter the Linux arena, they find installation very difficulty. They are used to the luxury of double clicking on a setup file and getting their software installed. But this is not so in linux, though exceptions are there like when i tried to install, Quake 3, Unreal Tournament the process was quite automatic after a few commands, same with GIMP, when u try to use it for the first time. I have came across many such softwares. Installation of Java VM is also a good example of automatic installation, these files are distributed as .bin files. But even then this is not very common.

    Though the installation instructions tell us what to do, we have no idea what these steps actually do.

    These days most of applications are distributed as RPMs(RedHat Package Manager, by RedHat). Other format is .deb (by Debian Linux). If u need to install .deb application u can use , Alien, to covert .deb to .rpm. These two are widely known formats. Installing RPM is a simple task. I have places a E-Book MaximunRPM (in parts) , file size n file extension constraints on me, u can understand. You will need WinRAR to join these two parts of the file. For persons who are Mandrake fans like me, instead of using rpm command u can use urpmi, and advanced version of rpm by Mandrake for its users, or the graphical package manager. Installing RPMs under Mandrake is breeze.

    Other method of distributing applications is through zipped format known as tarball(.tar) then gunzipped using gzip or gunzip (.gz). Actually .gz and .tar or .tar.gz or .tgz are just compressed formats. After unzipping the files, installtion is a matter of three commands in series (configure, make & make install). Now details about this format follows:

    Details :

    Generally you would get Linux software in the tarball format (.tgz, .tar.gz) This file has to be uncompressed into any directory using tar command. In case you download a new tarball by the name nav.tgz, then you would have to type the following command

    $ tar xfvz nav.tgz or alternatively

    $ gzip -dc nav.tgz |tar -xvf

    From this command it must become clear that that these files are first get compressed using tar and then zipped using gzip or gunzip.

    Execution of this command would create a directory within the current directory and unzip all the files within that new directory. Once this is complete the installation instructions ask you to execute the 3 (now famous) commands : configure, make & make install. Most of the us do this and successfully install their softwares. But most of the us have no idea what this really does.

    Each software comes with a few files which are solely for the purpose of installation sake. One of them is the configure script. The user has to run the following command at the prompt

    $ ./configure

    This file is shell script.The above command makes the shell run the script named ' configure ' which exists in the current directory. The configure script basically consists of many lines which are used to check some details about the machine on which the software is going to be installed. This script checks for lots of dependencies on your system. For the particular software to work properly, it may be requiring a lot of things to be existing on your machine already. When you run the configure script you would see a lot of output on the screen , each being some sort of question and a respective yes/no as the reply. If any of the major requirements are missing on your system, the configure script would exit and you cannot proceed with the installation, until you get those required things.

    The main job of the configure script is to create a ' Makefile ' . This is a very important file for the installation process. Depending on the results of the tests (checks) that the configure script performed it would write down the various steps that need to be taken (while compiling the software) in the file named Makefile.

    If you get no errors and the configure script runs successfully (if there is any error the last few lines of the output would glaringly be stating the error) then you can proceed with the next command which is

    $ make

    ' make ' is actually a utility which exists on almost all Unix systems. For make utility to work it requires a file named Makefile in the same directory in which you run make. As we have seen the configure script's main job was to create a file named Makefile to be used with make utility. (Sometimes the Makefile is named as makefile also, dont get fooled here linux is case senmsitive so Make and make are different)

    make would use the directions present in the Makefile and proceed with the installation. The Makefile indicates the sequence, that Linux must follow to build various components / sub-programs of your software. The sequence depends on the way the software is designed as well as many other factors.

    The Makefile actually has a lot of labels (sort of names for different sections). Hence depending on what needs to be done the control would be passed to the different sections within the Makefile Or it is possible that at the end of one of the section there is a command to go to some next section.

    Basically the make utility compiles all your program code and creates the executables. For particular section of the program to complete might require some other part of the code already ready, this is what the Makefile does. It sets the sequence for the events so that your program does not complain about missing dependencies.

    One of the labels present in the Makefile happens to be named ' install ' .

    If make ran successfully then you are almost done with the installation. Only the last step remains which is

    $ make install

    As indicated before make uses the file named Makefile in the same directory. When you run make without any parameters, the instruction in the Makefile begin executing from the start and as per the rules defined within the Makefile (particular sections of the code may execute after one another..thats why labels are used..to jump from one section to another). But when you run make with install as the parameter, the make utility searches for a label named install within the Makefile, and executes only that section of the Makefile.

    The install section happens to be only a part where the executables and other required files created during the last step (i.e. make) are copied into the required final directories on your machine. E.g. the executable that the user runs may be copied to the /usr/local/bin so that all users are able to run the software. Similarly all the other files are also copied to the standard directories in Linux. Remember that when you ran make, all the executables were created in the temporary directory where you had unzipped your original tarball. So when you run make install, these executables are copied to the final directories.

    Thats it !! If u find something contradicting or u record a wrong fact or there is any error, please inform me about that. I can be reached at:

  2. #2
    Junior Member
    Join Date
    Apr 2003
    Posts
    12

    Cool

    very thorough explanation. thank you.

  3. #3
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  4. #4

    source of my tutorial

    thanx for the source MsMittens

    i dont claim that i have written the original tutorial.........but then this is not copy n paste...
    i got it from somewhere and i stored on my local disk and dint had source to quote.but definately i have edited it a lot as it should have been original page dint had anything related to bin files.

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Location
    Texas
    Posts
    168
    hmmm... If your gonna talk about installing software in linux, why leave out how to install rpm's and debian packages?
    Seems to me that your missing half the info.
    Both rpm and debian packages can be installed through the cli or through gui applications such as gnome's gnorpm. I will not discuss those, because of the simplicity of point and click installs.

    The basic syntax for installing a rpm in cli is as follows:
    rpm -i [install-options] <package_file>
    The basic syntax for installing a debian package in cli is as follows:
    dpkg -i [install-options] <package_file>
    <chsh> I've read more interesting technical discussion on the wall of a public bathroom than I have at AO at times

  6. #6
    The Recidivist
    Join Date
    Nov 2002
    Posts
    460
    REgardless of the source. This file was very much needed. I have been looking for something like this for about a week. I appreciate this and hope there will be some other newbie-friendly tuts. Like this one concerning linux.

    thnx

    hjack
    "Where the tree of knowledge stands, there is always paradise": thus speak the oldest and the youngest serpents.
    - Friedrich Nietzsche

  7. #7
    AO BOFH: Luser Abuser BModeratorFH gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    Hey Hjack, did you ever think to look here:

    http://www.antionline.com/showthread...hreadid=234379

    Its not like this subject was never covered here and i think rewand did a hell of a lot better of a job writing his tutorial.

    just my opinion.
    Kill the lights, let the candles burn behind the pumpkins’ mischievous grins, and let the skeletons dance. For one thing is certain, The Misfits have returned and once again everyday is Halloween.The Misfits FreeBSD
    Cannibal Holocaust
    SuSE Linux
    Slackware Linux

  8. #8
    I am still new to Red Hat Linux. I find that it is boring compared to Win XP. Any pro Linux enthusiast/fanatic that could teach me how to install Real Player? I dowloaded it recently but I do not know how to install it. Wihout Real Player & Win Media Player, life online is boring because I could not listen to the radio or visit Yahoo Launch.

  9. #9
    Senior Member
    Join Date
    Mar 2003
    Posts
    245
    Good post on compiling/installing software from source.....

    A few additions to your post if I may:

    You may come across files that have and extension .tar.bz2, these can be decompressed and extracted in one
    command with....

    $ tar -jxvf cool-software.tar.bz2

    These are becoming more and more popular because they are almost twice as small as a .tar.gz compressed
    tarball in most cases.

    Another format that you may come across is one with the extension .tar.Z, these are compressed with 'compress'
    (or ncompress) and can be extracted like this..

    $ uncompress neat-app.tar.Z | tar -xvf

    Also becoming more popular is the .rar format (which many windows users have heard of before I assume), these
    do require the 'rar' and 'unrar' packages be installed on your system, but many current Linux Distro's come with these
    already, although they may not be installed by default. Decompressing these is done with....

    $ unrar nifty-thingy.rar

    ----------------------------------

    There are also some additional things that may make life a little easier for you to know (if you don't already )....

    During the 'configure' stage of software compilation you can specify quite a few parameters to configure which
    alter or customize the way in which the program will be compiled and installed. The most useful in most cases is
    to specify the location of installation....

    $ ./configure --prefix=/usr/local

    The reason: It is generally a good idea to make /usr/local it's own partition, and install all sofware that did not come with your
    system there. In most cases you can then install a new Linux distro (or upgrade an existing one) and have all your custom
    built stuff safe and sound (because you did not format the /usr/local/ partition). This can be a real time saver if you are rebuilding a system with a lot of custom software and configurations. (NOTE: these packages may have to be reinstalled
    anyway if your system changes enough that dependent libraries are no longer present, this is less common though nowadays).

    Finding installed software with rpm is one of the most useful things about rpm in my own very humble opion. To find a package, and see what version you have etc.. you can do...

    $ rpm -qa | grep ^cool-package

    RPM has a ton of useful options like this, and it will serve you greatly to read and familiarize yourself with it's abilities.

    Parting Note: It is a VERY bad idea to issue an 'rpm -Uvh' command on a kernel package, don't do it!

    UNIX/Linux is soooooo much fun
    Get OpenSolaris http://www.opensolaris.org/

  10. #10
    rebmeM roineS enilnOitnA steve.milner's Avatar
    Join Date
    Jul 2003
    Posts
    1,018
    Own up - Who bumped this thread - I want to know.

    Steve
    IT, e-commerce, Retail, Programme & Project Management, EPoS, Supply Chain and Logistic Services. Yorkshire. http://www.bigi.uk.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •