centos和windows安装VNC远程桌面

centos7上部署vnc服务器并实现远程桌面

1、centos7上进行一下操作

离线安装下载地址:http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/tigervnc-server-1.8.0-13.el7.x86_64.rpm

[root@localhost ~]# yum install tigervnc-server -y                                  #安装vnc服务器

[root@localhost ~]# vncserver                #启动服务器

You will require a password to access your desktops.

Password:      #这里设置的密码是可以操控服务器的,连接时输入这个密码,或者下面的密码

Verify:

Would you like to enter a view-only password (y/n)? y#设置一个只可以查看,但是无法操作,相当于录制屏幕而已,如果不需要可以选n

Password:

Password must be at least 6 characters - try again

Password:

Verify:

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup

Creating default config /root/.vnc/config

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log

[root@localhost ~]# ifconfig|grep inet     #查看服务器ip,用来远程连接

        inet 10.0.3.66  netmask 255.255.255.0  broadcast 10.0.3.255

        inet6 fe80::c808:e090:6136:4632  prefixlen 64  scopeid 0x20<link>

        inet6 fe80::4083:92b7:c2f3:d09a  prefixlen 64  scopeid 0x20<link>

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255

[root@localhost ~]# 注意关闭防火墙和selinux

[root@localhost ~]# systemctl status firewalld.service          

[root@localhost ~]# systemctl stop firewalld.service      #临时关闭防火墙

[root@localhost ~]#  systemctl disable firewalld.service      #永久关闭防火墙

[root@localhost ~]#  cat /etc/selinux/config     #改成disabled  ,需要重启机器生效

另查看vnc开启的是哪个端口

[root@localhost ~]# ps -ef | grep vnc     #根据下图本次开启的是5902端口

2、在windows操作系统上

VNC windows端64bit 下载链接

 

接下来输入密码就可以了

 

3、调节分辨率

1、找到自己屏幕外接显示器的分辨率

[root@localhost ~]# vi /usr/bin/vncserver

改成对应屏幕分辨率,重启vncserver

进入远程桌面后还可以设置分辨率

发布了32 篇原创文章 · 获赞 5 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_28903377/article/details/100191515