如何在Oracle Linux環境上安裝yum

yum用於下載和安裝軟件的工具,下面的步驟用於如何在OEL6上安裝yum以及添加一個yum庫(epel-repository)
sudo su -
export ALL_PROXY=www-proxy.us.oracle.com:80
export http_proxy=www-proxy.us.oracle.com:80

### OEL6 ONLY: avoid HTTP config issue with PDIT OEL6 image -- more details at http://aseng-wiki.us.oracle.com/asengwiki/display/ASDevWorkplace/OEL+6+Support
mv /etc/httpd/conf.d/mod_dnssd.conf /etc/httpd/conf.d/mod_dnssd.conf.off


vi /etc/yum.conf
add this text near the top, in the [main] section:
proxy=http://www-proxy.us.oracle.com:80

### OEL5 ONLY
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

### OEL6 ONLY
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

****** BE SURE WGET WAS SUCCESSFUL -- sometimes some parts of it randomly fail and need to be rerun ****

yum -y install epel-release-*.noarch.rpm
rm -f epel-release-*.noarch.rpm

# turn off automatic update scanning
/sbin/chkconfig yum-updatesd off
/sbin/chkconfig yum-updateonboot off

### at this point, you could install git
yum -y install git --nogpgcheck

### back to a regular user...
exit
發佈了66 篇原創文章 · 獲贊 9 · 訪問量 17萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章