标签:连接 environ ble font 一个 技术 ant like 替换
[root@localhost /]# yum install -y tigervnc-server
[root@localhost /]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
注:拷贝一个新的配置文件,以开启1号窗口为例(想要同时开启多个窗口,修改其中数字即可)
[root@localhost /]# vi /etc/systemd/system/vncserver@:1.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :‘
ExecStart=/usr/bin/vncserver_wrapper <USER> %i #将文中的“<USER>”替换为你系统的用户名root
ExecStop=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :‘
[Install]
WantedBy=multi-user.target
[root@localhost /]# systemctl daemon-reload
[root@localhost /]# vncpasswd
Password: #新密码:123456
Verify: #再次输入:123456
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
[root@localhost /]#
[root@localhost /]# systemctl start vncserver@:1.service
[root@localhost /]# systemtcl enable vncserver@:1.service
6.查看linuk的ip地址
下载地址:https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.20.113-Windows.exe
打开VNC Viewer之后,输入服务器ip及端口即可连接,如下图:
标签:连接 environ ble font 一个 技术 ant like 替换
原文地址:https://www.cnblogs.com/zhengjinsheng/p/12888557.html