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

首頁 > 系統(tǒng) > Linux > 正文

Linux yum安裝過程圖文詳解

2020-07-10 12:03:37
字體:
供稿:網(wǎng)友
Yum可以從眾多軟件包倉庫中搜索軟件的依賴關(guān)系,因此可以減少由于依賴關(guān)系帶來的問題。還有就是我們在使用圖形界面時,在應(yīng)用程序-添加刪除軟件下的瀏覽里是空的。如下圖:

第一種方法:(推薦)
第一步:新建一個文件夾,并把光盤內(nèi)的所有文件復(fù)制到這個文件夾里:
[root@localhost ~]# mkdir /yum
[root@localhost ~]# cp -rvf /misc/cd/* /yum
第二步:備份repodata文件。因為有四個文件夾里都有這個文件,所以都要備份。
[root@localhost ~]# mv /yum/Server/repodata /yum/Server/repodata.bak
[root@localhost ~]# mv /yum/VT/repodata /yum/VT/repodata.bak
[root@localhost ~]# mv /yum/Cluster/repodata /yum/Cluster/repodata.bak
[root@localhost ~]# mv /yum/ClusterStorage/repodata /yum/ClusterStorage/repodata.bak
第三步:安裝工具包:
[root@localhost ~]# rpm -ivh /yum/Server/createrepo-0.4.11-3.el5.noarch.rpm
第四步:生成倉庫數(shù)據(jù)庫:
[root@localhost ~]# createrepo -g /yum/Server/repodata.bak/comps-rhel5-server-core.xml /yum/Server/
[root@localhost ~]# createrepo -g /yum/VT/repodata.bak/comps-rhel5-vt.xml /yum/VT/
[root@localhost ~]# createrepo -g /yum/Cluster/repodata.bak/ /yum/Cluster
[root@localhost ~]# createrepo -g /yum/ClusterStorage/repodata.bak/comps-rhel5-cluster-st.xml /yum/ClusterStorage/
第五步:查看倉庫數(shù)據(jù)文件:
[root@localhost ~]# ls /yum/Server/repodata/
comps-rhel5-server-core.xml //這個文件軟件包組的分類。
filelists.xml.gz other.xml.gz primary.xml.gz //這三個文件為軟件包列表文件。
repomd.xml   //這個文件為MD5校驗信息。
在/yum/VT /yum/Cluster /yum/ClusterStorage下面都有這幾個文件,作用和這一樣。如果想更新軟件包,只需把下載完的軟件包放在Server或者其他三個目錄里,再使用第四步重新生成數(shù)據(jù)庫文件即可。
第六步:客戶端配置:主要修改下面紅色的部分:
[root@localhost ~]# cp /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/chenbin.repo
[root@localhost ~]# vi /etc/yum.repos.d/chenbin.repo
[rhel-Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-VT]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
第七步:查看:如圖,已經(jīng)出現(xiàn)軟件列表了。

如果在上圖中的編輯里選擇軟件存儲庫,就出現(xiàn)下圖:

如果把這里的勾去掉,再次打開就沒有軟件列表了,同時在/etc/yum.repos.d/chenbin.repo配置文件下的enabled=0。
清除一下yum安裝時的緩存:
[root@localhost ~]# yum clean all
安裝一個軟件試試:
[root@localhost ~]# rpm -ivh /yum/Server/httpd-2.2.3-22.el5.i386.rpm
warning: /yum/Server/httpd-2.2.3-22.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        libapr-1.so.0 is needed by httpd-2.2.3-22.el5.i386
        libaprutil-1.so.0 is needed by httpd-2.2.3-22.el5.i386
因為依賴關(guān)系,所以不能安裝。用如下命令安裝:
[root@localhost ~]# yum install /yum/Server/httpd-2.2.3-22.el5.i386.rpm
系統(tǒng)會自動安裝完成。Yum 主站蜘蛛池模板: 论坛| 永定县| 安国市| 安阳市| 通州市| 哈尔滨市| 古交市| 利川市| 东兴市| 舟曲县| 新竹县| 太康县| 沛县| 永州市| 钟山县| 龙陵县| 洛宁县| 惠来县| 化州市| 弥渡县| 卓资县| 广东省| 仙居县| 德令哈市| 吉林市| 合川市| 琼结县| 牡丹江市| 红桥区| 都匀市| 方山县| 兴海县| 定结县| 高唐县| 林甸县| 朝阳市| 积石山| 玛纳斯县| 商丘市| 泉州市| 吴堡县|