Centos搭建本地YUM源
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
yum install -y createrepo yum-utils [base] name=CentOS-7 - Base - t4x.org baseurl=http://mirrors.163.com/centos/7/os/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 [updates] name=CentOS-7 - Updates - t4x.org baseurl=http://mirrors.163.com/centos/7/updates/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 [extras] name=CentOS-7 - Extras - t4x.org baseurl=http://mirrors.163.com/centos/7/extras/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 [epel] name=CentOS-7 - EPEL - t4x.org baseurl=https://mirrors.aliyun.com/epel/7/x86_64/ gpgcheck=0 reposync -n --repoid=extras --repoid=updates --repoid=base -p /data/www/yum/centos/7/x86_64/ [root@yum 7]# createrepo -po /data/www/yum/centos/7/base/ /data/www/yum/centos/7/base/ Spawning worker 0 with 10019 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete [root@yum 7]# createrepo -po /data/www/yum/centos/7/base/ /data/www/yum/centos/7/ base/ epel/ extras/ updates/ [root@yum 7]# createrepo -po /data/www/yum/centos/7/extras/ /data/www/yum/centos/7/extras/ Spawning worker 0 with 261 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete [root@yum 7]# createrepo -po /data/www/yum/centos/7/extras/ /data/www/yum/centos/7/ base/ epel/ extras/ updates/ [root@yum 7]# createrepo -po /data/www/yum/centos/7/epel/ /data/www/yum/centos/7/epel/ Spawning worker 0 with 13328 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete [root@yum 7]# createrepo -po /data/www/yum/centos/7/epel/ /data/www/yum/centos/7/ base/ epel/ extras/ updates/ [root@yum 7]# createrepo -po /data/www/yum/centos/7/updates/ /data/www/yum/centos/7/updates/ [root@yum tmp]# cat /usr/local/nginx/conf/extra/yum.conf server { listen 80; server_name localhost; location / { autoindex on; autoindex_localtime on; autoindex_format html; charset utf-8,gbk; root /data/www/yum; index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /data/www/yum; } } [base] name=CentOS-7 - Base - t4x.org baseurl=http://mirrors.t4x.org/centos/$releasever/base/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-7 - Updates - t4x.org baseurl=http://mirrors.t4x.org/centos/$releasever/updates/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-7 - Extras - t4x.org baseurl=http://mirrors.t4x.org/centos/$releasever/extras/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 [epel] name=CentOS-7 - EPEL - t4x.org baseurl=http://mirrors.t4x.org/centos/$releasever/epel gpgcheck=0 |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!