在Ubuntu16.04上安装novnc服务


1.novnc下载
    https://github.com/novnc/noVNC/releases
    
2.vncserver安装


    sudo apt-get install tightvncserver
    
    
    a.启动vncserver
        vncserve:1  (端口5900 + 1)
   
    b.设置vnc链接密码:
    update-alternatives: 使用 /usr/bin/tightvncpasswd 来在自动模式中提供 /usr/bin/vncpasswd (vncpasswd)




     产生密钥证书:openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
     self.pem放在utils目录下。
     c.启动novnc
        ./utils/launch.sh --vnc localhost:5901
./launch.sh  --vnc  --ssl-only --cert m.pem localhost:5901    #强制SSL链接
3.设置开机不起动X Server.
    multi-user.target 是init 3,多人命令行式
    
    graphical.target 是init 5是多人界面模式
    
    配置目录/lib/system,设置default.target链接到不同的模式文件即可
    ephraim@iZ23zrn03vxZ:/lib/systemd/system$ ls -la  multi-user.target
    ephraim@iZ23zrn03vxZ:/lib/systemd/system$ ls -la default.target 
    lrwxrwxrwx 1 root root 16 10月 27  2017 default.target -> graphical.target

4.修改tightvncserver的分辨率 /usr/bin/vncserver 修改这个文件即可。

vncserver -kill :1 关闭5900+1端口服务,然后重启vncserver :1

参考文档
https://blog.csdn.net/tb3039450/article/details/52143087

猜你喜欢

转载自blog.csdn.net/magaiou/article/details/80509614