Using the CentOS yum component for RedHat is a little troublesome. For your convenience, I wrote a script for automatic configuration .... Yum uses epel and the University of Science and Technology. #/Bin/bash # byrfyiamcool # echo "nameserver8.8.8" & gt;/etc/resolv. confm
Using the CentOS yum component for RedHat is a little troublesome. For your convenience, I wrote a script for automatic configuration ....
Yum uses epel and the University of Science and Technology.
- #/Bin/bash
- # By rfyiamcool
- # Echo "nameserver 8.8.8.8">>/Etc/resolv. conf
- Mkdir/root/yum
- Cd/root/yum
- Rpm-qa | grep yum | xargs rpm-e -- nodeps
- If! Rpm-qa | grep yum; then
- Echo uninstall yum OK
- Else
- Rpm-qa | grep yum
- Exit
- Fi
- Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
- Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
- Wget http://centos.ustc.edu.cn/centos/5/ OS /i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
- Echo dowoload cetnos-yum OK
- Rpm-ivh yum-*. rpm
- Echo install cetnos-yum OK
- Cd/etc/yum. repos. d
- Wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
- Rpm -- import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
- Cat>>Epel. repo<<EOF
- [Epel]
- Name=ExtraPackages for Enterprise Linux 5-\ $ basearch
- #Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/?#basearch
- Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-5 &Arch=\$ Basearch
- Failovermethod=Priority
- Enabled=1
- Gpgcheck=1
- Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
-
- [Epel-debuginfo]
- Name=ExtraPackages for Enterprise Linux 5-\ $ basearch-Debug
- Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/?#basearch/debug
- #Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-Debug-5 &Arch=\$ Basearch
- Failovermethod=Priority
- Enabled=1
- Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
- Gpgcheck=1
-
- [Epel-source]
- Name=ExtraPackages for Enterprise Linux 5-\ $ basearch-Source
- #Baseurl=Http: // Download.fedoraproject.org/pub/epel/5/SRPMS
- Shortlist=Http: // Mirrors.fedoraproject.org/sharelist?Repo=Epel-Source-5 &Arch=\$ Basearch
- Failovermethod=Priority
- Enabled=1
- Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
- Gpgcheck=1
- EOF
- Yum makecache
- Yum list httpd *