Replace the domestic yum source, yum download rpm package

Source: Internet
Author: User
Tags gpg pack

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.