software installation
Post on 25-Jan-2016
75 Views
Preview:
DESCRIPTION
TRANSCRIPT
Software installation
Chapter 7
Software installation
• Numerous software options• Usually free
• Open source
• Several sources• Installation CD
• Websites• sourceforge.net
• freshmeat.net
• Software update
Software installation
• Installation options• Package system
• apt, rpm, dpkg, etc.
• depends on the distribution
• Download binary file
• Download source files, compile
• Easiest to use: package system• not all software will have package file for every
distribution
• same goes for binary files
• May need to compile the source to install• Similar to installing/upgrading kernel
Using RPM
• RPM (RedHat Package Manager)
• Automates install/upgrade/uninstall of software
• Keeps track of individual software files• Maintains dependencies (pre-requisite software)
• To install • rpm -ivh software-file.rpm
• Will complain about dependencies if not available
• To upgrade• rpm -Uvh software-file.rpm
• To remove• rpm -e software
• To query• rpm -q software
Using apt
• Similar to RPM in many ways
• Much more convenient• Software installs with less errors usually
• Automatically downloads and installs from repositories
• Keeps track of dependencies and installs required ones
• Repositories• sources of available software
• Internet
• CD
• Local
• Easiest to use apt with Synaptic front-end
Using apt
• Requires sudo previliges for most tasks
• To update the list of software from repositories• sudo apt-get update
• To upgrade all available software• sudo apt-get upgrade
• To install a software• sudo apt-get install software_name
• apt downloads and installs software and dependencies from repositories
• To search for software in repositories• sudo apt-cache search gedit
• To look for information on a particular software• sudo apt-cache show gedit
Using Synaptic
• GUI front-end to apt
• Easy to use and configure apt with Synaptic
• Install apt first with Synaptic
• Available under System>Administration
• Can edit and add repositories
Archive and Compression Utilities
• Crucial tools for software installation from source
• Archiving• Pack many files into a single file; easily transferred
• tar
• Compression• reduce the size of a file or set of files
• compress
• gzip
• Usually archive and compression used together• archive several files into one
• then compress the file
gzip
• Powerful compression utility
• Working• Compress a file, big_file
• save compressed file as big_file.gz
• remove original file
• Amount of compression depends on the kind of file• For eg., JPEG or PNG images are already
compressed
• To find out how much compression was done:
• gzip -l big_file.gz
• To get original file back:• gunzip big_file.gz
Using tar• tar is for archiving
• packing many files into a single file
• preserves ownerships, links, directory structure
• Options:
• To archive two files a.txt and b.txt into arch.tar:• tar cvf arch.tar a.txt b.txt
• To archive a directory temp into temp.tar• tar cvf temp.tar temp
c create a new archivex extract files from archivet list contents of archiver append to archivef filename of archivev verbose
Using tar
• To extract an archive mt.tar• tar xvf mt.tar
• To view the contents of the archive• tar tvf mt.tar
• Using with gzip• use the z option when compressing into a gzip file
• To archive & compress a.txt and b.txt into f.tar.gz• tar cvzf f.tar.gz a.txt b.txt
• To extract the above compressed archive• tar xvzf f.tar.gz
• To view the contents• tar tvzf f.tar.gz
Installing/Upgrading software the hard way
• rpm and apt packges of a software may not always be available
• Use the latest release of the software• Source
• Binary
• Available as compressed files
• Binary• Extract the files, which contain the necessary
programs
• Make sure the extracted program is in the PATH
• Source• Extract the files, compile and install the program
Installing from source
• Hardest way to install a program
• Necessary for installing latest version of the software
• May require root privileges
• Usual steps• Download the required tar compressed file
• Extract the files using tar
• Run it’s configuration program (usually ./configure)
• Run make for compiling
• Run make install (usually with sudo) for installation
• Cleaning (optional): make clean
• May run into problems!• shared libraries
• compiling problems
top related