首先准备好前提工作
查看是否已经安装vnc
如果没有进行安装,本人使用的是centos7
安装VNC
执行yum install tigervnc-server
停掉防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
备份vnc文件
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
修改/lib/systemd/system/vncserver@:1.service文件
将 <USER> 改为root
开启服务并查看状态
systemctl start vncserver@:1.service
systemctl status vncserver@:1.service
查看端口是否启动
netstat -lntup|grep 590
下载novnc文件
1、使用git
git clone https://github.com/novnc/noVNC.git
2、直接下载压缩包之后放到目录下进行解压
noVNC-master.zip
切换到下述路径执行命令
cd ./noVNC/utils/
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
一路回车,生成self.pem文件
运行nonvc
./utils/novnc_proxy --vnc localhost:5900
如果运行缺少python3则下载相应的安装包
测试连接
netstat -anutp产看端口使用状况