<section id="managing">
	<title>Managing packages</title>
	<para>
		Installing, uninstalling and upgrading programs is one of the
		most fundamental tasks in system administration. Automating these
		tasks gives and incredible boost in quality and efficiency of 
		system management.
	</para>

	<section id="managing-rpm">
		<title>RPM</title>
		<para>
			Under Open Source systems most programs need other programs
			and/or libraries to 
			work properly (or to work at all :-). Keeping track of those
			dependencies would be a real pain in the ass for most
			administrators.	Fortunately there are tools that can not only
			automate this task but also help you in instaling, uninstaling and
			upgrading packages. In PLD the system of choice is 
			<emphasis>RPM</emphasis> - the RPM Packet Manager. Originaly
			developed for the Red Hat Linux Distribution
			the RPM has been widely adopted and is currently the most
			popular (and powerful) packet management software available.
		</para>

		<para>
			Installation is rather trivial. Let's say we have downloaded a
			package named <filename>docbook-dtd31-sgml-1.0-12.noarch.rpm</filename>.
			Now all we have to do is to run <command>rpm</command> with the
			<emphasis>-i</emphasis> switch.
			
			<programlisting>
[root@home /]# rpm -i docbook-dtd31-sgml-1.0-12.noarch.rpm
[root@home /]#
			</programlisting>
			
			No warnings or errors. Everything went well. Now something a little
			more complicated.
			
			<programlisting>
[root@home /]# rpm -i libghttp-devel-1.0.9-4.i686.rpm
error: failed dependencies:
		libghttp = 1.0.9 is needed by libghttp-devel-1.0.9-4
			</programlisting>
	
			This time the installation failed because libghttp-devel 
			requires libghttp to be already present in the system.
			
			<programlisting>
[root@home /]# rpm -i libghttp-devel-1.0.9-4.i686.rpm libghttp-1.0.9-4.i686.rpm
[root@home /]#
			</programlisting>
			
			Now it's ok. All dependencies satisfied and both packages got
			installed.
		</para>

		<para>
			Upgrading packages is done analogicaly as installing them but
			you should use the <emphasis>-U</emphasis> switch. Like so:

			<programlisting>
[root@home /]# rpm -U docbook-dtd31-sgml-1.0-13.noarch.rpm
[root@home /]#
			</programlisting>

			Remember that if you want to upgrade a package you've got to 
			have a previous version already installed.
				
			
		</para>

		<para>
			We successfully installed a couple of packages. Now let's try to
			uninstall them. The appropriate swith is <emphasis>-e</emphasis>.
			<programlisting>
[root@home /]# rpm -e libghttp-devel-1.0.9-4.i686.rpm libghttp-1.0.9-4.i686.rpm
error: package libghttp-devel-1.0.9-4.i686.rpm is not installed
error: package libghttp-1.0.9-4.i686.rpm is not installed
			</programlisting>
			Whoops. What's wrong? One thing to remember when removing
			packages is that you should provide the name of the package and
			maybe it's version but not the extension the file containing
			the package has. The correct way is either:

			<programlisting>
[root@home /]# rpm -e libghttp-devel libghttp
[root@home /]#
			</programlisting>

			or:

			<programlisting>
[root@home /]# rpm -e libghttp-devel-1.0.9-4 libghttp-1.0.9-4
[root@home /]#
			</programlisting>

			Note: the first way only applies if you have one instance of the
			packet installed. If you have more than one package (eg. two
			versions of the kernel) you are forced to supply the version.
		</para>

		<para>
				As usual you can find description of all commands by
				running <command>man rpm</command>.
		</para>
			
	</section>


	<section id="managing-poldek">
		<title>POLDEK</title>
		<para>
			Rpm is a powerfull tool but not too comfortable when you need
			to install lots of packages with lots of dependencies. 
			Fortunatelly there are tools to automate these tasks.
		</para>
		<para>
			One of such tools is called poldek. Specifically developed for
			the PLD Linux Distribution poldek is a powerfull and easy to
			use tool that can make an admins live much easier (and it's used
			in the installer too :-).
		</para>
		<para>
			First some info about how it works. 
		</para>
		



	</section>

		
</section>

<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-omittag:nil
sgml-shorttag:nil
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-default-dtd-file:"../dbxbook4.1.2.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-declaration:nil
sgml-validate-command:"rxp -sxV %s %s"
sgml-parent-document:("PLD-Guide.xml" "book" "section")
End:
-->
