在CentOS上安裝X Server時可能會遇到各種錯誤
sudo yum update
sudo yum groupinstall "Server with GUI"
sudo yum install xorg-x11-server-Xorg xorg-x11-server-Xvfb
sudo systemctl isolate graphical.target
sudo systemctl enable graphical.target
sudo systemctl start graphical.target
sudo systemctl isolate multi-user.target
sudo systemctl enable multi-user.target
sudo systemctl start multi-user.target
注意:這里提供的命令適用于CentOS 7及更高版本。如果您使用的是CentOS 6或其他早期版本,可能需要使用不同的命令。