linux中远程链接大部分使用黑窗口命令行模式,有时候需要使用桌面一般使用的是vnc链接远程桌面。
linux 需要开启vnc服务端 tigervnc-server
# 关闭防火墙
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
# 安装 tigervnc-server 和git
yum install -y epel*
yum install tigervnc-server git -y
vncserver :1
# 输入两次密码
此时就可以使用工具链接到桌面了
为了使资源得到更充分的利用,使更多人使用,web方式视乎更合适 于是noVNC出现了
安装noVNC,也是云技术的一种
git clone https://github.com/novnc/noVNC.git
# noVNC 使用websockify实现链接
git clone https://github.com/novnc/websockify.git
# create secure connection
cd noVNC/utils
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
#安装Python
yum install python3
# 启动
cd ..
./utils/novnc_proxy --vnc localhost:5901 --listen localhost:6081

出现http地址了证明成功了
登录就可以链接了
http://ip:6080/vnc.html

输入vnc的登录密码

在输入机器的密码就可以进入系统了

网友评论