- بعد از نصب سیستمعامل CentOS 6.3 نیاز است تا بتوان یک سری از بروزرسانیها یا بستهها را از طریق مخازن دریافت نمود.
- بعد از نصب به احتمال زیاد به صورت پیشفرض نمیتوان به مخازن متصل شد. چرا که بسیاری از مخازن دیگر از این نسخه پشتیبانی نميکنند و تمام پروندههای RPM را از روی سرورهای خود پاک کردهاند.
- برای این منظور ابتدا یک ls از دایکتوری زیر بگیرید.
|
1 2 3 4 5 |
# ls -1 /etc/yum.repos.d/ CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo |
- پیشنهاد میشود یک نسخهی پشتیبان از پروندههای بالا تهیه کنید. در نهایت آنها را پاک کنید.
|
1 |
# rm -f /etc/yum.repos.d/* |
- روش بهتر به منظور غیرفعال کردن مخازن اشاره شده درون این پروندهها این است که هر کدام از این سه پرونده را باز کنید و مقدار متغیر enabled هر بخش را برابر با صفر قرار دهید. به صورت زیر
|
1 |
enabled=0 |
- در ادامه پروندهی CentOS-Base.repo را با یک ویرایشگر و محتویاط زیر را برای آن در نظر بگیرید.
|
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 |
[base] name=CentOS-$releasever - Base <span style="color: #ff0000;"><strong>baseurl=http://vault.centos.org/6.3/os/x86_64/</strong></span> <span style="color: #800080;"><strong># baseurl=https://archive.kernel.org/centos-vault/6.3/os/x86_64/</strong></span> <span style="color: #0000ff;"><strong># baseurl=http://mirror.nsc.liu.se/centos-store/6.3/os/x86_64/</strong></span> <span style="color: #008000;"><strong># baseurl=http://linuxsoft.cern.ch/centos-vault/6.3/os/x86_64/</strong></span> gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [updates] name=CentOS-$releasever - Updates <span style="color: #ff0000;"><strong>baseurl=http://vault.centos.org/6.3/updates/x86_64/</strong></span> <span style="color: #800080;"><strong># baseurl=https://archive.kernel.org/centos-vault/6.3/updates/x86_64/</strong></span> <span style="color: #0000ff;"><strong># baseurl=http://mirror.nsc.liu.se/centos-store/6.3/updates/x86_64/</strong></span> <span style="color: #008000;"><strong># baseurl=http://linuxsoft.cern.ch/centos-vault/6.3/updates/x86_64/</strong></span> gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [extras] name=CentOS-$releasever - Extras <span style="color: #ff0000;"><strong>baseurl=http://vault.centos.org/6.3/extras/x86_64/</strong></span> <span style="color: #800080;"><strong># baseurl=https://archive.kernel.org/centos-vault/6.3/extras/x86_64/</strong></span> <span style="color: #0000ff;"><strong># baseurl=http://mirror.nsc.liu.se/centos-store/6.3/extras/x86_64/</strong></span> <span style="color: #008000;"><strong># baseurl=http://linuxsoft.cern.ch/centos-vault/6.3/extras/x86_64/</strong></span> gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [centosplus] name=CentOS-$releasever - Plus <span style="color: #ff0000;"><strong>baseurl=http://vault.centos.org/6.3/centosplus/x86_64/</strong></span> <span style="color: #800080;"><strong># baseurl=https://archive.kernel.org/centos-vault/6.3/centosplus/x86_64/</strong></span> <span style="color: #0000ff;"><strong># baseurl=http://mirror.nsc.liu.se/centos-store/6.3/centosplus/x86_64/</strong></span> <span style="color: #008000;"><strong># baseurl=http://linuxsoft.cern.ch/centos-vault/6.3/centosplus/x86_64/</strong></span> gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [contrib] name=CentOS-$releasever - Contrib <span style="color: #ff0000;"><strong>baseurl=http://vault.centos.org/6.3/contrib/x86_64/</strong></span> <span style="color: #800080;"><strong># baseurl=https://archive.kernel.org/centos-vault/6.3/contrib/x86_64/</strong></span> <span style="color: #0000ff;"><strong># baseurl=http://mirror.nsc.liu.se/centos-store/6.3/contrib/x86_64/</strong></span> <span style="color: #008000;"><strong># baseurl=http://linuxsoft.cern.ch/centos-vault/6.3/contrib/x86_64/</strong></span> gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 |
- نکته : نسخهای که ما در نظر گرفتهایم ، ۶۴ بیتی است.
- نکته : در پروندهی بالا برای متغیر baseurl چهار مخزن جدا در نظر گرفته شده است که سه مخزن به عنوان بکآپ بوده و کاربر به صورت دسترسی باید بین این مخازن یکی را انتخاب نماید.
- نکته : ممکن مشکلی با مخزن دوم که به صورت https است به وجود آيد.
- نکته : پیشنهاد میشود اگر سرور عملیاتی است ، مقدار متغیر gpgcheck را برابر با یک قرار دهید.
- در نهایت کافیست سرور را به صورت زیر بروزرسانی کنید.
|
1 2 3 |
# yum repolist # yum clean all # yum update |
- تست شده بر روی CentOS 6.3