怎么制作内网yum源-创新互联
本篇文章为大家展示了怎么制作内网yum源,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
创新互联建站是一家集网站建设,溧阳企业网站建设,溧阳品牌网站建设,网站定制,溧阳网站建设报价,网络营销,网络优化,溧阳网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。本文参考:http://www.studylinux.net/?p=4515
操作系统centos7(selinux firewalld关闭 )
安装cobbler命令修改为阿里的yum源 163的也可以
3.安装cobbler命令
最好都安装上
4.启动服务器
[root@localhost ~]# systemctl start httpd [root@localhost ~]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. [root@localhost ~]# systemctl start cobblerd [root@localhost ~]# systemctl enable cobblerd Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service. [root@localhost ~]# 如果出错: [root@localhost ~]# rpm -ql cobbler|grep setting /etc/cobbler/settings 把 setting 文件中的server和server_next 修改为本机的IP,默认是127.0.0.1 然后用cobbler check确定没有问题5.同步源
mkdir -p /var/www/cobbler/repo_mirror cd /var/www/cobbler/repo_mirror cobbler repo add --name=zabbix --mirror=http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/ --arch=x86_64 --breed=yum cobbler reposync task started: 2017-06-04_143254_reposync task started (id=Reposync, time=Sun Jun 4 14:32:54 2017) hello, reposync run, reposync, run! creating: /var/www/cobbler/repo_mirror/zabbix/config.repo creating: /var/www/cobbler/repo_mirror/zabbix/.origin/zabbix.repo running: /usr/bin/reposync -l -n -d --config=/var/www/cobbler/repo_mirror/zabbix/.origin/zabbix.repo --repoid=zabbix --download_path=/var/www/cobbler/repo_mirror -a x86_64 3.6 kB 00:00 4.3 kB 00:00 3.4 kB 00:00 3.4 kB 00:00 951 B 00:00 170 kB 00:01 155 kB 00:01 167 kB 00:01 epel/x86_64/updateinfo FAILED base/7/x86_64/primary_db FAILED 808 kB 00:08 4.7 MB 00:46 5.6 MB 01:19 5.6 MB 01:00 20 kB 00:00 230 kB 00:03 335 kB 00:07 714 kB 00:04 621 kB 00:15 622 kB 00:16 11 kB 00:00 240 kB 00:04 606 kB 00:08 1.7 MB 00:20 1.7 MB 00:16 5.1 kB 00:00 4.6 kB 00:00 4.7 kB 00:00 3.5 MB 00:48 received on stderr: running: createrepo -c cache -s sha /var/www/cobbler/repo_mirror/zabbix received on stdout: Spawning worker 0 with 7 pkgs Spawning worker 1 with 7 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete received on stderr: running: chown -R root:apache /var/www/cobbler/repo_mirror/zabbix received on stdout: received on stderr: running: chmod -R 755 /var/www/cobbler/repo_mirror/zabbix received on stdout: received on stderr: *** TASK COMPLETE *** [root@localhost repo_mirror]# 检查校验 [root@localhost repo_mirror]# cd /var/www/cobbler/repo_mirror/zabbix/ [root@localhost zabbix]# ll total 10644 drwxr-xr-x 2 root apache 4096 Jun 4 14:35 cache -rwxr-xr-x 1 root apache 111 Jun 4 14:32 config.repo drwxr-xr-x 2 root apache 4096 Jun 4 14:35 repodata -rwxr-xr-x 1 root apache 343120 Apr 25 03:56 zabbix-agent-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 235320 Apr 25 03:57 zabbix-get-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 730860 Apr 25 03:57 zabbix-java-gateway-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 636756 Apr 25 03:57 zabbix-proxy-mysql-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 636252 Apr 25 03:57 zabbix-proxy-pgsql-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 620776 Apr 25 03:57 zabbix-proxy-sqlite3-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 11416 Feb 15 2016 zabbix-release-3.0-1.el7.noarch.rpm -rwxr-xr-x 1 root apache 246096 Apr 25 03:57 zabbix-sender-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 1819916 Apr 25 03:57 zabbix-server-mysql-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 1818888 Apr 25 03:57 zabbix-server-pgsql-3.0.9-1.el7.x86_64.rpm -rwxr-xr-x 1 root apache 3679892 Apr 25 03:57 zabbix-web-3.0.9-1.el7.noarch.rpm -rwxr-xr-x 1 root apache 5224 Apr 25 03:57 zabbix-web-japanese-3.0.9-1.el7.noarch.rpm -rwxr-xr-x 1 root apache 4756 Apr 25 03:57 zabbix-web-mysql-3.0.9-1.el7.noarch.rpm -rwxr-xr-x 1 root apache 4768 Apr 25 03:57 zabbix-web-pgsql-3.0.9-1.el7.noarch.rpm [root@localhost zabbix]#apache 映射的地址
http://192.168.56.113/cobbler/repo_mirror/zabbix/
[root@bogon ~]# vim /etc/yum.repos.d/zabbix.repo [local-zabbix] #可以自己定义 name=local zabbix baseurl=http://192.168.56.113/cobbler/repo_mirror/zabbix/ enabled=1 gpgcheck=0下面我就没接着写 参考链接的
[root@aqdl ~]# cobbler repo add --name=epel --mirror=https://mirrors.aliyun.com/epel/7/x86_64/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler repo add --name=saltstack --mirror=http://repo.saltstack.com/yum/redhat/latest/x86_64/latest/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler repo add --name=openstack-mitaka --mirror=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-mitaka/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler repo add --name=updates --mirror=https://mirrors.aliyun.com/centos/7/updates/x86_64/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler repo add --name=extras --mirror=https://mirrors.aliyun.com/centos/7/extras/x86_64/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler repo add --name=os --mirror=https://mirrors.aliyun.com/centos/7/os/x86_64/ --arch=x86_64 --breed=yum [root@aqdl ~]# cobbler reposync #在夜深人静的时候同步效果显著!同步完毕制作
一个repo文件放在 /etc/yum.repos.d/
下面就可以了
上述内容就是怎么制作内网yum源,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前题目:怎么制作内网yum源-创新互联
分享地址:http://azwzsj.com/article/cejhji.html