yum仓库的灵活部署和nfs共享存储服务
一、yum仓库的灵活部署
1、YUM (Yellow dog Updater Modified)
●基于RPM包构建的软件更新机制
●可以自动解决依赖关系
●所有软件包由集中的YUM软件仓库提供
2、yum仓库搭建
首先将硬盘挂载。挂载:将硬件设备和系统内的一个文件夹做关联,访问此文件夹就相当于访问硬件设备
挂载命令: mount + 硬件设备文件夹 挂载点
将所有源移到自己创建的文件夹并创建自己的本地源
清空缓存并且重新加载元数据
3、通过httpd服务搭建yum仓库
适用范围:多台不能使用/etc/yum.repos.d/配置文件中的外网源进行下载软件,且有至少一个服务有系统完整rpm包的光驱的情况下。
安装httpd服务并在/var/www/html目录下创建一个光驱挂载目录centos7,并将光驱挂载到centos7目录下。
vim httpd.repo 配置文件
1 2 3 4 5 | [httpd] #备注为httpd name=httpd #名称为httpd baseurl=http: //192.168.30.11/centos7#yum来源为192.168.30.11的httpd服务的/centos7文件下 gpgcheck=0 #不进行安全检查 enabled=1 #默认启动 |
在PC2验证
二、建立国内yum源
1、外网源地址
centos7源 #阿里云 |
https://mirrors.aliyun.com/centos/$releasever/ |
#腾讯云 | https://mirrors.cloud.tencent.com/centos/$releasever/ |
#华为云 | https://repo.huaweicloud.com/centos/$releasever/ |
#清华大学 | https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/ |
EPEL的yum源 #阿里云 |
https://mirrors.aliyun.com/epel/$releasever/x86_64 |
#腾讯云 | https://mirrors.cloud.tencent.com/epel/$releasever/x86_64 |
#华为云 | https://mirrors.huaweicloud.com/epel/$releasever/x86_64 |
#清华大学 | https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/x86_64 |
#更新源 | http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ |
http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ |
2、删除所有源并创立国内源
修改配置文件
打开httpd服务,关闭防火墙并验证
三、NFS共享服务
1、存储类型
-
直连式存储:存储和主机是直连的,简称DAS
-
网络附加存储:主机核存储设备距离先对较远 ,只提供空间不提供文件系统,简称NAS
-
存储区域网络:存储在远程,文件系统也在远程,简称SAN
2、搭建NFS服务
1 2 3 4 5 | #yum install nfs-utils.x86_64 rpcbind -y #安装软件包 [root@localhost httpd]#mkdir /share #新建共享目录 [root@localhost httpd]#cd /share/ [root@localhost share]#chmod -R 777 /share/ #修改权限 [root@localhost share]#vim /etc/exports #编辑配置文件 |
1 2 3 | #vim /etc/exports #编辑配置文件 /share 192.168.10.0/24(rw,sync,no_root_squash) #共享目录 网段 读写,同步,无root权限 |
3、客户端验证服务
本文作者:twistfate123
本文链接:https://www.cnblogs.com/trist-commot/p/16991411.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步