ËùÒÔ´òËã¹ÒÔر¾µØ×Ô¼ºÖÆ×÷µÄrhel-5-server-dvd.isoÀ´½â¾ö±¾µØ×ÔÓÉÌí¼Óɾ³ý³ÌÐòÎÊÌ⣡
˵Ã÷²»ÐèÒª¸ü¸Ä/etc/yum.confÎļþÄÚÈÝ£¬½¨Á¢/media/rhelĿ¼
1. mount -o loop rhel-5-server-dvd.iso /media/rhel
2. vi /etc/yum.repos.d/rhel-local.repo
[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file£º///media/rhel/Cluster
enabled=1
gpgcheck=1
gpgkey=file£º///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=file£º///media/rhel/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file£º///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=file£º///media/rhel/Server
enabled=1
gpgcheck=1
gpgkey=file£º///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file£º///media/rhel/VT
enabled=1
gpgcheck=1
gpgkey=file£º///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
3
[root@rhel5 ~]# mkdir -p /var/rhel/{Cluster,ClusterStorage,Server,VT}
[root@rhel5 ~]# cd /var/rhel/
[root@rhel5 rhel]# ls
Cluster ClusterStorage Server VT
[root@rhel5 rhel5]# rpm -vih /media/rhel/Server/createrepo-0.4.4-2.fc6.noarch.rpm
4. createrepo -o /var/rhel/Cluster -g /media/rhel/Cluster/repodata/comps-rhel5-cluster.xml /media/rhel/Cluster
createrepo -o /var/rhel/ClusterStorage -g /media/rhel/ClusterStorage/repodata/comps-rhel5-cluster-st.xml
/media/rhel/ClusterStorage
createrepo -o /var/rhel/Server -g /media/rhel/Server/repodata/comps-rhel5-server-core.xml /media/rhel/Server
createrepo -o /var/rhel/VT -g /media/rhel/VT/repodata/comps-rhel5-vt.xml /media/rhel/VT
5. mount --bind /var/rhel/Cluster/repodata /media/rhel/Cluster/repodata
mount --bind /var/rhel/ClusterStorage/repodata /media/rhel/ClusterStorage/repodata
mount --bind /var/rhel/Server/repodata /media/rhel/Server/repodata
mount --bind /var/rhel/VT/repodata /media/rhel/VT/repodata
[root@rhel5 rhel5]# yum clean all
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Cleaning up Everything
È»ºóÔÙ´ÎÓ¦ÓóÌÐò---Ìí¼Ó/ɾ³ýÈí¼þʱ¾Í¿ÉÒÔÕý³£µÄ´Ó±¾µØÌí¼Óɾ³ýrpm °üÁË
»òÕß
[root@rhel5 rhel5]# system-config-packages
¼¸µã˵Ã÷£º
ʹÓÃcreaterepoÃüÁî´´½¨rpmË÷Òý
mount --bind ¹ÒÔØĿ¼Ê÷
[root@rhel5 rhel5]# createrepo --help
createrepo [options] directory-of-packages
Options:
-u, --baseurl
-o, --outputdir
-x, --exclude = files globs to exclude, can be specified multiple times
-q, --quiet = run quietly
-g, --groupfile
(
-v, --verbose = run verbosely
-c, --cachedir
-U, --update-info-location
-h, --help = show this help
-V, --version = output version
-p, --pretty = output xml files in pretty format.
[root@rhel5 rhel5]# mount --help
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
wanng ÓÚ 2007-11-22 18:54:36·¢±í:
À´ Ö§³ÖһϠлл