編碼的世界 / 優質文選 / 感情

Centos 8 安裝圖形化桌面


2021年12月30日
-   

[root@centos8 ~]# dnf groupinstall “workstation” 或者 [root@centos8 ~]# dnf groupinstall “Server with GUI”
啟用圖形模式: [root@centos8 ~]# systemctl set-default graphical
然後 [root@centos8 ~]# reboot
安裝VNC配置遠程連接 [root@centos8 dnf install -y tigervnc-server tigervnc-server-module
設置 VNC 密碼 [root@centos8 ~]# vncpasswd 設置 VNC 服務器配置文件 [root@centos8 ~]# vim /etc/systemd/system/vncserver@.service [Unit] Description=Remote Desktop VNC Service After=syslog.target network.target [Service] Type=forking WorkingDirectory=/root User=root Group=root ExecStartPre=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :’ ExecStart=/usr/bin/vncserver -autokill %i ExecStop=/usr/bin/vncserver -kill %i [Install] WantedBy=multi-user.target
啟動 VNC 服務並允許防火牆中的端口 [root@centos8 ~]# systemctl daemon-reload [root@centos8 ~]# systemctl start vncserver@:1.service [root@centos8 ~]# systemctl enable vncserver@:1.service

熱門文章