一、RHEL7 系統安裝——發現默認沒有桌面
在安裝的時候沒有注意選擇的是默認的“Minimal Install”,安裝完後是這個樣子的:
命令行的界面的,好不爽。登錄進去,啓動圖形化試試:
果然沒有安裝圖形化。下面來進行圖形化組件的安裝。
先掛載
#mount /dev/sr0 /mnt \\ 把光盤掛載到“/mnt”上面
#df \\查看是否已經掛載
創建本地yum倉庫
驗證本地yum倉庫,找出要需要安裝組件組的包名稱
#yum clean all \\ 清楚yum倉庫緩存
#yum makecache \\ 創建yum倉庫緩存
#yum repolist \\ 列出可用yum倉庫
#yum grouplist \\ 列出程序組
安裝桌面組件包 #yum -y groupinstall "Server with GUI" \\ 安裝圖形化程序組
啓動桌面——startx
#startx \\ 啓動xwindow 進入圖形化桌面
進入圖形化,進行圖形化的設置
設置默認運行級別爲圖形化
[root@localhost Desktop]# systemctl get-default \\查看默認運行級別
multi-user.target
[root@localhost Desktop]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3 \\運行級別3:多用戶界面
# graphical.target: analogous to runlevel 5 \\運行級別5:圖形化界面
# # To set a default target, run: # # ln -sf /lib/systemd/system/.target
/etc/systemd/system/default.target #
[root@localhost Desktop]# systemctl set-default graphical.target \\設置默認圖形化運行級別
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'
[root@localhost Desktop]# systemctl get-default \\查看默認運行級別
graphical.target \\圖形化設置OK
[root@localhost Desktop]#
OK,圖形化桌面已經安裝好了!!!
ps:linux系統啓動後沒有進入圖形化有以下原因:
1.系統在安裝的時候沒有安裝圖形化
2.系統的默認運行級別不是圖形化
3.系統在安裝後,有降低過內存的操作,內存過低無法啓動桌面。
解決方案:a.增加內存
b.查看swap的大小,嘗試擴大swap分區
4.系統在重啓後,軟件出現了問題,導致桌面沒有啓動
RHEL 7 在系統上與6 有了不同的改變,沒有了init運行級別,只有3級別和5級別