centos6 163源ok

來源:互聯網
上載者:User

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

1.163 http://mirrors.163.com/.help/centos.html

priority=9

2.epel http://fedoraproject.org/wiki/EPEL

priority=9

3.RPMforge http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-f0c3ecee3dbb407e4eed79a56ec0ae92d1398e01

priority=9

4.RPMFusion http://mirrors.163.com/.help/rpmfusion.html http://rpmfusion.org/ http://rpmfusion.org/Configuration/

su -c 'rpm -Uvh http://mirrors.163.com/rpmfusion/free/el/updates/testing/6/x86_64/rpmfusion-free-release-6-0.1.noarch.rpm http://mirrors.163.com/rpmfusion/nonfree/el/updates/testing/6/x86_64/rpmfusion-nonfree-release-6-0.1.noarch.rpm'

priority=9

 

 

 

 

CentOS6-Base-163.repo priority=1 priority=2

CentOS-Base.repo.backup

CentOS-Debuginfo.repo  priority=1 priority=2

CentOS-Media.repo  priority=1 priority=2

epel.repo  priority=10 priority=11

epel-testing.repo  priority=10 priority=11

rpmfusion-free-updates.repo  priority=20 priority=21

rpmfusion-free-updates-testing.repo  priority=21

rpmfusion-nonfree-updates.repo priority=20 priority=21

rpmfusion-nonfree-updates-testing.repopriority=21

rpmforge.repo  priority=30 priority=31

 

 

yum makecache

 

yum check-update

yum update

 

uname -pr

 

yum install yumex

 

yum install ntfs-3g.x86_64

 

yum install proftpd.x86_64

 

rpm - gadmin-proftpd-0.4.0-0.1.rhfc12.nr.i686.rpm

 

rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm

 

rpm -ivh foo-1.0-1.i386.rpm

 

###########################

 

 

 

 

 

http://mirrors.163.com/.help/centos.html

 

http://www.librehat.info/04/redhat-yum-rpm-repo/

 

  官方國內鏡像>epel>rpmforge>rpmfusion  (priority的值

 

1. RPMforge for CentOS 6

 

The default RPMforge repository does not replace any CentOS base packages. In the past it used to, but those packages are now in a separate repository (rpmforge-extras) which is disabled by default.

 

You can find a complete listing of the RPMforge package packages at http://packages.sw.be/

 

Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

 

i686 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

 

x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

 

The preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.

 

Install DAG's GPG key

 

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

If you get an error message like the following the key has already been imported:

 

error: http://apt.sw.be/RPM-GPG-KEY.dag.txt: key 1 import failed.

Verify the package you have downloaded

 

rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm

Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.

 

Install the package

 

rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys.

 

Then try to install something like this

 

yum install htop

 

 

 

 

第1步:安裝centos6,並添加centos的升級鏡像,添加epel鏡像

 

首先備份/etc/yum.repos.d/CentOS-Base.repo

 

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下載對應版本repo檔案, 放入/etc/yum.repos.d/(操作前請做好相應備份)

 

cd /etc/yum.repos.d/

 

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

然後下載epel庫安裝

 

wget http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm

 

rpm -Uhv epel-release-6-5.noarch.rpm

運行yum makecache產生緩衝

 

如果出錯,檢查下163的鏡像庫是否有問題。

 

vim CentOS6-Base-163.repo

將對應的addons內容注釋掉,因為庫還沒出來,所以必須注釋掉

 

#packages used/produced in the build but not released

#[addons]

#name=CentOS-$releasever - Addons - 163.com

#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

#gpgcheck=1

#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

第2步,安裝編譯器所需要的日常庫

 

sudo -s

LANG=C

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel \

libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses \

ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl \

openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.