|
IndexIntroductionFrom the official YUM web page: Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. yum has a number of advantages over using RPM directly, including:
Installing stmyumThe first thing to do is to install the ST version of the yum package. This is supplied on the ST Linux distribution CD ROMs or it can be downloaded from the FTP server. On the CD ROM stlinux20-host-yum package can be found in the ST_Installer/Resources directory, or can be downloaded from the FTP server. The stlinux22-host-yum package is provided with all the other host packages in the STLinux/host directory, or can be downloaded from the FTP server. Note: The yum package is automatically installed if the installer program on the CD ROM has been used. To install from the RPM, called stlinux2x-host-yum, use
The ST yum application is called stmyum to ensure that it does not interfere with any native yum installation. It can be found in /opt/STM/STLinux-2.0/host/bin once installed and the PATH environment variable must include this directory to be able to use it. Configuring stmyumstmyum needs a configuration file to allow it to find the RPM files for the distribution. This is stored in the file /opt/STM/STLinux-2.0/host/etc/yum.conf. Note: the ST Linux yum RPM is not shipped with a default yum.conf file. The ST Linux installer program creates a yum.conf file, but it points to where the CD filesystem was mounted. After installation from a CD, a new yum.conf file should be installed to allow further updates from the ST Linux website. This yum.conf is pre-configured for the ST Linux distribution FTP server. Download this file and copy it to /opt/STM/STLinux-2.0/host/etc/yum.conf. The stlinux22-host-yum package contains a default yum.conf file. This should be correct for most installations without requiring further editing. Note: You may have to set up your proxy environment variable if you are behind a firewall and need to use a proxy server (see below).
yum.conf file syntaxThe yum.conf manpage gives a full explanation of all the required and optional fields in the yum.conf file. To view the manpage (which is installed with the ST Linux Distribution yum RPM), you may have to set your MANPATH environment variable. For example, in BASH type:
Using signatures with stmyumIf you have not previously used the ST Linux Distribution installer program, then it is a good idea to manually install the ST Linux public signature key. This is used to confirm that the RPMS are authentic ST Linux packages and is important as you will be installing RPMs as root on your system. Note: you also need to do this if you get an error message complaining about the key length. This is because some older systems (notably RedHat Enterprise Linux 3) ship with a version of the GPG python bindings which cannot handle long strings. In this case you need to bypass yum, and use RPM directly:
stmyum with proxiesTo use yum with a proxy server, you will need to set the ftp_proxy or http_proxyenvironment variable. These are standard environment variables used by many programs which access the Internet, for example wget and curl. Which you use will depend on which protocol you are using to connect to the STLinux server, which is specified in the yum baseurl. This may be different from the protocol you use to connect to the proxy server. For example, for a non-authenticated proxy server myproxy.com, which has HTTP access on port 1234 and using the BASH shell, type:
For authenticated proxies, the URL can be extended to include the username and password. For example, using the username myuser and password mypassword in the above example we would type (using CSH this time)
Normally yum will try and keep a single connection open to the server, whether a proxy server is involved or not (this is called HTTP Keep-Alive). This is generally a performance optimisation. However we have found that some proxy servers don't work correctly in this mode, and it is necessary to disable keepalive. This can be done by adding the line:
either for a specific repository, or in the [main] section if you need to apply it to all servers. Using stmyumstmyum can be used to query installed packages, check for new and updated packages, and remove packages. Some of the major commands are shown below and more information can be obtained from the man pages. Note that for all of the examples below, "globs" can be used in the <package name>, so you could use names like stlinux20-st231-*. By default stmyum will run in interactive mode and will ask you to confirm any actions that will actually change your system. This feature can be overridden with the -y option. Common stmyum general commandsstmyum help
stmyum update
Common stmyum package commandsstmyum can perform operations based on single RPM packages in the ST Linux Distribution. Some useful commands are given below. stmyum install <package name>
stmyum update <package name>
stmyum info <package name>
stmyum provides <file name>
stmyum remove <package name>
stmyum list [<regex> | updates | installed | <package name>]
Common stmyum group commandsAs well as operating on single packages, stmyum can also work with groups of associated packages. The ST Linux Distribution contains a number of groups which allow selection of host tools, cross-development tools and different catagories of target packages. Common commands for operating on groups are given below. stmyum grouplist
stmyum groupinfo <group name> [<group name> ...]
stmyum groupinstall <group name> [<group name> ...]
stmyum groupupdate <group name> [<group name> ...]
stmyum groupremove <group name> [<group name> ...]
|
|||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||