Fedora
安裝必要套件
# dnf -y install novnc python3-websockify python-numpy
選擇證書擺放位置
# cd /etc/pki/tls/certs
證書加密參數設定
# openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/novnc.pem -out /etc/pki/tls/certs/novnc.pem -days 3650
修改.pem檔案權限只有擁有者有讀寫權限
# chmod 644 /etc/pki/tls/certs/novnc.pem
如果 Firewalld 正在運行,開放連接埠
# firewall-cmd --add-port=6080/tcp --permanent
# firewall-cmd --reload
安裝tigervnc套件
# dnf -y install tigervnc-server
如果 Firewalld 正在運行,開放vnc-server連接埠
# firewall-cmd --add-service=vnc-server --permanent
# firewall-cmd --reload
設定VNC密碼
# set VNC password
debian@dlp:~$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
設定解析度
#vncserver :1 -geometry 800x600 -depth 24
啟動novnc設定證書並告訴它將連接埠6080 的流量轉送至連接埠 5901
#websockify -D --web=/usr/share/novnc/ --cert=/etc/pki/tls/certs/novnc.pem 6080 localhost:5901
關閉novnc連線
#vncserver -kill :1
參考資料
https://www.server-world.info
https://blog.csdn.net/allway2/article/details/122331001
https://aws.amazon.com/