12

centos配置软件安装源

 3 years ago
source link: https://www.80shihua.com/archives/2322
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

centos配置软件安装源

作者: dreamfly 分类: linux 发布时间: 2020-04-08 07:53

yum命令

我们知道windows上安装软件非常方便,只需要点击下一步就可以了,但是查找软件,下载软件却并不简单,有时候可能会花费大量的时间,相比于windows,linux安装软件非常简单,以centos举例,我们只需要一个命令就可以安装软件了。

yum instlall mysql

一行命令,一个软件就安装好了。

为什么一行命令就可以将下载软件和安装软件搞定了?原来yum命令会去寻找安装源,哪里面就是一个网址,而那个网址提供了许多软件的安装包,我们执行install命令的时候,就会从那些安装包中找到对应的安装包,然后下载,然后解压安装。

当然不同的源对应的安装包是不一样的,有些多,有些少,默认centos提供的源是在/etc/yum.repos.d/CentOS-Base.repo

我们可以下载自己的源

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

然后执行命令,就可以看到自己的软件包源了

yum makecache
yum -y update

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK