本篇文章為大家展示了怎么制作內(nèi)網(wǎng)yum源,內(nèi)容簡(jiǎn)明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。
成都創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供獻(xiàn)縣網(wǎng)站建設(shè)、獻(xiàn)縣做網(wǎng)站、獻(xiàn)縣網(wǎng)站設(shè)計(jì)、獻(xiàn)縣網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、獻(xiàn)縣企業(yè)網(wǎng)站模板建站服務(wù),10年獻(xiàn)縣做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。
本文參考:http://www.studylinux.net/?p=4515
操作系統(tǒng)centos7(selinux firewalld關(guān)閉 )
安裝cobbler命令修改為阿里的yum源 163的也可以
wget -O /etc/yum.repos.d/CentOS-Base.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3.安裝cobbler命令
最好都安裝上
yum -y install cobbler dhcp httpd xinetd tftp-server
4.啟動(dòng)服務(wù)器
[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 ~]# 如果出錯(cuò): [root@localhost ~]# rpm -ql cobbler|grep setting /etc/cobbler/settings 把 setting 文件中的server和server_next 修改為本機(jī)的IP,默認(rèn)是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]# 檢查校驗(yàn) [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 #在夜深人靜的時(shí)候同步效果顯著!
同步完畢制作
一個(gè)repo文件放在 /etc/yum.repos.d/
下面就可以了
上述內(nèi)容就是怎么制作內(nèi)網(wǎng)yum源,你們學(xué)到知識(shí)或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識(shí)儲(chǔ)備,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
分享標(biāo)題:怎么制作內(nèi)網(wǎng)yum源
分享URL:http://jinyejixie.com/article28/iiesjp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、網(wǎng)站排名、自適應(yīng)網(wǎng)站、網(wǎng)站策劃、ChatGPT、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)