知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

centos6 163源ok

发布时间:2014-09-05 16:45:50作者:知识屋

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

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜