centos___yum工具的使用

1.备份好源

cd /etc/yum.repos.d
mkdir repo_bak
mv *.repo repo_bak/    ##先mkdir repo_bak

##centos本身就有一份yum源

2.下载阿里云repo文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

##这里是使用国内的阿里云源
#配置好阿里云源

/etc/yum.repos.d/CentOS-Base.repo   #这个是路径

3.清空yum缓存并且生成新的yum缓存

yum clean all
yum makecache

4.系统服务管理命令

systemctl restart network
systemctl start network
systemctl stop network
systemctl status network

5.yum命令的使用

yum repolist all        列出所有仓库
yum list all            列出仓库所有软件包
yum info 软件包名            查看软件包信息
yum install 软件包名        安装软件包
yum reinstall 软件包名    重新安装软件包
yum update    软件包名        升级软件包
yum remove    软件包名        移除软件包
yum clean all            清楚所有仓库缓存
yum check-update        检查可以更新的软件包
yum grouplist            查看系统中已安装的软件包
yum groupinstall 软件包组    安装软件包组

 

posted @ 2020-08-10 21:53  jalen-tian  阅读(96)  评论(0编辑  收藏  举报