1、目的
远程可视化连接Linux服务器
2、解决方案
1、在Linux端安装TightVNC服务端
yum -y install tigervnc-server tigervnc
2、修改配置文件
# 复制一份文件,并改名为vncserver@:1.service
cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
将文件中的用你当前的用户替换,将%i替换为1
如图所示:
更新
systemctl daemon-reload
设置为自动启动
systemctl enable vncserver@:1.service
启动vnc服务
systemctl start vncserver@:1.service
3、添加防火墙允许端口号
vim /etc/firewalld/zones/public.xml
开启防火墙
systemctl enable firewalld
# 重启Linux
init 6
4、安装Linux可视化界面
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
5、安装Tight VNC的客户端在Windows上
网上搜索即可。
https://www.tightvnc.com/download.php
6、启动Linux端vnc服务
vncserver
需要设置密码,这个密码就是后面连接的密码
7、打开TightVNC客户端
连接,并输入密码即可