다음을 위한 저장소를 만들어 보겠습니다.
yum groupinstall "Desktop"
먼저 "test"라는 폴더를 만듭니다.
/root/Desktop/test
다음으로 "Desktop" 그룹 내부에 무엇이 있는지 알아야 합니다.
yum groupinfo "Desktop"
결과:
Group: Desktop
Description: A minimal desktop that can also be used as a thin client.
Mandatory Packages:
NetworkManager
NetworkManager-gnome
alsa-plugins-pulseaudio
at-spi
control-center
dbus
gdm
gdm-user-switch-applet
gnome-panel
gnome-power-manager
gnome-screensaver
gnome-session
gnome-terminal
gvfs-archive
gvfs-fuse
gvfs-smb
metacity
nautilus
notification-daemon
polkit-gnome
xdg-user-dirs-gtk
yelp
Default Packages:
control-center-extra
eog
gdm-plugin-fingerprint
gnome-applets
gnome-media
gnome-packagekit
gnome-vfs2-smb
gok
openssh-askpass
orca
pulseaudio-module-gconf
pulseaudio-module-x11
rhn-setup-gnome
vino
Optional Packages:
sabayon-apply
tigervnc-server
xguest
선택적 패키지는 무시될 것이라고 생각했습니다. 각 필수 및 기본 패키지에 대해 다음을 통해 다운로드했습니다.yumdownloader
이렇게 해보자:
cd /root/Desktop/test
그런 다음 각각을 다운로드합니다.
# Mandatory Packages:
yumdownloader --resolve NetworkManager
yumdownloader --resolve NetworkManager-gnome
yumdownloader --resolve alsa-plugins-pulseaudio
yumdownloader --resolve at-spi
yumdownloader --resolve control-center
yumdownloader --resolve dbus
yumdownloader --resolve gdm
yumdownloader --resolve gdm-user-switch-applet
yumdownloader --resolve gnome-panel
yumdownloader --resolve gnome-power-manager
yumdownloader --resolve gnome-screensaver
yumdownloader --resolve gnome-session
yumdownloader --resolve gnome-terminal
yumdownloader --resolve gvfs-archive
yumdownloader --resolve gvfs-fuse
yumdownloader --resolve gvfs-smb
yumdownloader --resolve metacity
yumdownloader --resolve nautilus
yumdownloader --resolve notification-daemon
yumdownloader --resolve polkit-gnome
yumdownloader --resolve xdg-user-dirs-gtk
yumdownloader --resolve yelp
#Default Packages:
yumdownloader --resolve control-center-extra
yumdownloader --resolve eog
yumdownloader --resolve gdm-plugin-fingerprint
yumdownloader --resolve gnome-applets
yumdownloader --resolve gnome-media
yumdownloader --resolve gnome-packagekit
yumdownloader --resolve gnome-vfs2-smb
yumdownloader --resolve gok
yumdownloader --resolve openssh-askpass
yumdownloader --resolve orca
yumdownloader --resolve pulseaudio-module-gconf
yumdownloader --resolve pulseaudio-module-x11
yumdownloader --resolve rhn-setup-gnome
yumdownloader --resolve vino
좋습니다. 모든 것이 "test" 폴더에 다운로드되었습니다. 이 "Test" 폴더에서 이 명령을 실행하여 "Desktop" 그룹을 생성해 보겠습니다.
yum-groups-manager -n "Desktop" --id=desktop --save=Desktop.xml \
--mandatory \
NetworkManager \
NetworkManager-gnome \
alsa-plugins-pulseaudio \
at-spi \
control-center \
dbus \
gdm \
gdm-user-switch-applet \
gnome-panel \
gnome-power-manager \
gnome-screensaver \
gnome-session \
gnome-terminal \
gvfs-archive \
gvfs-fuse \
gvfs-smb \
metacity \
nautilus \
notification-daemon \
polkit-gnome \
xdg-user-dirs-gtk \
yelp \
--default \
control-center-extra \
eog \
gdm-plugin-fingerprint \
gnome-applets \
gnome-media \
gnome-packagekit \
gnome-vfs2-smb \
gok \
openssh-askpass \
orca \
pulseaudio-module-gconf \
pulseaudio-module-x11 \
rhn-setup-gnome \
vino
실수:
yum-groups-manager: error: no such option: --default
"--default"를 제거하여 모든 것이 "강제"라고 생각하도록 하겠습니다.
yum-groups-manager -n "Desktop" --id=desktop --save=Desktop.xml \
--mandatory \
NetworkManager \
NetworkManager-gnome \
alsa-plugins-pulseaudio \
at-spi \
control-center \
dbus \
gdm \
gdm-user-switch-applet \
gnome-panel \
gnome-power-manager \
gnome-screensaver \
gnome-session \
gnome-terminal \
gvfs-archive \
gvfs-fuse \
gvfs-smb \
metacity \
nautilus \
notification-daemon \
polkit-gnome \
xdg-user-dirs-gtk \
yelp \
control-center-extra \
eog \
gdm-plugin-fingerprint \
gnome-applets \
gnome-media \
gnome-packagekit \
gnome-vfs2-smb \
gok \
openssh-askpass \
orca \
pulseaudio-module-gconf \
pulseaudio-module-x11 \
rhn-setup-gnome \
vino
파일이 생성되었습니다.Desktop.xml
그것이 어떻게 보이는지 봅시다:
[root@localhost test]# cat Desktop.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
<group>
<id>desktop</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>Desktop</name>
<description></description>
<packagelist>
<packagereq type="mandatory">NetworkManager</packagereq>
<packagereq type="mandatory">NetworkManager-gnome</packagereq>
<packagereq type="mandatory">alsa-plugins-pulseaudio</packagereq>
<packagereq type="mandatory">at-spi</packagereq>
<packagereq type="mandatory">control-center</packagereq>
<packagereq type="mandatory">control-center-extra</packagereq>
<packagereq type="mandatory">dbus</packagereq>
<packagereq type="mandatory">eog</packagereq>
<packagereq type="mandatory">gdm</packagereq>
<packagereq type="mandatory">gdm-plugin-fingerprint</packagereq>
<packagereq type="mandatory">gdm-user-switch-applet</packagereq>
<packagereq type="mandatory">gnome-applets</packagereq>
<packagereq type="mandatory">gnome-media</packagereq>
<packagereq type="mandatory">gnome-packagekit</packagereq>
<packagereq type="mandatory">gnome-panel</packagereq>
<packagereq type="mandatory">gnome-power-manager</packagereq>
<packagereq type="mandatory">gnome-screensaver</packagereq>
<packagereq type="mandatory">gnome-session</packagereq>
<packagereq type="mandatory">gnome-terminal</packagereq>
<packagereq type="mandatory">gnome-vfs2-smb</packagereq>
<packagereq type="mandatory">gok</packagereq>
<packagereq type="mandatory">gvfs-archive</packagereq>
<packagereq type="mandatory">gvfs-fuse</packagereq>
<packagereq type="mandatory">gvfs-smb</packagereq>
<packagereq type="mandatory">metacity</packagereq>
<packagereq type="mandatory">nautilus</packagereq>
<packagereq type="mandatory">notification-daemon</packagereq>
<packagereq type="mandatory">openssh-askpass</packagereq>
<packagereq type="mandatory">orca</packagereq>
<packagereq type="mandatory">polkit-gnome</packagereq>
<packagereq type="mandatory">pulseaudio-module-gconf</packagereq>
<packagereq type="mandatory">pulseaudio-module-x11</packagereq>
<packagereq type="mandatory">vino</packagereq>
<packagereq type="mandatory">xdg-user-dirs-gtk</packagereq>
<packagereq type="mandatory">yelp</packagereq>
</packagelist>
</group>
</comps>
이제 저장소에 "그룹"을 만들어야 합니까? 내가 읽은 바에 따르면 "저장소에 그룹을 생성"하려면 이 명령을 실행해야 하며 이것이 기본적으로 내가 하고 있는 일이라고 생각합니다. 또 다른 단계가 있는 것 같은데요?
[root@localhost test]# createrepo -g /root/Desktop/test/Desktop.xml /root/Desktop/test/
Spawning worker 0 with 60 pkgs
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost test]#
좋습니다. 이제 실행하여 ls
이 폴더에 무엇이 있는지 살펴보겠습니다 test
.
[root@localhost test]# ls
alsa-lib-1.0.22-3.el6.i686.rpm
alsa-plugins-pulseaudio-1.0.21-3.el6.i686.rpm
alsa-plugins-pulseaudio-1.0.21-3.el6.x86_64.rpm
at-spi-1.28.1-2.el6.centos.i686.rpm
at-spi-1.28.1-2.el6.centos.x86_64.rpm
control-center-2.28.1-38.el6.i686.rpm
control-center-2.28.1-38.el6.x86_64.rpm
control-center-extra-2.28.1-38.el6.x86_64.rpm
dbus-1.2.24-7.el6_3.x86_64.rpm
Desktop.xml
eog-2.28.2-4.el6.x86_64.rpm
flac-1.2.1-6.1.el6.i686.rpm
gdm-2.30.4-39.el6.x86_64.rpm
gdm-plugin-fingerprint-2.30.4-39.el6.x86_64.rpm
gdm-user-switch-applet-2.30.4-39.el6.x86_64.rpm
gnome-applets-2.28.0-7.el6.centos.x86_64.rpm
gnome-media-2.29.91-6.el6.x86_64.rpm
gnome-packagekit-2.28.3-7.el6.x86_64.rpm
gnome-panel-2.30.2-14.el6.x86_64.rpm
gnome-power-manager-2.28.3-7.el6_4.x86_64.rpm
gnome-screensaver-2.28.3-24.el6_4.1.x86_64.rpm
gnome-session-2.28.0-18.el6.x86_64.rpm
gnome-terminal-2.31.3-8.el6.x86_64.rpm
gnome-vfs2-smb-2.24.2-6.el6.x86_64.rpm
gok-2.28.1-5.el6.x86_64.rpm
gvfs-archive-1.4.3-15.el6.x86_64.rpm
gvfs-fuse-1.4.3-15.el6.x86_64.rpm
gvfs-smb-1.4.3-15.el6.x86_64.rpm
libasyncns-0.8-1.1.el6.i686.rpm
libcanberra-0.22-1.el6.centos.i686.rpm
libcanberra-gtk2-0.22-1.el6.centos.i686.rpm
libgnomekbd-2.28.2-2.el6.i686.rpm
libgudev1-147-2.46.el6.i686.rpm
libogg-1.1.4-2.1.el6.i686.rpm
libsndfile-1.0.20-5.el6.i686.rpm
libtdb-1.2.10-1.el6.i686.rpm
libtool-ltdl-2.2.6-15.5.el6.i686.rpm
libudev-147-2.46.el6.i686.rpm
libvorbis-1.2.3-4.el6_2.1.i686.rpm
libwacom-0.5-4.el6.i686.rpm
libxkbfile-1.0.6-1.1.el6.i686.rpm
libxklavier-4.0-9.el6.i686.rpm
libXScrnSaver-1.2.2-2.el6.i686.rpm
libXtst-1.2.1-2.el6.i686.rpm
metacity-2.28.0-23.el6.i686.rpm
metacity-2.28.0-23.el6.x86_64.rpm
nautilus-2.28.4-19.el6.x86_64.rpm
NetworkManager-0.8.1-43.el6.x86_64.rpm
NetworkManager-gnome-0.8.1-43.el6.x86_64.rpm
notification-daemon-0.5.0-1.el6.x86_64.rpm
openssh-askpass-5.3p1-84.1.el6.x86_64.rpm
orca-2.28.2-1.el6.x86_64.rpm
polkit-gnome-0.96-3.el6.i686.rpm
polkit-gnome-0.96-3.el6.x86_64.rpm
pulseaudio-libs-0.9.21-14.el6_3.i686.rpm
pulseaudio-module-gconf-0.9.21-14.el6_3.x86_64.rpm
pulseaudio-module-x11-0.9.21-14.el6_3.x86_64.rpm
repodata
tcp_wrappers-libs-7.6-57.el6.i686.rpm
vino-2.28.1-8.el6_3.x86_64.rpm
xdg-user-dirs-gtk-0.8-7.el6.x86_64.rpm
yelp-2.28.1-17.el6_3.x86_64.rpm
[root@localhost test]#
"repodata"라는 폴더가 생성된 것 같습니다.
[root@localhost test]# cd repodata
[root@localhost repodata]# ls
02e6e67a0eedf0b7d561253fd5e7d71032a6e0054536b88e75563681822dd774-filelists.xml.gz
3fc84c02d6c0e033441e6f00353a98a7c2cc5530ff27f63206d5ef300890d9a0-primary.xml.gz
91fe015bc6db77cd159518699d5c70838143681955bf3d3c28804d08063c3f92-filelists.sqlite.bz2
af6d0c22babf5796feed2a24e1d74d5d0c6507f2625fbfa65c8acc8495856dc0-primary.sqlite.bz2
c18a67f5fc206032c0081bc55bee52a2ea258873c093cdb55cda89d68a7af4eb-other.xml.gz
c9913ed4169437a1728d021cce5d54f8b7bbf02e82fa5cab5345f653f97c64ae-other.sqlite.bz2
e5ad7753d9fe659de92967aaeb29de70e0cf4b9bc3e8a07970a236748299b486-Desktop.xml
f9c925984ac89f3772590032080c01bca01df81b9bf611041cfbaceaaf107114-Desktop.xml.gz
repomd.xml
[root@localhost repodata]#
횡설수설하는 무작위 물건이 많은 것 같습니다.
하지만 어쨌든 이제 도대체 이 저장소를 사용하여 어떻게 설치해야 할까요?
yum -y groupinstall "Desktop"
더 구체적으로 말하자면, 이미 설치한 경우 어떻게 테스트합니까?
최소한의 Linux를 다시 설치한 다음 이 저장소에서 설치하려고 할 때 실패하지 않는지 확인하고 싶습니다.
답변1
미디어 라이브러리를 사용할 수 있습니다
설치 미디어를 삽입하고 다음 명령을 사용하여 설치합니다.
mount /dev/cdrom /mnt
/etc/yum.repos.d/Media.repo 편집
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
그런 다음 다음 명령을 사용하여 다운로드하고 설치하십시오.
yum --disablerepo=\* --enablerepo=c6-media groupinstall "Desktop"