{"id":293,"date":"2015-09-09T06:30:07","date_gmt":"2015-09-09T06:30:07","guid":{"rendered":"http:\/\/onlinelab.info\/?p=293"},"modified":"2015-09-09T06:30:07","modified_gmt":"2015-09-09T06:30:07","slug":"cai-dat-yum-repository-server-cho-red-hat-va-centos","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/09\/cai-dat-yum-repository-server-cho-red-hat-va-centos\/","title":{"rendered":"C\u00e0i \u0111\u1eb7t Yum Repository Server cho Red Hat v\u00e0 CentOS"},"content":{"rendered":"<p>Trong th\u1ef1c t\u1ebf, khi c\u00e0i \u0111\u1eb7t ho\u1eb7c c\u1ea5u h\u00ecnh m\u1edbi m\u1ed9t m\u00e1y ch\u1ee7 qu\u1ea3n tr\u1ecb vi\u00ean c\u1ea7n k\u1ebft n\u1ed1i ra Internet \u0111\u1ec3 th\u1ef1c hi\u1ec7n ch\u1ea1y c\u00e2u l\u1ec7nh Yum. Vi\u1ec7c k\u1ebft n\u00f3i ra ngo\u00e0i Internet \u0111\u00f4i khi kh\u00f4ng c\u1ea7n thi\u1ebft. B\u00e0i vi\u1ebft s\u1ebd tr\u00ecnh b\u00e0y c\u00e1c b\u01b0\u1edbc thi\u1ebft l\u1eadp m\u1ed9t m\u00e1y ch\u1ee7 Yum \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e0i \u0111\u1eb7t d\u1ec5 d\u00e0ng h\u01a1n.<\/p>\n<p>B\u01b0\u1edbc 1: C\u00e0i \u0111\u1eb7t ph\u1ea7n m\u1ec1m createrepo<\/p>\n<pre class=\"bash\">yum install createrepo\n\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/i.imgur.com\/5anqFeX.jpg\" alt=\"\" width=\"447\" height=\"52\" title=\"\"><\/pre>\n<p>B\u01b0\u1edbc 2: B\u1ea1n th\u1ef1c hi\u1ec7n t\u1ea1o th\u01b0 m\u1ee5c ch\u01b0a g\u00f3i c\u00e0i \u0111\u1eb7t<\/p>\n<pre class=\"bash\">mkdir -p \/repos\/CentOS\/6\/5\/Packages<\/pre>\n<p>B\u01b0\u1edbc 3: T\u1ea1o kho repo v\u1edbi th\u01b0 m\u1ee5c \u0111\u00f3<\/p>\n<pre class=\"bash\">createrepo \/repos\/CentOS\/6\/5<\/pre>\n<p>B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n copy g\u00f3i m\u1edbi v\u00e0 c\u1eadp nh\u1eadt l\u1ea1i b\u1eb1ng c\u00e2u l\u1ec7nh<\/p>\n<pre class=\"bash\">createrepo --update \/repos\/CentOS\/6\/5<\/pre>\n<p>B\u01b0\u1edbc 4: C\u1eadp nh\u1eadt g\u00f3i tin b\u1eb1ng c\u00e1ch copy<\/p>\n<pre class=\"bash\">cp -arv \/media\/CentOS\/Packages\/* \/repos\/CentOS\/6\/5\/<\/pre>\n<p>B\u01b0\u1edbc 5: T\u1ea1o kho khi th\u1ef1c hi\u1ec7n copy<\/p>\n<pre class=\"bash\">createrepo \/repos\/CentOS\/6\/5<\/pre>\n<p>B\u01b0\u1edbc 6: B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n \u0111\u1ed3ng b\u1ed9 online<\/p>\n<pre class=\"bash\">\/usr\/bin\/rsync -avrt rsync:\/\/ftp.rezopole.net\/centos\/6.7\/os\/x86_64\/Packages\/ --exclude=debug \/var\/www\/html\/centos\/6\/base\/<\/pre>\n<p>B\u01b0\u1edbc 7: Th\u1ef1c hi\u1ec7n c\u00e0i \u0111\u1eb7t Apache<\/p>\n<pre class=\"bash\">yum install httpd<\/pre>\n<pre class=\"bash\">ln -s \/var\/www\/html\/CentOS \/repos\/CentOS<\/pre>\n<p>B\u01b0\u1edbc 8: Th\u1ef1c hi\u1ec7n c\u00e0i \u0111\u1eb7t vsftpd<\/p>\n<pre class=\"bash\">yum install vsftpd<\/pre>\n<pre class=\"bash\">ln -s \/var\/ftp\/public\/CentOS \/repos\/CentOS<\/pre>\n<p>B\u01b0\u1edbc 9:C\u1ea5u h\u00ecnh tr\u00ean m\u00e1y tr\u1ea1m<\/p>\n<pre class=\"bash\">[onlinelabrepo]\n name=Local CentOS Repo\n baseurl=http:\/\/onlinelab.info\/CentOS\/6\/5\n gpgcheck=0\n<\/pre>\n<p>Ch\u00fac b\u1ea1n th\u00e0nh c\u00f4ng.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trong th\u1ef1c t\u1ebf, khi c\u00e0i \u0111\u1eb7t ho\u1eb7c c\u1ea5u h\u00ecnh m\u1edbi m\u1ed9t m\u00e1y ch\u1ee7 qu\u1ea3n tr\u1ecb vi\u00ean c\u1ea7n k\u1ebft n\u1ed1i ra Internet \u0111\u1ec3 th\u1ef1c hi\u1ec7n ch\u1ea1y c\u00e2u l\u1ec7nh Yum. Vi\u1ec7c k\u1ebft n\u00f3i ra ngo\u00e0i Internet \u0111\u00f4i&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}