日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > centos >内容正文

centos

Centos 6.4使用本地yum源

發布時間:2024/1/17 centos 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Centos 6.4使用本地yum源 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

????每次用rpm包安裝軟件是總有依賴包的出現,今天我搭建了本地yum倉庫,使用yum從光盤安裝軟件可以解決包的依賴關系,具體操作如下:

?

1.掛載光盤鏡像

[root@centos ~]# mkdir /mnt/cdrom
[root@centos ~]# mount /dev/cdrom? /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@centos ~]# vim /etc/yum.repos.d/CentOS-Media.repo
[c6-media]
name=CentOS-$releasever - Media???? --倉庫名
baseurl=file:///mnt/cdrom??????? --軟件包路徑
gpgcheck=1???????? --啟用包檢查
enabled=1????????? --啟用這個倉庫
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-CentOS-6

???

2.測試倉庫

[root@centos ~]# yum clean all???? --清除所有包
Loaded plugins: fastestmirror, refresh-packagekit
Cleaning repos: c6-media
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@centos ~]# yum repolist????? --查找有幾個倉庫
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
c6-media????????????????????????????????? | 4.0 kB???? 00:00 ...
c6-media/primary_db?????????????????????? | 3.5 MB???? 00:00 ...
repo id???????????????????? repo name???????????????????? status
c6-media??????????????????? CentOS-6 - Media????????????? 4,802
repolist: 4,802
[root@centos ~]#

?

3.安裝軟件

[root@centos ~]# yum install gpm??? --安裝軟件
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gpm.i686 0:1.20.6-12.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================
Package???????????????????????? Arch???????????????????????????? Version??????????????????????????????????? Repository??????????????????????????? Size
========================================================================================================================================================
Installing:
gpm???????????????????????????? i686???????????????????????????? 1.20.6-12.el6????????????????????????????? c6-media???????????????????????????? 175 k
Transaction Summary
========================================================================================================================================================
Install?????? 1 Package(s)
Total download size: 175 k
Installed size: 373 k
Is this ok [y/N]:y?????????? --確定安裝

?

4.常用yum基本命令

yum?--help?????????????????--幫助信息

yum?list?????????--列出軟件包

yum?repolist????????--查看有多少倉庫

yum?info?軟件包????????--軟件包的信息

yum?install??軟件包?????????--安裝軟件包

yum?update?軟件包??????--更新軟件包

yum?provides?命令???????--用命令查找要安裝的軟件包

yum?reinstall?軟件包????????--覆蓋安裝軟件包

yum?remove?軟件包??????--刪除軟件

yum?clean?軟件包????--清除軟件包

yum?grouplist??????????--查看軟件組

yum?groupinstall?"軟件組"?????--安裝軟件組

yum?install?info?"軟件組"????--查看軟件組的信息

yum?remove?“組件組"?????--刪除軟件組

yum???search???軟件包????--檢測是否有軟件包?????

yum install?* --nogpgcheck???? --跳過KEY安裝軟件包?

????????????

注:搭建Linux本地源:http://tongcheng.blog.51cto.com/6214144/1338949

轉載于:https://blog.51cto.com/tongcheng/1338876

總結

以上是生活随笔為你收集整理的Centos 6.4使用本地yum源的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。