linux redhat 9.2 vnc 安装
1、使用X11 窗口系统
2、VNC Viewer 下载地址
https://www.realvnc.com/en/connect/download/vnc/
3、安装tigervnc-server
rpm –qa | grep vnc #查看是否已经安装了vnc
yum install tigervnc-server
vncserver :1 #:1 代表启动vncserver 的端口号 5900 + 1
#第一次需要输入密码,要记住此密码,VNC Viewer 链接的时候需要
vncserver -list #查看启动的服务
sudo systemctl disable firewalld --now #关掉防火墙
vncserver的其他命令
vncserver -list #查看启动的端口号
vncserver -kill :2 #关掉nvcserver的进程和端口
ps -ef|grep vnc #查看vnc有关的进程号
netstat -anpt|grep 5902 #查看服务状态
ifconfig #参看主机的ip
使用VNC Viewer 链接 VNC Server
输入ip :5900+端口 #列如 192.168.0.112:5902
4、安装 X11VNC
1、X11VNC源码下载
http://sourceforge.net/projects/libvncserver/files/x11vnc/0.9.13/x11vnc-0.9.13.tar.gz/download
2、解压
gzip -dc x11vnc-0.9.13.tar.gz | tar -xvf -
3、此步骤不需要进行操作:X11VNC需要其他库和编译工具
参考链接:https://www.cnblogs.com/cxchanpin/p/6789013.html
sudo yum intsall gcc make libXext-devel.x86_64
4、编译
进入解压的VNC Server源码里,打开终端
./configure #注意中间有等待时间
make
make install
将会在x11vnc 下 生产x11vnc的执行程序,cd x11vnc 启动 ./x11vnc
程序将打印相关的信息
5、 关掉防火墙
sudo systemctl disable firewalld --now
6、启动X11VNC
./x11vnc -display :0 -passwd 123456 -shared -forever