0.轉載說明
- 原文連結:http://blog.csdn.net/a105421548/article/details/38437639
- 原作者寫的很清楚了,轉載以備自用
1.安裝與配置:
- 關閉防火牆:
systemctl stop firewalld.service
- 安裝tigervncserver:
yum install tigervnc-server tigervnc-server-module
- 拷貝配置檔案:
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
- 配置檔案目錄:
cd /etc/systemd/system
-
配置檔案:
vim vncserver@:1.service
配置內容:[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=root
ExecStart=/usr/bin/vncserver :1 -geometry 1280×1024 -depth 16 -securitytypes=none -fp /usr/share/X11/fonts/misc
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target -
啟用配置檔案:
systemctl enable vncserver@:1.service
- 設定登陸密碼:
vncpasswd
2啟動VNC、狀態查詢、除錯
- 啟動vncserver:
systemctl start vncserver@:1.service
- 啟動狀態檢視:
systemctl status vncserver@:1.service
- 檢視埠狀態:
netstat -lnt | grep 590*
- 檢視報錯資訊:
grep vnc /var/log/messages