CENTOS7 Package Installation and uninstall (transfer from ape class Amin teacher)

Source: Internet
Author: User
Tags bz2

1. RPM Tools
RPM Redhat Package Manager, the design concept is open, not only on the Redhat platform, on the SuSE is also available.
The RPM package name consists of-and. Divided 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 refers to the Redhat Enterprise version 6, CentOS refers to this is used on CentOS, i686 refers to the platform type. Some RPM packages do not write a specific platform but Noarch, which means the RPM package has no hardware platform limitations.
Install a package: rpm-ivh/mnt/packages/libjpeg-turbo-devel-1.2.1-1.el6.i686.rpm

-I indicates installation,-V visualization,-H shows installation progress
--force: Force installation, even if files that belong to other packages are to be installed
--nodeps: Install this package when the RPM package that you want to install depends on other packages, even if the other packages are not installed
Upgrade: RPM-UVH filename.rpm
-U is the meaning of the upgrade

RPM Uninstall: rpm-e filename, here the filename is through the RPM query function of the query
Rpm-qa |grep Libjpeg-turbo-devel, Rpm-e libjpeg-turbo-devel
Query whether a package installs RPM-Q package name (without platform information and suffix name)
Rpm-qa Query the current system for all installed RPM packages

Query the RPM Package information: RPM-QI Package Name
List the files installed in an RPM: RPM-QL package Name
Which rpm package a file belongs to: RPM-QF filename can be used in conjunction with inverted quotes, such as RPM-QF ' which LS '


2. Yum Tools
Yum list lists all available RPM package resources
Search for a package: Yum search ' keywords ' or yum list |grep ' keywords '
Yum installation package: Yum install-y filename (package name)
Yum Uninstall package: Yum remove-y filename (package name)
Yum Upgrade package: Yum update-y filename (package name)

Yum Grouplist List all the kits
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//Backup First
Rm-f/etc/yum.repos.d/*
Vim/etc/yum.repos.d/dvd.repo #加入如下内容:


Yum Makecache
Yum list  //See if there are any signs of a DVD


use yum to download an RPM package
Yum install-y yum-plugin-downloadonly.noarch   #首先需要安装一个插件来支持只下载不安装
Yum Install package name-y--downloadonly   # This has already downloaded the
Yum install package name-y--downloadonly--downloaddir=/usr/local/src   #指定一个下载目录


3. SOURCE Pack Installation
Source package is open source can change the package, most of the use of C voice development, can not be used directly, need to compile into binary executable file
compiled source package must have GCC support, if there is no need to install Yum install-y gcc
usually compile three-step: Configure configures various compilation parameters; make compiles according to the specified compilation parameters; Install installs to the specified directory

instance:
Download source package cd/usr/local/src/#约定目录; wgethttp:// MIRRORS.CNNIC.CN/APACHE/HTTPD/HTTPD-2.2.27.TAR.BZ2
Extract tar jxvf httpd-2.2.27.tar.bz2, view readme or install documentation
Specify compilation parameters./configure--help  
Echo $? Verify success
Make
make 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.