linux如何安装yum

linux如何安装yum,第1张

第一步:创建一个文件,并把光盘的内容全部复制到该文件夹内:[root@localhost ~]# mkdir /yum[root@localhost ~]# cp -rvf /misc/cd/* /yum第二步:安装工具包:[root@localhost ~]# rpm -ivh /yum/Server/createrepo-0.4.11-3.el5.noarch.rpm第三步:生成仓库数据库:[root@localhost ~]# cd /yum[root@localhost yum]# createrepo . //注意后面的.第四步:查看文件:[root@localhost yum]# ls /yum/repodata/filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml第五步:客户端配置:[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-chenbin]name=Red Hat Enterprise Linux $releasever - $basearch - Debugbaseurl=file:///yum/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release第六步:清除yum安装时的缓存:[root@localhost ~]# yum clean all

如果在创建文件夹时,提示权限不够,用root用户登录就可解决

使用命令"ll"或"ls"查看yum文件夹下的文件,一个 yum-3.2.28.tar.gz 压缩文件,一个 yum-3.2.28 文件夹,代表解压成功

解压后先不着急安装 ,手动创建一个yum的conf文件

不然会报错 yum.cli:Config Error: Error accessing file for config file:///etc/


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/6051909.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-13
下一篇 2023-03-13

发表评论

登录后才能评论

评论列表(0条)

保存