Five week second class (November 14)
7.6 Yum Replace the domestic source
Yum install-y epel-release #安装扩展源epel
Default Yum source address, the domestic has 163 and Sohu speed relatively fast
[root@wwlinux701 yum.repos.d]# cat Centos-base.repo [Base] name=centos-$releasever-base mirrorlist=http:// mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=os&infra= $infra #baseurl =http:// mirror.centos.org/centos/$releasever/os/$basearch/gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/ rpm-gpg-key-centos-7 #released Updates [updates] name=centos-$releasever-updates mirrorlist=http:// mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updates&infra= $infra #baseurl =http:/ /mirror.centos.org/centos/$releasever/updates/$basearch/gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/ Rpm-gpg-key-centos-7 #additional packages to useful [extras] name=centos-$releasever-extras mirrorlist=http:// mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=extras&infra= $infra #baseurl =http:// mirror.centos.org/centos/$releasever/extras/$basearch/gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/ Rpm-gpg-key-centos-7 #additional packages that EXtend functionality of existing packages [Centosplus] name=centos-$releasever-plus mirrorlist=http:// mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplus&infra= $infra #baseurl = http://mirror.centos.org/centos/$releasever/centosplus/$basearch/gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/ rpm-gpg/rpm-gpg-key-centos-7 [root@wwlinux701 yum.repos.d]#
7.7 Yum Download RPM package
Yum install-y Package name –downloadonly
ls/var/cache/yum/x86_64/7/
Yum install-y Package name –downloadonly–downloaddir= path
Yum reinstall-y Package name –downloadonly–downloaddir= path #已经下过会重新安装
Yum Download ROM Package:
Yum Install libaio-devel–downloadonly–downloaddir=/tmp/
Yum Reinstall package Name –downloadonly–downloadddir=/tmp/#已经安装过的
Download the entire Directory
Wget-c-r-np-k-l-p www.xxx.org/pub/path/
Wget-c-r-np-k-l-p http://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/repodata/
7.8/7.9 Source Pack Installation
SOURCE Pack in: cd/usr/local/src/
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.34.tar.gz
Tar zxvf httpd-2.2.32.tar.gz
CD httpd-2.2.32
./configure–prefix=/usr/local/apache2
echo $? #上一条命令非0即有问题
make
make Install
• Uninstall is to delete the installed files
Extension
1. Configure the Yum source priority http://ask.apelearn.com/question/7168
2. Package the source pack into an RPM package http://www.linuxidc.com/Linux/ 2012-09/70096.htm