centOS - cruisechang/wiki-linux GitHub Wiki
Install and manage software
Checking for updating packages
- yum check-update //check installed packages have updates
- yum update //update all packages
- yum update packageName //update target package
Packages and packages groups
- yum search vim gvim emacs //search packages
- yum list abrt-addon* abrt-plugin* //list installed and available packages
- yum list all
- yum list installed
- yum list installed "krb?-*"
- yum list available
- yum grouplist //list all package groups
- yum repolist //list enabled repository
Package infomation
- yum info php72
- yumdb info php72 //query Yum database for alternative infomation
Install package
- yum install httpd php72 mysqld ...
- yum install perl-Crypt-* //install multiple similarly-named packages
- yum groupinstall [groupName/groupID] //install a package group
Remove package
- yum remove totem rhythmbox...
WORKING WITH TRANSACTION HISTORY
- yum history list startID..endID // yum list 1..5
- yum history list all
- yum history summary
Configuring Yum and Yum repositories
Using yum-config-manager command
- yum-config-manager //view current configuration
- yum-config-manager --add-repo repository_url
- yum-config-manager --enable remi-php72 //enable installed repo
- yum-config-manager --disable repository... //disable installed repo
- yum clean all //clean cache
About Repository
Two common repositories,epel and remi
install epel repository
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Install remi repository
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
//enable repo
yum-config-manager --enable remi-php71 //enable php71
yum-config-manager --enable remi-php72 //enable php72
yum command
yum repolist [all / enabled /disabled]
Location of yum repository
/etc/yum.repos.d