Use of RPM packages under Redhat / HEIYELUREN
We know that there is a good stuff in this installer under FreeBSD. There is also a powerful thing in Redhat, called RPM (Redhat Pagckage Manage), which is very powerful, in fact, the current RPM management method It has become a standard under Linux, which is a multi-Linux system program installation. I just learned redhat, just talk about its use management.
First you have to confirm that there is RPM tool, if not, go to install it. RPM's management of files, including queries, associations of file versions, associations, package owners, package upgrades, installation package delete, etc. If the PGP secret key, please refer to a book or tutorial, just a simple thing.
1. The program is installed. # RPM -Q PAGCKAGENAME, such as: # rpm -q setupsetup-2.5.25-1 gets the version information of our installer
2. File owned package # rpm -qf filename such as: # rpm -q /etc/passwdsetup-2.5.25-1 Prove that our / etc / passwd file is generated by Setup installation.
3. A package included in the package # rpm -ql pagckagename, such as: # rpm -ql setup / etc / bashrc / etc / csh.cshrc / etc / csh.login / etc / exports / etc / filesystems / etc / group / ETC / Host.conf / etc / hostow / etc / host / etc / motor / etc / passwd / etc / printcap / etc / profile / etc / profile.d / etc / protocols / etc / Securetty / etc / services / etc / shells / usr / share / doc / setup-2.5.25 / usr / share / doc / setup-2.5.25 / uidgid / var / log / lastlog
4. Installing the RPM Pack # rpm -i packageName To assume the package to install an RPM package, then you must know the path of the package, you can install from the packet above the local path, CD, network, etc.. At the same time, you can also install multiple packages such as: # rpm -i / mnt / cdrom / redhat / rpms / setup- * simultaneously installed all the redhat / rpms / directory in all CDs. You can also install the package from the network: # rpm -iv h ftp: //anonymous@ftp.redhat.com/pub/red/linux/RawHide/i386/rpms/lynx- * Up from the official FTP server of Redhat The installation of the package, if you need a password, you can enter it directly above, but I don't recommend it, it is easy to expose the password on the network.
The above -V and -H parameters are the lengthy output of the extended setting with a hash, which can monitor the installation process.
5. The upgrade of the package upgrade package is risky, some programs are configured, if the upgrade is upgraded, the configuration information may be lost. To upgrade the package, you can use the following command: # rpm -u packagename # rpm -f packagename-u-f can be upgraded, and the difference is that the -u command installs the new package when there is no installed RMP package, and -f does not install the new package. Generally, we use -V-H to monitor the installation process when we upgrade: # rpm -uvh / mnt / cdrom / redhat / rpms / lynx- *
6. When the package-dependent upgrade package, some packages are dependent. For example, we have to install a program, but the corresponding program is not installed, such as we need to compile the kernel, then the compiler will install first, of course We can also use -Nodeps to scroll dependence. For example, we install the kernel source code, then the GCC compiler should be installed first. We can use the following command to scroll after the dependency prompt: # rpm -uvh --Node / mnt / cdrom / redhat / rpms / kernel-source - * # rpm -uvh / mnt / cdrom / redhat / rpms / GCC-3- * 7. The deletion of the package is relatively easy. Use: # rpm -e packagename to delete the package you want to delete, do not need to know the version and path, such as we have to delete the kernel source code package: # rRPM -E Kernel-Source At the same time we can also delete multiple packages at the same time: # rpm -e kernel-source GCC then deletes the Kernel-Source and GCC package at the same time.
Writetime: 2004-12-8 17:22