yum clean all
########################################################
更新:yum -y update
注意:若上面指令無法正常執行的話,
1. 仔細檢查上面三個設定檔有沒有錯誤
2. 執行「lftp apt.nc.hcc.edu.tw」,測試 ftp 連線是否正常
3. 下「yum clean all」指令,清掉 yum 在「/var/cache/yum」內的暫存檔案
4. 再次執行「yum -y update」
#############################################################
安裝 yum-updateonboot,讓系統在開機的時候就執行 yum 更新:
yum -y install yum-updateonboot
chkconfig yum-updateonboot on
重新開機:reboot
yum 指令介紹
更新:yum update
#############################################################
安裝:yum install xxx
移除:yum remove xxx
#############################################################
清除已經安裝過的檔案:yum clean packages(/var/cache/yum/)
搜尋:yum search xxx
列出所有檔案:yum list
查詢檔案訊息:yum info xxx
#############################################################
群組安裝功能:
yum grouplist
yum groupinstall "Web Server"
#############################################################
一些檔案:
rpm -qc yum
/var/log/yum.log
#############################################################
[研究] CentOS 6.0 yum server 指定義守大學方法
/etc/yum.repos.d/CentOS-Base.repo 用下面的取代
代碼:
# CentOS-Base.repo#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
沒有留言:
張貼留言