Cloud & Server One Stop Services

การติดตั้ง Mini X Windows บน CentOS 7 (XFCE)

โดย X Windows มีให้เลือกใช้งานหลายตัวครับ เช่น GNOME, KDE, TDE, Xfce, MATE, Cinnamon เป็นต้น 

ขอแนะนำเป็น Xfce ซึ่งเป็นหน้าต่าง X Windows ที่ใช้ทรัพยากรของ Server น้อยครับ

ขั้นตอนการติดตั้ง XFCE

เริ่มติดตั้งกันเลยครับ

yum update
yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm *
yum groupinstall -y "Server with GUI" "Desktop" "Desktop Platform" "Desktop Platform Development" "Xfce" "Fonts"

เริ่ม Start X Windows และสร้าง Link ไฟล์เพื่อ Boot เข้า X Windows

systemctl isolate graphical.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target


หากต้องการเข้าใช้งาน X Windows เป็นบางครั้ง ใช้ Terminal เป็นหลัก ให้กำหนดดังนี้

systemctl isolate multi-user.target
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

การเข้าใช้งาน X Windows

สามารถเข้าได้ด้วยคำสั่ง

init 5 หรือ startxfce4
reboot

หากต้องการติดตั้ง Terminal และ Firefox ทำได้ด้วยการรันคำสั่งนี้

yum install -y xterm firefox

การถอนการติดตั้ง

yum groupremove -y "Server with GUI" "Desktop" "Desktop Platform" "Desktop Platform Development" "Xfce" "Fonts"