CentOS 8.1下VNC安装与配置
1.VNC安装命令
[ /]# yum install -y tigervnc-server
2.编辑VNC配置
[ /]# cp /lib/systemd/system/ /etc/systemd/system/:1.service 注:拷贝一个新的配置文件,以开启1号窗口为例(想要同时开启多个窗口,修改其中数字即可) [ /]# vi /etc/systemd/system/: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
3.更新配置文件
[ /]# systemctl daemon-reload
4.设置root的vncserver密码
[ /]# vncpasswd Password: #新密码:123456 Verify: #再次输入:123456 Would you like to enter a view-only password (y/n)? n A view-only password is not used [ /]#
5.启动服务并设为开机启动
[ /]# systemctl start :1.service [ /]# systemtcl enable :1.service6.查看linuk的ip地址
6.使用VNC Viewer软件连接
下载地址:https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.20.113-Windows.exe
打开VNC Viewer之后,输入服务器ip及端口即可连接,如下图:
相关推荐
MichelinMessi 2020-07-30
luobotoutou 2020-08-17
LandryBean 2020-07-29
hnllei 2020-05-30
zlsh00 2020-04-22
哥哥的CSDN集 2020-01-31
86294251 2020-01-28
jackadmi 2020-01-04
iamplane 2020-01-04
IsanaYashiro 2020-01-04
诸葛飞 2013-04-14
manimnchn 2013-04-06
旭灿 2013-04-02
数据齿轮 2019-12-28
zaqwsx0 2015-02-06
zhangskd 2015-08-10