tutorial - HowTo install software from Source Code

We usually download linux programs through package handling tools such as yum and apt-get. Download programs through package handling tools is easy, but not all programs is available in your Linux distribution repository. Sometimes, we need to download the source code, compile and install manually.

Usually, source code are compress in the archive format, its either tar.gz (.tgz) or bz2. The command uses to extract these archive is tar. Let say your archive is xyz2.29.tar.gz, then you can decompress it and extract to your folder like this

tar -xzvf xyz2.29.tar.gz -C /usr/src

-C is to indicate tar where to store the extracted files, you can extract the source code any place you like, such as home directory.

Before you start configure and install, please always read the readme files tag alone with tarball, it will sometimes brief you the specific steps to install the programs and also the requirements to fulfill before compile the source code.

Common open source programs source code comes with configure files and makefiles. Because those programs usually are cross platform compatible. That means it can be compile in different platform such as Unix, Linux, BSD etc, given the required library installed and the dependencies solved. Therefore, before start to compile and install, you usually need to configure.

./configure

Configure scripts will check whether all the libraries and dependency files are there or not. If it is not there it will pause and indicate you what is missing. At this moment, you need to search for the lib and install that before you can continue to configure.

Sometimes, the libraries are install, just the lib location are not the same as specified in config file, a good configure script, will have allow you to set some option, such as alternatives lib path, prefix of where you want to install the programs to. Display the options, you do this.

./configure --help

When it is done, now you can compile your source code. To compile all the source code and produce the binaries, you do this

make

Some packages contain more than one programs, do

make all

To compile all and turn all into binaries.
The last steps, is to install, usually you need root privilege to install packages.

sudo make install

Some of the makefiles have other options such as uninstall, clean etc. So to uninstall, you can do this:

sudo make uninstall

What make install do is just copy the binaries created to specified path, and uninstall is just remove them from the specified directories. Makefiles and configure scripts sometimes might be vary, sometimes the tarball will tag alone with friendly script with names “runme.sh”. You just need to run the run me script, It will configure, make and install for you.


Free, facebook, tips, Links, blogging, Downloads, Google, facebookTips, money, news, apps, Social, Media, Website, Tricks, games, Android, software, PIctures, Internet, Security, Web, codes, Review, bloggers, SAMSUNG, Worldwide, Contest, Exitic, Phones, facebookTricks, hacking, London, Olympics, SEO, Youtube, iOS, Adsense, gadgets, iPHONE, widgets, Doodle, twitter, video, Deals, technology, Aircel, Airtel, iPAD, Angry, Birds, BSNL, TechLife, GMAIL, Idea, Microsoft, SmartPhones, Stress, Buster, Windows, Yahoo, Infolinks, Nokia, Scam, Uninor, browsers, Amazon, Euro, CUP, Chat, IDM, JOBS, Modem, Music, Reliance, Results, SSC, Tata, Docomo, bing, freebie, mobile, placements, AIEEE, AlertPay, Chrome, College, Competetive, Exam, Dehradun, Extension, FireFox, GPRS, HTC, IMPACT, Info, MTS, Mark, Zukerberg, Paypal, Promotional, Post, Torrent, UTU, Unlocking, VodaFone, Wall, Paper, apple, books, engineering, iCAR, iTunes, pinterest, rovio, AVG, Admit, Card, Adobe, Affiliate, Marketing, Akhilesh, Amul, Girl, BlackBerry, ChromeBook, Clixsense, Coupon, Digitallife, Discovery, Emoticons, Festival, GATE, GIMP, Income, Tax, International, JSS, JailBreaking, Kindle, Linux, Local, MAX, PAYNE, Mac, Mango, Memory, Speed, Nexus, Online, Shopping, Raakhi, Report, Rising, Stars, Sample, Science, Sony, Syllabus, TabletBooK, Teamviewer, Templates, Dark, Knight, Rises, USA, UPMT, Virgin, Xperia, ZTE, challan, counselling, course, btech, funny, iMOVE, registration

source:http://linuxpoison.blogspot.com/2008/02/13578175802849.html