CentOS6.4 Linux software package management

Source: Internet
Author: User

Binary software package management RPM, YUM) source code package installation script install Shell or Java Script) Debian Linux software package management overview

I. An example of RPM package management: The sudo-1.8.6p3-7.el6.x86_64.rpm includes the software name (sudo), version number (1.8.6p3), Release number (7. el6), and hardware platform (x86_64 ). 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42KI0-0.png "height =" 60 "data-media-type =" image "data-inited = "true"/> 1) detach # rpm-e sudo Note: if other software packages are dependent, a message is displayed during detaching. You can use -- nodeps to forcibly detach the software. 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42H004-1.png "height =" 100 "data-media-type =" image "data-inited = "true"/>
2) install # rpm-ivh/mnt/cdrom/Packages/sudo-1.8.6p3-7.el6.x86_64.rpm Mount disc: mkdir/mnt/cdrommount/dev/cdrom/mnt/cdrom query: rpm-q sudorpm-qa | grep samba650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M018-2.png "height =" 178 "data-media-type =" image "data-inited = "true"/> other installation options: -- excludedocs does not install the document file in the software package -- prefix PATH installs the software package to the PATH specified by PATH -- test only tests the installation and does not actually install the software package.
A. The software package has been installed [root @ localhost ~] # Rpm-ivh/mnt/cdrom/Packages/sudo-1.8.6p3-7.el6.x86_64.rpm Preparing... ######################################## ### [100%] package sudo-1.8.6p3-7.el6.x86_64 is already installed if overwrite to install this package, you can use the -- replacepkgs option on the command line. 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42L342-3.png "height =" 100 "data-media-type =" image "data-inited = "true"/>

B. file conflict if a file in the software package to be installed is already installed when other software packages are installed, the following error message is displayed: # rpm-ivh sudo-1.7.2p1-5.el5.i386.rpmconflicts with file from bark-3.2-1lsudo-1.7.2p1-5.el5.i386.rpm cannot be installed use the -- replacefiles command line option to make RPM ignore this error message.
C. Unresolved dependencies the RPM package may depend on other software packages and can be installed only after a specific software package is installed. # Rpm-ivh sudo-1.7.2p1-5.el5.i386.rpmfailed dependencies: sudo is needed by bark-3.2-1l you must install the dependent software package to solve this problem, force installation using the -- nodeps option.
3) upgrade # rpm-Uvh sudo-1.8.6p3-7.el6.x86_64.rpm
4) query options:-a: Query all installed software packages. -f query the software package to which the file belongs-p query software package-I display software package information-l display file list in the software package-d display file list marked as a document-c display marked as a configuration file file List
RPM query application case: 1. The software package to which the query file belongs: rpm-limit 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42GJ4-4.png "height =" 115 "data-media-type =" image "data-inited = "true"/>
2. query the software package information: rpm-qi, rpm-qip650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42KA2-5.png "height =" 424 "data-media-type =" image "data-inited = "true"/>
Query the information of the RPM package that is not installed 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M041-6.png "height =" 463 "data-media-type =" image "data-inited = "true"/>
3. query the package installation file: rpm-ql and rpm-qlp query the package installation system location 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42G2L-7.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42K220-8.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
4. query the help documentation of the software package: rpm-qd650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42J2N-9.png "height =" 287 "data-media-type =" image "data-inited = "true"/>
5. query the software package configuration file: rpm-qc650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M295-10.png "height =" 126 "data-media-type =" image "data-inited = "true"/>
5) Check # rpm-V software name? 5. What is the md5 check value of the file? S file size? L link file? T File Creation Time? D device file? U file user? G file user group? M File Permissions
[Root @ localhost ~] # Rpm-V sudos.5 .... t. d/usr/share/doc/sudo-1.8.6p3/sample. sudo. conf shows sudo software package since installed/usr/share/doc/sudo-1.8.6p3/sample. sudo. conf file size, MD5 value, and creation time changed. 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42LJ8-11.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
6) package file extraction extract all files to the current directory # rpm2cpio initscripts-8.45.30-2.el5.centos.i386.rpm | cpio-idv extract the specified file to the current directory # rpm2cpio initscripts-8.45.30-2.el5.centos.i386.rpm | cpio-idv. /etc/inittab650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M340-12.png "height =" 184 "data-media-type =" image "data-inited = "true"/>
Ii. Benefits of YUM package management application yum: automatic software package upgrade with convenient software package dependency
Install yum install650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42LS5-13.png "height =" 465 "data-media-type =" image "data-inited = "true"/>
Detect upgrade yum check-update650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42L031-14.png "height =" 108 "data-media-type =" image "data-inited = "true"/>
Upgrade yum update650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M0W-15.png "height =" 389 "data-media-type =" image "data-inited = "true"/>
The software package query yum list650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42J000-16.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42Jc6-17.png "height =" 314 "data-media-type =" image "data-inited = "true"/>
Package information yum info650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42L358-18.png "height =" 413 "data-media-type =" image "data-inited = "true"/>
Uninstall yum remove650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42MI7-19.png "height =" 390 "data-media-type =" image "data-inited = "true"/>
Help yum-help, man yum650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42H622-20.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42KJ3-21.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
Three, the source code package installation application example proftpd): # tar-xzvf proftpd-1.3.5rc3.tar.gz unzipping package) # cd proftpd-1.3.5rc3 #. /configure -- prefix =/usr/local/proftpd configuration) # make compilation) # make install) software: http://www.proftpd. org650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42L148-22.png "height =" 319 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M304-23.png "height =" 88 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M403-24.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42HS9-25.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42G964-26.png "height =" 364 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42HZ1-27.png "height =" 405 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42HF6-28.png "height =" 327 "data-media-type =" image "data-inited = "true"/>
Iv. Script installation application example webmin, OpenOffice) # tar-zxvf webmin-1.630.tar.gz # cd webmin-1.630 # vi README #. /setup. sh software: http://www.webmin.cn/download.html650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42K616-29.png "height =" 484 "data-media-type =" image "data-inited = "true"/> 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42GG9-30.png "height =" 427 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42M138-31.png "height =" 484 "data-media-type =" image "data-inited = "true"/>
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42KX2-32.png "height =" 484 "data-media-type =" image "data-inited = "true"/>

650) this. width = 650; "title =" clipboard.png "src =" http://www.bkjia.com/uploads/allimg/131227/1J42H4b-33.png "/> 650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; cursor: default; border-right: 0px "title =" clipboard "border =" 0 "alt =" clipboard "src =" http://www.bkjia.com/uploads/allimg/131227/1J42KK4-34.png "height =" 435 "data-media-type =" image "data-inited = "true"/>
5. APT package management search package apt-cache search package information apt-cache show install apt-get installreinstall,-f) Delete apt-get removeautoremove, -- purge) update the software source apt-get update the Installed Package apt-get upgrade
END

This article is from the "Wang Qian De technology blog" blog, please be sure to keep this source http://redking.blog.51cto.com/27212/1240452

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.