7.6 yum replaces domestic source
The source that comes with itself is foreign and can be set to a domestic source
# rm -f CentOS-Base.repo
delete the CentOS-Base.repo file
# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
download the yum source
# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
use this command when there is no wget command
# yum install -y wget
install wget #clear
the yum clean all
cache
7.7 yum download rpm package
Install the extension source, the rpm package brought by the Base source is not enough
# yum install -y epel-release
Install the extension package
# yum list |grep epel
Filter the content containing epel characters from the list
# yum install -y 包名 --downloadonly
If this rpm package is not installed, it will be downloaded to /var/cache/yum/x86_64/7/ Updates (select the corresponding rpm warehouse)/package #Specify the
download yum install -y 包名 --downloadonly --downloaddir=/tmp/
path
#Download yum reinstall -y 包名 --downloadonly --downloaddir=/tmp/
the installed rpm package
--downloadonly 为一个插件,--后为插件
7.8/7.9 Source package installation
#Convention : put the source package in this path # or download it from r.aminglinux.com cd /usr/local/src
# # # # #Installation document, which contains installation steps --more--33% #Configure the installation path --help to see what functions are available #Display the health status of the previous command, if it is 0, it is normal, if it is non-zero, it is not normal. # # #Check if there is an error in the command # The compiled binary file or configuration file and directory will be placed in the directory specified by the prefix # #Check the installation result to uninstall apache2 is to delete the directory /usr/local/apache2 The source package is good, download Be careful gcc no means that the compiler does not existwget http://mirrors.cnnic.cnapache/httpd/httpd-2.2.32.tar.gz
tar -zxvf httpd-2.2.32.tar.gz
cd httpd-2.2.32
ls
more READEME
more INATALL
./configure --prefix=/usr/local/apache2
echo $?
yum install -y gcc
make
echo $?
make install
echo $?
ls /usr/local/apache2/
expand
- Configure yum source priority http://www.aminglinux.com/bbs/thread-7168-1-1.html
- Package the source package into rpm package http://www.linuxidc.com/Linux/2012-09/70096.htm