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

yum命令安装route:1.

安装yumdownloader命令 yum install yum-utils -y

2.

查看系统是否安装了traceroute rpm -q traceroute

3.

下载rpm包 yum install traceroute --downloadonly --downloaddir=/usr/local

4.

拷贝rpm包到离线环境,执行安装命令 rpm -Uvh --force --nodeps *.rpm


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

原文地址: http://outofmemory.cn/tougao/6051913.html

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

发表评论

登录后才能评论

评论列表(0条)

保存