Install the virtual machine Ah, use the company given CentOS 6.0 ISO image, the image is cropped, and work to use the mercurial (HG) version Control tool, so you need yum install mercurial.
Just started to install the system, yum install mercurial prompt can not resolve the domain name, should be network connection, select Bridge mode, and then/etc/sysconfig/network-scripts/ifcfg-eth0 the directory under the configuration network, add
Bootproto=static
ipaddr=192.168.30.102
netmask=255.255.255.0
gateway=192.168.30.1
dns1=8.8.8.8
The
field, where Dns1=8.8.8.8, is Google's free DNS server IP address, google the IP address of another free DNS server is: 8.8.4.4. Users can use the Google-provided dns server Internet. The IPAddr field is the same network segment that I chose for my physical host, because the bridge is used to vmnet0 the network card.
then perform/etc/init.d/network Restart restart the network service at this time, you can connect the extranet.
At this point, using the Yum install mercurial hint can not find the mercurial package, the little girl to help look at the ISO, said to see if there is no mercurial,mount-o loop/dev/cdrom/mnt, the command is mounted drive to/ The MNT directory then modifies the/etc/yum.repos.d/centos-media.repo, which is the Yum installation is the local source of the lookup, modifying the file's Bsaeurl to baseurl=file:///mnt/, This will find the installation package inside the. iso. Then, delete the contents of the/var/cache/yum/directory, execute the Yum clean all, reinstall the install, or download it.
Need to reinstall a Yum network source, select rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm Download, then perform RPM-IVH ***.rpm, install, at this time in/ETC/YUM.REPOS.D, a Rpmforge.repo file appears under the directory, the file is a network source, the local source is disabled and the need for MV/Etc/yum.repos.d/centos-media.repo /etc/yum.repos.d/centos-media.repo.bak, then delete the contents of the/var/cache/yum/directory, execute yum Clean all, reinstall, at this time, on the other machine can be installed successfully, but in my VM still not, and then simply put the directory /etc/ all files under yum.repos.d/are deleted, and a new. Repo file is created.
[ZJJ]
Name = ZJJ
BaseURL = http://vault.centos.org/6.0/os/x86_64/ (change address most important, download package from this URL)
Enabled = 1
Gpgkey = File:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
Gpgcheck = 0
, and then reinstall the install, success.
Rpm-qa | grep * * *: View installing those RPM packages
Yum List | grep * * *: View installed those packages.
All. Repo files under the/etc/yum.repos.d/directory are searched, where media is the local source and the other is the network source
CentOS Install Yum Network source