一、配置本地源
1.掛載鏡像文件
[tekkamanninja@Tekkaman-RHEL ~]$ sudo mkdir /media/RHEL
[tekkamanninja@Tekkaman-RHEL ~]$ sudo mount -o loop <iso-path> /media/RHEL
(可選)開機自動掛載鏡像文件
在/etc/fstab的最下面添加下面一句
[tekkamanninja@Tekkaman-RHEL ~]$ sudo vi /etc/fstab
<iso-path> /media/RHEL iso9660 ro,loop 0 0
2.創建repo文件
[tekkamanninja@Tekkaman-RHEL ~]$ sudo vi /etc/yum.repos.d/local_RHEL_DVD.repo
[Server]
name=Server
baseurl=file:///media/RHEL/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=file:///media/RHEL/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/RHEL/LoadBalancer
enabled=1
gpgcheck=0
二、安裝桌面軟件包組
1.查看軟件包組
順便看看剛才掛載上的源是否可用。
[tekkamanninja@Tekkaman-RHEL ~]$ yum grouplist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Not root, certificate-based repositories not updated
Setting up Group Process
HighAvailability | 4.0 kB 00:00 ...
HighAvailability/primary_db | 43 kB 00:00 ...
LoadBalancer | 3.9 kB 00:00 ...
LoadBalancer/primary_db | 4.7 kB 00:00 ...
Server | 4.0 kB 00:00 ...
Server/primary_db | 3.1 MB 00:00 ...
HighAvailability/group_gz | 4.1 kB 00:00 ...
LoadBalancer/group_gz | 2.2 kB 00:00 ...
Server/group_gz | 204 kB 00:00 ...
Installed Groups:
Additional Development
Base
Console internet tools
Debugging Tools
Desktop
Desktop Platform
Dial-up Networking Support
Directory Client
E-mail server
Fonts
General Purpose Desktop
Graphical Administration Tools
Hardware monitoring utilities
Java Platform
Large Systems Performance
Legacy UNIX compatibility
Legacy X Window System compatibility
NFS file server
Network Infrastructure Server
Network file system client
Networking Tools
Performance Tools
Perl Support
Scientific support
Server Platform
Installed Language Groups:
Arabic Support [ar]
Armenian Support [hy]
Georgian Support [ka]
Hebrew Support [he]
Inuktitut Support [iu]
Japanese Support [ja]
Korean Support [ko]
Lao Support [lo]
Tajik Support [tg]
Available Groups:
Backup Client
Backup Server
CIFS file server
Client management tools
Compatibility libraries
Desktop Debugging and Performance Tools
Desktop Platform Development
Development tools
Directory Server
Eclipse
Emacs
FCoE Storage Client
FTP server
Graphics Creation Tools
High Availability
High Availability Management
Identity Management Server
Infiniband Support
Input Methods
Internet Browser
KDE Desktop
Load Balancer
Mainframe Access
Messaging Client Support
MySQL Database client
MySQL Database server
Network Storage Server
PHP Support
PostgreSQL Database client
PostgreSQL Database server
Print Server
Printing client
Remote Desktop Clients
Ruby Support
SNMP Support
Security Tools
Server Platform Development
Smart card support
Somali Support
Storage Availability Tools
System Management
System administration tools
Systems Management Messaging Server support
TeX support
Technical Writing
TurboGears application framework
Virtualization
Virtualization Client
Virtualization Platform
Virtualization Tools
Web Server
Web Servlet Engine
Web-Based Enterprise Management
X Window System
iSCSI Storage Client
Available Language Groups:
Afrikaans Support [af]
Albanian Support [sq]
Amazigh Support [ber]
Assamese Support [as]
Azerbaijani Support [az]
Basque Support [eu]
Belarusian Support [be]
Bengali Support [bn]
Bhutanese Support [dz]
Brazilian Portuguese Support [pt_BR]
Breton Support [br]
Bulgarian Support [bg]
Catalan Support [ca]
Chhattisgarhi Support [hne]
Chichewa Support [ny]
Chinese Support [zh]
Coptic Support [cop]
Croatian Support [hr]
Czech Support [cs]
Danish Support [da]
Dutch Support [nl]
English (UK) Support [en_GB]
Esperanto Support [eo]
Estonian Support [et]
Ethiopic Support [am]
Faroese Support [fo]
Fijian Support [fj]
Filipino Support [fil]
Finnish Support [fi]
French Support [fr]
Frisian Support [fy]
Friulian Support [fur]
Gaelic Support [gd]
Galician Support [gl]
German Support [de]
Greek Support [el]
Gujarati Support [gu]
Hiligaynon Support [hil]
Hindi Support [hi]
Hungarian Support [hu]
Icelandic Support [is]
Indonesian Support [id]
Interlingua Support [ia]
Irish Support [ga]
Italian Support [it]
Kannada Support [kn]
Kashmiri Support [ks]
Kashubian Support [csb]
Kazakh Support [kk]
Khmer Support [km]
Kinyarwanda Support [rw]
Konkani Support [kok]
Kurdish Support [ku]
Latin Support [la]
Latvian Support [lv]
Lithuanian Support [lt]
Low Saxon Support [nds]
Luxembourgish Support [lb]
Macedonian Support [mk]
Maithili Support [mai]
Malagasy Support [mg]
Malay Support [ms]
Malayalam Support [ml]
Maltese Support [mt]
Manx Support [gv]
Maori Support [mi]
Marathi Support [mr]
Mongolian Support [mn]
Myanmar (Burmese) Support [my]
Nepali Support [ne]
Northern Sotho Support [nso]
Norwegian Support [nb]
Occitan Support [oc]
Oriya Support [or]
Persian Support [fa]
Polish Support [pl]
Portuguese Support [pt]
Punjabi Support [pa]
Romanian Support [ro]
Russian Support [ru]
Sanskrit Support [sa]
Sardinian Support [sc]
Serbian Support [sr]
Sindhi Support [sd]
Sinhala Support [si]
Slovak Support [sk]
Slovenian Support [sl]
Southern Ndebele Support [nr]
Southern Sotho Support [st]
Spanish Support [es]
Swahili Support [sw]
Swati Support [ss]
Swedish Support [sv]
Tagalog Support [tl]
Tamil Support [ta]
Telugu Support [te]
Tetum Support [tet]
Thai Support [th]
Tibetan Support [bo]
Tsonga Support [ts]
Tswana Support [tn]
Turkish Support [tr]
Turkmen Support [tk]
Ukrainian Support [uk]
Upper Sorbian Support [hsb]
Urdu Support [ur]
Uzbek Support [uz]
Venda Support [ve]
Vietnamese Support [vi]
Walloon Support [wa]
Welsh Support [cy]
Xhosa Support [xh]
Zulu Support [zu]
Done
2.安裝軟件組
從上面的信息中你可以看到許多的軟件組信息,自己挑一個需要的桌面軟件組安裝就好了,我先裝Desktop
[tekkamanninja@Tekkaman-RHEL ~]$ sudo yum groupinstall "Desktop"
3.測試:啟動圖形界面
在完成了軟件的安裝之後,你就可以嘗試進入X 桌面了:
[tekkamanninja@Tekkaman-RHEL ~]$ startx
但是極有可能你無法進入圖形界面,原因非常簡單,你還沒有安裝相應的X 用戶層驅動,不同的硬件有不同的驅動,所以這個不是由軟件依賴來解決的。
對於我用於練習的ThinkPad SL400來說,我得到了如下錯誤:
[ 278.139] (II) LoadModule: "nouveau"
[ 278.140] (WW) Warning, couldn't open module nouveau
[ 278.140] (II) UnloadModule: "nouveau"
[ 278.140] (II) Unloading nouveau
[ 278.140] (EE) Failed to load module "nouveau" (module does not exist, 0)
[ 278.140] (II) LoadModule: "vesa"
[ 278.140] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so
[ 278.140] (II) Module vesa: vendor="X.Org Foundation"
[ 278.140] compiled for 1.10.2, module version = 2.3.0
[ 278.140] Module class: X.Org Video Driver
[ 278.140] ABI class: X.Org Video Driver, version 10.0
[ 278.140] (II) LoadModule: "fbdev"
[ 278.140] (WW) Warning, couldn't open module fbdev
[ 278.140] (II) UnloadModule: "fbdev"
[ 278.140] (II) Unloading fbdev
[ 278.140] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 278.140] (II) VESA: driver for VESA chipsets: vesa
[ 278.140] (--) using VT number 1
[ 278.145] (EE) The PCI device has a kernel module claiming it,
[ 278.146] (EE) this driver cannot operate until it has been unloaded.
[ 278.146] (EE) Try appending "nomodeset" to your boot options
[ 278.146] (WW) Falling back to old probe method for vesa
[ 278.146] (EE) No devices detected.
[ 278.146]
Fatal server error:
[ 278.146] no screens found
[ 278.146]
Please consult the Red Hat, Inc. support
at https://www.redhat.com/apps/support/
for help.
[ 278.146] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 278.147]
所以我就通過 yum list 命令找到了相應的驅動包,然後安裝。
[tekkamanninja@Tekkaman-RHEL ~]$ sudo yum list *nouveau*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Available Packages
xorg-x11-drv-nouveau.x86_64 1:0.0.16-13.20110719gitde9d1ba.el6 Server
[tekkamanninja@Tekkaman-RHEL ~]$ sudo yum install xorg-x11-drv-nouveau
安裝好了之後,再“startx”,圖形界面就出來了。
其實你還可以再log中找到其他缺少的模塊,同樣的通過 yum list 命令找到了相應的驅動包,然後安裝就是了。
3.更改啟動模式 :進入桌面還是命令界面
[tekkamanninja@Tekkaman-RHEL ~]$ sudo vim /etc/inittab
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
3為多用戶界面(命令行) 5為X window圖形界面