Linux system software package management, linux System Software Package
From: http://www.apelearn.com/bbs/forum.php? Mod = viewthread & tid = 7677 & extra = page % 3D1% 26 filter % 3 Dtypeid % 26 typeid % 3D36
1. rpm Tool
Rpm Redhat Package Manager has an open design concept. It is not only available on the RedHat platform, but also on SUSE.
Rpm package name consists of-and. into several parts, such as abrt-cli-2.0.8-15.el6.centos.i686.rpm, abrt-cli is the package name, 2.0.8-15 is the version number, el6 is the redhat Enterprise 6,
Centos indicates that this is used in centos, and i686 indicates the platform type. Some rpm packages do not have a specific platform but noarch, which means this rpm package has no hardware platform restrictions.
Install a package: rpm-ivh/mnt/Packages/libjpeg-turbo-devel-1.2.1-1.el6.i686.rpm
-I indicates installation,-v visualization, and-h indicates the installation progress.
-- Force: force installation. It must be installed even if it overwrites files of other packages.
-- Nodeps: When the rpm package to be installed depends on other packages, you must install this package even if other packages are not installed.
Upgrade: rpm-Uvh filename. rpm
-U indicates the upgrade.
Rpm uninstallation:
Rpm-e filename // here the filename is queried through the rpm query function
Rpm-qa | grep libjpeg-turbo-devel
Rpm-e libjpeg-turbo-devel
Check whether a package is installed
Rpm-q package name (without platform information or suffix)
Query all installed rpm packages of the current system
Rpm-qa
Query the rpm package information:
Rpm-qi package name
List the files installed by an rpm:
Rpm-ql package name
Which rpm package does a file belong:
Rpm-qf filename // this can be used together with backquotes, such as rpm-qf 'which ls'
2. yum Tool
Yum list lists all available rpm package Resources
Search for a package: yum search 'keyword' or yum list | grep 'keyword'
Yum installation package: yum install-y filename (package name)
Yum uninstall package: yum remove-y filename (package name)
Yum update package: yum update-y filename (package name)
Yum search package: yum provides "*/vim" // use the wildcard here to find the package for which a command is installed.
Yum grouplist list all suites
Yum groupinstall installation kit
Yum groupremove uninstall Kit
Create a local yum Source
Mount/dev/cdrom/mnt
Cp-r/etc/yum. repos. d/etc/yum. repos. d. bak // back up
Rm-f/etc/yum. repos. d /*
Vim/etc/yum. repos. d/dvd. repo
# Add the following content:
[Dvd]
Name = install dvd
Baseurl = file: // mnt
Enabled = 1
Gpgcheck = 0
Yum list // check whether there is a dvd mark
Install yum extension Source
Rpm-ivh www.lishiming.net/data/attachmen... e-6-8_32.noarch.rpm (other address http://www.aminglinux.com/bbs/thread-6721-1-1.html)
You can also install yum install-y epel-release.
Use yum to download an rpm package
Yum install-y yum-plugin-downloadonly.noarch # first install a plug-in to support only download without Installation
The yum install package name-y -- downloadonly # has been downloaded. The default value is/var/cache/yum/base/packages/
Yum install package name-y -- downloadonly -- downloaddir =/usr/local/src # specifies a download directory. If it is an already installed rpm package,
Use reinstall: yum reinstall package name-y -- downloadonly -- downloaddir =/usr/local/src
3. Install the source code package
The source code package is an open-source software package that can be modified by itself. It is mostly used for C speech development and cannot be used directly. It must be compiled into binary executable files.
The source code package must be supported by gcc. If you do not need to install yum install-y gcc
Generally, compile the three steps:
./Configure to configure various compilation parameters;
Make compiles Based on the specified compilation parameters;
Install make install to the specified directory