linux common command summary of yum source installation

  • 2020-08-22 23:21:11
  • OfStack

1. Software installation

[

rpm
rpm-ivh zziplib-75.x86_64.rpm // Installation zziplib-0.13.62-5es13EN7.x86_64.ES15en
rpm-qf 'which' // To see the package name of cd, use the back quotes. rpm takes the result of the command in the back quotes as an argument.
rpm package format, package name, version number, release version number, platform
rpm -ivh rpm package file // Installation
rpm-Uvh rpm package file // Upgrade
rpm -e package name // Uninstall
rpm-qa // Query installed packages
rpm-q package name // Queries whether the specified package is installed
rpm -qi package name // Queries the specified package information
rpm-ql Package name // Lists the files from which the package is installed
rpm-qf file absolute path // To see which package a file is installed by
yum
yum list // Lists the available rpm packages
yum search vim // Search for packages whose names contain vim
yum install [-ES65en] installation package, without -ES66en installation will ask whether to install, with -ES67en will not ask directly install
ls etc/yum. repos. d / / / view yum source
yum list installed // View packages that have been installed
yum grouplist // Lists the available groups
yum groupinstall [-y] // Installation group
yum remove [-ES89en] // Uninstall 1 package, including its dependencies
yum update [-y] // Upgrade kit
yum provides "/*/vim" // Finds the package containing the vim command
yum list | grep '// run the result of yum list to the grep 'vim' query containing the package name of vim

]

Replace yum source

You're essentially replacing the repo file

[

cd /etc/yum.repos.d/
rm-rf ES124en-ES125en. repo // Removes the default source
wget http: / / mirrors. 163. com /. help/CentOS7 - Base - 163. repo / / install netease source, if not installed wget command, with 1 command under installation
curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo

]

Install extension source

[

yum install -y epel-release

]

Download the rpm package via yum

[

yum install-ES160en package name --downloadonly // Download only package not installed
ls var/cache 7 / / / / yum/x86_64 / installation package download path by default
yum ES170en-ES171en package name --downloadonly --downloaddir= Path // Specify the installation package path for the yum download
yum ES177en-ES178en package name --downloadonly --downloaddir= Path // download the rpm package for the installed software

]

The source code to install

Source package as far as possible to put/usr/local/src/directory

[

cd /usr/local/src/
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.34.tar.gz
tar zxvf httpd-2.2.34.tar.gz // Unpack
cd httpd-2.2.34
. / configure - prefix = / usr/local/apache2 / / for/with/usr compile directory/local/apache2
make / / compile
echo $& # 63; // If it is not zero, then there is an error with make. Basically, it is dependent and has not been installed. If it is zero, then make succeeds
make install // Installation

]

Related articles: