Yum replaces domestic source, yum downloads rpm package, source package installation

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.repodelete the CentOS-Base.repo file
# wget http://mirrors.163.com/.help/CentOS7-Base-163.repodownload the yum source
# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repouse this command when there is no wget command
# yum install -y wgetinstall wget #clear
the yum clean allcache

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-releaseInstall the extension package
# yum list |grep epelFilter the content containing epel characters from the list
# yum install -y 包名 --downloadonlyIf 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 exist
wget 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

  1. Configure yum source priority http://www.aminglinux.com/bbs/thread-7168-1-1.html
  2. Package the source package into rpm package http://www.linuxidc.com/Linux/2012-09/70096.htm

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325621672&siteId=291194637