Linux Learning Notes Lesson tenth rpm, yum, compile and install

Source: Internet
Author: User

First, RPM

Second, yum

Third, compile and install

First, RPM

1. Introduction to RPM

2. RPM installation Command (RPM-IVH--nodeps--force)

3. RPM Unload (RPM-E)

4, RPM query (Rpm-q-QA-QL-QF)

1, RPM Introduction:

RPM: (Redhat package Manager), available in Redhat and SUSE systems

[[Email protected] ~] MOUNT/DEV/CDROM/MNT//Mount Optical Drive

[Email protected] ~]# ll/mnt/packages/| Less

Total dosage 4264938
-r--r--r--. 2 root root 1564700 October 04:01 389-ds-base-1.2.11.15-46.el6.x86_64.rpm
-r--r--r--. 2 root root 433236 October 03:55 389-ds-base-libs-1.2.11.15-46.el6.i686.rpm
-r--r--r--. 2 root root 428392 October 04:00 389-ds-base-libs-1.2.11.15-46.el6.x86_64.rpm
-r--r--r--. 2 root root 214692 October 04:02 abrt-2.0.8-26.el6.centos.x86_64.rpm

RPM Package Name Composition:

1. Package Name: ABRT

2. Version number: 2.0.8-26

3, System type: El6 refers to Redhat Enterprise Edition 6, CentOS refers to the use of CentOS

4, x86_64: platform type.  i686 32 bits. NOARCH:32 and 64-bit available, no platform restrictions

2. RPM Installation Command

-IVH: Install. -I install, installation;-V visualization;-H Display installation progress bar

--nodeps: Do not perform a dependency detection before installing or upgrading a package

--force: Mandatory installation, even if overwriting files belonging to other packages is installed

-UVH: Upgrade RPM Package

*********************************************************

--force cannot replace--nodeps

[Email protected] ~]# rpm-ivh/mnt/packages/amanda-2.6.1p2-8.el6.x86_64.rpm
error:failed dependencies:
Amanda-client = 2.6.1p2-8.el6 is needed by amanda-2.6.1p2-8.el6.x86_64
XINETD is needed by amanda-2.6.1p2-8.el6.x86_64
[Email protected] ~]# RPM-IVH--force/mnt/packages/amanda-2.6.1p2-8.el6.x86_64.rpm
error:failed dependencies:
Amanda-client = 2.6.1p2-8.el6 is needed by amanda-2.6.1p2-8.el6.x86_64
XINETD is needed by amanda-2.6.1p2-8.el6.x86_64
[Email protected] ~]# RPM-IVH--nodeps/mnt/packages/amanda-2.6.1p2-8.el6.x86_64.rpm
Preparing ... ########################################### [100%]
1:amanda ########################################### [100%]
[Email protected] ~]#

*********************************************************

--force re-installing the RPM package

[Email protected] ~]# Rpm-qa | grep vim
Vim-common-7.2.411-1.8.el6.x86_64
Vim-enhanced-7.2.411-1.8.el6.x86_64
Vim-minimal-7.2.411-1.8.el6.x86_64

[Email protected] packages]# RPM-IVH vim-common-7.2.411-1.8.el6.x86_64.rpm
Preparing ... ########################################### [100%]
Package vim-common-2:7.2.411-1.8.el6.x86_64 is already installed
[Email protected] packages]# RPM-UVH vim-common-7.2.411-1.8.el6.x86_64.rpm
Preparing ... ########################################### [100%]
Package vim-common-2:7.2.411-1.8.el6.x86_64 is already installed
[Email protected] packages]# RPM-UVH--force vim-common-7.2.411-1.8.el6.x86_64.rpm
Preparing ... ########################################### [100%]
1:vim-common ########################################### [100%]

*********************************************************

3, RPM Uninstall

RPM-E filename//filename is queried by the RPM query function.

[Email protected] packages]# Rpm-qa | grep vim
Vim-common-7.2.411-1.8.el6.x86_64
Vim-enhanced-7.2.411-1.8.el6.x86_64
Vim-minimal-7.2.411-1.8.el6.x86_64
[Email protected] packages]# rpm-e vim-enhanced-7.2.411-1.8.el6.x86_64
[[email protected] packages]# echo $?
0
[Email protected] packages]# RPM-IVH vim-enhanced-7.2.411-1.8.el6.x86_64.rpm
Preparing ... ########################################### [100%]
1:vim-enhanced ########################################### [100%]
[Email protected] packages]# RPM-E vim-enhanced//may not have a version number
[[email protected] packages]# echo $?
0

4, RPM query

Rpm-q vim-enhanced Query Whether a package is installed

Rpm-qa | More Query All

Rpm-qa | grep vim all RPM packages currently installed

RPM-QL vim-enhanced//RPM files installed

RPM-QF ' which Wim ' a file belongs to which RPM package

[Email protected] packages]# RPM-QF ' which vim '
Vim-enhanced-7.2.411-1.8.el6.x86_64

Second, yum Tools

1. Yum command

The Yum list lists all available RPM package resources: both installed and not installed

Yum install-y vim

Yum remove-y vim

Yum update-y vim

Yum provides "*/vim" query which package is installed by a command

Yum grouplist List of all kits

Yum groupinstall-y desktop "X Window System" Installation

Yum groupremove-y Desktop "X Window System"

Run the following command to generate the cache

Yum Clean All

Yum Makecache

2. Create a local Yum source

[[email protected] ~]# mount/dev/cdrom/mnt//Mount centos6.6 disc

[[email protected] ~]# Vi/etc/yum.repos.d/dvd.repo//New Dvd.repo local Yum source file

[DVD]

name=local DVD
Baseurl=file:///mnt
Enabled=1
Gpgcheck=0

[email protected] ~]# Yum List | grep DVD | TAIL-1//Verification

zlib-static.x86_64 1.2.3-29.el6 DVD

3. Other uses of Yum

A. Install other Yum sources

Yum Install-y epel-release

RPM-IVH http://www.lishiming.net/data/attachment/forum/epel-release-6-8_32.noarch.rpm

Other Address: http://www.aminglinux.com/bbs/thread-6721-1-1.html

b, yum download only does not install

[[email protected] yum.repos.d]# yum install-y yum-plugin-downloadonly.noarch//install plugins first

[[email protected] yum.repos.d]# Yum reinstall vim--downloadonly--downloaddir=/usr/local/src-y download vim-enhanced to/usr/ Under the LOCAL/SRC directory

Third, the source package installation

[Email protected] ~]# wget http://syslab.comsenz.com/downloads/linux/httpd-2.2.16.tar.gz [[email protected] ~]# tar ZXVF httpd-2.2.16.tar.gz [[email protected] ~]# CD httpd-2.2.16
[Email protected] httpd-2.2.16]#/configure--prefix=/usr/local/apache2
[[email protected] httpd-2.2.16]# make && make install
[[email protected] httpd-2.2.16]# echo $?
0


Extensions:
1. Allow Yum to keep installed packagesHttp://www.360doc.com/content/11/0218/15/4171006_94080041.shtml
2. Use NetEase yum sourceHttp://www.aminglinux.com/bbs/thread-7475-1-1.html
3. Build a local area network Yum sourceHttp://www.aminglinux.com/bbs/thread-7627-1-1.html
4. Yum-Source PriorityHttp://www.aminglinux.com/bbs/thread-7168-1-1.html


Amin Forum: http://www.aminglinux.com/bbs/thread-7696-1-1.html


This article is from the Linux Learning Notes blog, so be sure to keep this source http://genxin.blog.51cto.com/665191/1627297

Linux Learning Notes Lesson tenth rpm, yum, compile and install

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.