国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

對Yum源的一些優化配置

2020-07-08 12:52:58
字體:
來源:轉載
供稿:網友

設置163源
網易(163)yum源是國內最好的yum源之一 ,無論是速度還是軟件版本,都非常的不錯,將yum源設置為163yum,可以提升軟件包安裝和更新的速度,同時避免一些常見軟件版本無法找到。具體設置方法如下:
1,進入yum源配置目錄

復制代碼
代碼如下:
cd /etc/yum.repos.d

2,備份系統自帶的yum源

復制代碼
代碼如下:
mv CentOS-Base.repo CentOS-Base.repo.bk

下載163網易的yum源:

復制代碼
代碼如下:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

3,更新玩yum源后,執行下邊命令更新yum配置,使操作立即生效

復制代碼
代碼如下:
yum makecache

4,除了網易之外,國內還有其他不錯的yum源,比如中科大和搜狐的,大家可以根據自己需求下載
中科大的yum源:

復制代碼
代碼如下:
wget http://centos.ustc.edu.cn/CentOS-Base.repo

sohu的yum源

復制代碼
代碼如下:
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

理論上講,這些yum源redhat系統以及fedora也是可以用 的,但是沒有經過測試,需要的站長可以自己測試一下。


使用Cobbler搭建自己的yum源
Cobbler使用介紹:
進入cobller界面,點擊”Repos”,新建Repo“create new repo”,我這里已經創建好了4個yum源,下拉go旁邊的選項,選中“Reposync”,勾選repo項目,可進行yum源同步。

cobbler創建yum源原理很簡單,就是把外面的yum源同步過來,所以下面配置repo項目的時候,”mirror”項填選可用的yum源即可,執行Reposync時,cobbler就會把外面的軟件包同步過來。

這里我們架構”Arch”選擇x86_64(64位系統),種類”Breed”選擇”yum”;”mirror”項填選外部yum源。

我用的是阿里云的yum源

復制代碼
代碼如下:
CentOS-Base:http://mirrors.aliyun.com/centos/6/os/x86_64/
CentOS-updates:http://mirrors.aliyun.com/centos/6/updates/x86_64/
CentOS-extras:http://mirrors.aliyun.com/centos/6/extras/x86_64/
Centos-epel:http://mirrors.aiyun.com/epel/6/x86_64/

由于更新的軟件包較大,我單獨掛載了一塊磁盤 把它link到/var/www/cobbler/repo_mirror/(yum源軟件存放的目錄)


復制代碼
代碼如下:
# 創建一個CentOS-Base.repo文件(把他放到/var/www/cobbler/ks_mirror/mirror_name上面(mirro_name是你建的鏡像源的名字),這樣服務器就能下載使用了)
[core-0]
name=core
baseurl=http://192.168.6.170/cobbler/ks_mirror/Centos6.4_mini-x86_64/
enabled=1
gpgcheck=0
priority=1

[centos6.4-x86_64-base]
name=centos6.4-x86_64-base
baseurl=http://192.168.6.170/cobbler/repo_mirror/Centos6.4-x86_64-base/
enabled=1
priority=99
gpgcheck=0

[centos6.4-x86_64-updates]
name=centos6.4-x86_64-update
baseurl=http://192.168.6.170/cobbler/repo_mirror/Centos6.4-x86_64-update/
enabled=1
priority=99
gpgcheck=0


[centos6.4-x86_64-extras]
name=centos6.4-x86_64-extras
baseurl=http://192.168.6.170/cobbler/repo_mirror/Centos6.4-x86_64-extras/
enabled=1
priority=99
gpgcheck=0


[centos6.4-x86_64-epel]
name=centos6.4-x86_64-epel
baseurl=http://192.168.6.170/cobbler/repo_mirror/Centos6.4-x86_64-epel/
enabled=1
priority=99
gpgcheck=0

201587194107745.png (1738×502)

201587194239809.png (933×463)

201587194304335.png (1741×538)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 河源市| 房山区| 大邑县| 翁牛特旗| 沁水县| 荃湾区| 滕州市| 兰西县| 抚顺县| 鄱阳县| 普陀区| 广平县| 遵义县| 辉南县| 资阳市| 潮州市| 秦皇岛市| 镇江市| 屏东县| 建平县| 建昌县| 康定县| 淄博市| 安义县| 玉林市| 会宁县| 玉门市| 临海市| 高淳县| 明水县| 利辛县| 阿尔山市| 夏邑县| 吴川市| 班玛县| 普兰县| 广宗县| 卓尼县| 马鞍山市| 盐边县| 文水县|