yum was original developed by the Duke University
http://linux.duke.edu/projects/
http://yum.baseurl.org/
# install the package
# yum install mysql.i386
list repository available
# yum list all/available/updates
we can also use similar text to search the available packages
# yum list git
updates 100% |=========================| 2.6 kB 00:00
fedora 100% |=========================| 2.1 kB 00:00
Available Packages
git.i386 1.5.3.4-1.fc8 fedora
list local installed packages
# yum list installed
remove package
# yum remove openssl.i686
show the information of the specified package
# yum info openssl.i686
// We need to install yum-utils.noarch package to get the repoquery, yumdownloader tools
# yum install yum-utils.noarch
list all the files provided by a specified yum package
e.g.
# repoquery --list openssl.i686
Just download the rpm package, no need to install it
# /usr/bin/yumdownloader nc (No need to spend the full file name, just use the name-prefix is enough)
# /usr/bin/yumdownloader tftp.i386
Search a specific tool in which rpm file. We can search from the following site.
http://rpm.pbone.net/
# yum list all | grep ncftp
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
1.
If you are fail to connect to the yum server. Sometimes this is because you don't probably set the name server in the /etc/resolv.conf
Try to ping the yum server
# ping download.fedora.redhat.com
After setting the /etc/resolv.conf
nameserver 168.95.1.1
nameserver 140.113.1.1
We can continue to use yum as normally.
2.
yum clean all
add yum repository files to the yum configuration file pool, e.g. add pptp.repo of pptp, than we can retrieve others files/progs from the pptp yum repository
# cat /etc/yum.repos.d/pptp.repo
# cat /etc/yum.repos.d/pptp.repo
[pptp-stable]
name=PPTP Client stable repository for Fedora Core $releasever ($basearch)
#baseurl=http://pptpclient.sourceforge.net/yum/stable/fc$releasever/$basearch
mirrorlist=http://pptpclient.sourceforge.net/yum/stable/mirrorlist-pptp-stable-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PPTP
[pptp-beta]
omit...
[poptop-stable]
omit...
[poptop-beta]
omit...
# yum --enablerepo=pptp-stable install pptpconfig // "pptp-stable" indicate the tag in the yum config
沒有留言:
張貼留言