12. Telepítés, frissítés fénysebességgel, az apt-get segítségével (Redhat, Debian, Suse, Mandrake, egyéb)

Automatizálható a Linux rendszer karbantartása egy olyan használható segédprogrammal, mint az apt-get. Az apt-get roppant hatékony, világszerte milliónyi linuxos gépen használják. Az apt-get RedHat és Debian Linux alapokon működik. Az RPM és Deb csomagokat támogató disztribúciókon használható. A disztribúciók legtöbbjén használható; ha mégsem, nagyon könnyen átszabhatod a forráskódját. A Mandrake-ben használt eszköznek urpmi a neve.

Többet szeretnél tudni az apt-get parancsról? Csak nézd meg a súgóját a következő bash shell-ben kiadott paranccsal:

		$ apt-get -h  | more
			  
		apt 0.5.5cnc6 for linux i386 compiled on Jul 19 2003 21:23:24
		Usage: apt-get [options] command
			   apt-get [options] install|remove pkg1 [pkg2 ...]
			   apt-get [options] source pkg1 [pkg2 ...]
			  
		apt-get is a simple command line interface for downloading and
		installing packages. The most frequently used commands are update
		and install.
			  
		Commands:
		   update - Retrieve new lists of packages
		   upgrade - Perform an upgrade
		   install - Install new packages (pkg is libc6 not libc6.rpm)
		   remove - Remove packages
		   source - Download source archives
		   build-dep - Configure build-dependencies for source packages
		   dist-upgrade - Distribution upgrade, see apt-get(8)
		   clean - Erase downloaded archive files
		   autoclean - Erase old downloaded archive files
		   check - Verify that there are no broken dependencies
			  
		Options:
		  -h  This help text.
		  -q  Loggable output - no progress indicator
		  -qq No output except for errors
		  -d  Download only - do NOT install or unpack archives
		  -s  No-act. Perform ordering simulation
		  -y  Assume Yes to all queries and do not prompt
		  -f  Attempt to continue if the integrity check fails
		  -m  Attempt to continue if archives are unlocatable
		  -u  Show a list of upgraded packages as well
		  -b  Build the source package after fetching it
		  -D  When removing packages, remove dependencies as possible
		  -c=? Read this configuration file
		  -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp
		See the apt-get(8), sources.list(5) and apt.conf(5) manual
		pages for more information and options.
							   This APT has Super Cow Powers.
	  

A kézikönyv oldal a következő módon tekinthető meg:

			man apt-get
	  In the bottom of manual page, look at "See Also" section
			man apt.conf
			man apt-cache
			man apt-cdrom
	  

Egy példa az apt-get használatára:

			apt-get -f  upgrade postgresql-contrib
			apt-get  upgrade postgresql-contrib
			apt-get  install postgresql-contrib
			apt-get  install gaim
			apt-get dist-upgrade
		

12.1. Az "apt-get" forráskódja

Letöltheted és újrafordíthatod az apt-get forráskódját a saját terjesztésedhez. Az apt-get forráskódja letölthető a http://ftp.freshrpms.net/pub/freshrpms/redhat/9/apt honlapról.

12.2. Az "rpmfind" segédprogram

Az apt-get programtól függetlenül az rpmfind is használható a RedHat-ban. Az rpmfind néhány dologban hasonlít az apt-get segédprogramra. Látogass el az rpmfind honlapjára: http://rpmfind.net/linux/rpmfind . Az rpmfind egy olyan segédprogram, amely megkeresi, telepíti és önműködően frissíti a helyi gépeden lévő RPM fájlokat. Az rpmfind webhelyét megtalálod a http://rpmfind.net címen.