云计算学习路线教程大纲课件:使用自建源

发布时间:2020-05-30 17:50:57 作者:wx5d6de969e8c0b
来源:网络 阅读:208

云计算学习路线教程大纲课件:使用自建源:

====================================================================================

综合案例:建立YUM服务器

  1. 提供基础软件包Base [光盘]

  2. 提供update软件包

  3. 提供其它软件包如nginx, zabbix, docker, hadoop, openstack

配置防火墙

[root@yum-server ~]# firewall-cmd --permanent --add-service=ftp

[root@yum-server ~]# firewall-cmd --reload

关闭SELinux

[root@yum-server ~]# setenforce 0

[root@yum-server ~]# vim /etc/sysconfig/selinux

SELINUX=disabled

FTP

[root@yum-server ~]# yum -y install vsftpd

[root@yum-server ~]# systemctl start vsftpd

[root@yum-server ~]# systemctl enable vsftpd

实现目标1:提供基础软件Base

挂载centos镜像

[root@yum-server ~]# mkdir /var/ftp/{centos6u8,centos7u3}

[root@yum-server ~]# mount /home/centos7u3.iso /var/ftp/centos7u3

[root@yum-server ~]# echo "mount /home/centos7u3.iso /var/ftp/centos7u3" >> /etc/rc.d/rc.local

[root@yum-server ~]# chmod +x /etc/rc.d/rc.local

Yum client测试

[root@yum-client ~]# rm -rf /etc/yum.repos.d/CentOS-Base.repo

[root@yum-client ~]# vi /etc/yum.repos.d/centos7u3.repo //添加Yum源

[centos7u3]

name=centos7u3

baseurl=ftp://192.168.122.202/centos7u3

gpgcheck=0

enabled=1

[root@yum-client ~]# yum makecache

[root@yum-client ~]# yum repolist

[root@yum-client ~]# yum -y install wget lftp bash-com* vim-enhanced

实现目标2: 提供update

启动yum缓存

[root@yum-server ~]# vim /etc/yum.conf

[main]

cachedir=/var/cache/yum/$basearch/$releasever

keepcache=1

[root@yum-server ~]# yum clean all

[root@yum-server ~]# yum -y update

[root@yum-server ~]# mkdir /var/ftp/update

[root@yum-server ~]# find /var/cache/yum/x86_64/7/ -iname "*.rpm" -exec cp -rf {} /var/ftp/update \;

[root@yum-server ~]# yum -y install createrepo

[root@yum-server ~]# createrepo /var/ftp/update

Yum client测试

[root@yum-client ~]# rm -rf /etc/yum.repos.d/CentOS-Base.repo

[root@yum-client ~]# vi /etc/yum.repos.d/update.repo

[update]

name=centos update

baseurl=ftp://192.168.122.202/update

gpgcheck=0

enabled=1

[root@yum-client ~]# yum repolist

Loaded plugins: fastestmirror

repo id repo name status

update centos update 75

repolist: 75

[root@yum-client ~]# yum -y update

实现目标3: 提供其它软件包如nginx, zabbix

--downloadonly

  1. 配置nginx及zabbix源

[root@yum-server ~]# vim /etc/yum.repos.d/nginx.repo

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/centos/7/$basearch/

gpgcheck=0

enabled=1

  1. downloadonly

[root@yum-server ~]# yum clean all

[root@yum-server ~]# yum install nginx --downloadonly

[root@yum-server ~]# mkdir /var/ftp/{nginx,zabbix}

[root@yum-server ~]# find /var/cache/yum/x86_64/7/ -iname "*.rpm" -exec cp -rf {} /var/ftp/nginx

  1. 创建reopdata:

[root@yum-server ~]# createrepo /var/ftp/nginx //如果加入新软件包,重新创建

Yum client测试

[root@yum-client ~]# vi /etc/yum.repos.d/nginx.repo

[nginx]

name=nginx

baseurl=ftp://192.168.122.202/nginx

gpgcheck=0

enabled=1

[root@yum-client ~]# yum repolist

repo id repo name status

nginx nginx 1

update centos update 75

[root@yum-client ~]# yum -y install nginx

客户端使用YUM源:

添加base,update,nginx,zabbix yum源

  1. 手动

  2. Shell

  3. Saltstack, Asible, Puppet

本地源:例如使用安装光盘 [了解]

  1. 挂载安装光盘(临时):

[root@tianyun ~]# mount /dev/cdrom /media

[root@tianyun ~]# mount -o loop centos7u3.iso /media

  1. 添加yum源

[root@tianyun ~]# vim /etc/yum.repos.d/centos7u3.repo

[centos7u3]

name=centos7u3

baseurl=file:///media

gpgcheck=0

enabled=1

====================================================================================

推荐阅读:
  1. 云计算学习路线教程大纲课件:部署网校系统 edusoho
  2. 云计算学习路线教程大纲课件:部署论坛系统Discuz

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

云计算学习 路线

上一篇:Cisco ASA5512 双线

下一篇:python正则表达式-2day

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》