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 - Debug

baseurl=file:///yum/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

第六步:清除yum安装时的缓存:

[root@localhost ~]# yum clean all

工具/材料

linux下任意版本(Fedora和RedHat以及CentOS默认已拥有)

01

我这里使用ubuntu给大家进行演示

02

有图像界面的用户使用ctrl+alt+t呼出终端,在终端里面弊猛输入yum,它会告诉你,你还没有安装,并且把姿镇安装的方法一起告诉你了

03

输入它下面提示的命令,按下回车键

04

之后会提示它接下来的 *** 作,这里输入y(不区分大小写)

05

安装完成之后就可以使用了,输入yum,会告诉你有哪些参数可以使用,

安装租册桥软件使用 yum install 软件名

特别提示

除了Fedora和RedHat以及CentOS,其他版本安装软件可能会有不兼容现象,慎用

linux系统下没有yum命令怎么解决呢?下面是具体 *** 作步骤:

1、切换到root用则物配户身份。普通用孙指户切换为root用户:在终端运蚂灶行命令sudo-s。

2、检测是否安装了build-essential程序包,输入命令:apt-getinstallbuild-essential。

3、安装yum,输入命令:apt-getinstallyum。

4、yum安装成功即可。

以上就是小编今天的分享了,希望可以帮助到大家。


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

原文地址:https://54852.com/tougao/12423122.html

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

发表评论

登录后才能评论

评论列表(0条)

    保存