Monday, June 12, 2006

Linux : Installing Packages .... common procedure

This post is for novices who are scared of building/installing new packages on linux :-) Here are the steps.

  1. Download the package. It's normally a .tar.gz file. It could be in some other format like bz2 as well.
  2. Extract it with tar -zxvf package.tar.gz (for .tar.gz files)
  3. Change to the newly created directory with this extraction
  4. Read README files (good practice)
  5. Run on prompt
    ./confgure
  6. then
    make
  7. Become root if you have not already. Default location of installation of almost all new packages is /usr/local so you need write permission to create any new files there.
  8. issue
    make install
You can install packages in other locations by using --prefix=/path/where/you/want/to/install option to ./configure. Learn more about options by using --help (normally) switch of ./configure scripts. All configure scripts may not present you with nice help.

No comments: