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

centos7上进行一下操作

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

Loaded plugins: fastestmirror, langpacks

base                                                                                                                              | 3.6 kB  00:00:00

extras                                                                                                                            | 3.4 kB  00:00:00

updates                                                                                                                           | 3.4 kB  00:00:00

(1/2): extras/7/x86_64/primary_db                                                                                                 | 129 kB  00:00:00

(2/2): updates/7/x86_64/primary_db                                                                                                | 3.6 MB  00:00:00

Loading mirror speeds from cached hostfile

* base: mirrors.aliyun.com

* extras: mirrors.163.com

* updates: mirrors.zju.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package tigervnc-server.x86_64 0:1.8.0-1.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================

Package                                   Arch                             Version                                 Repository                      Size

=========================================================================================================================================================

Installing:

tigervnc-server                           x86_64                           1.8.0-1.el7                             base                           213 k

Transaction Summary

=========================================================================================================================================================

Install  1 Package

Total download size: 213 k

Installed size: 504 k

Downloading packages:

tigervnc-server-1.8.0-1.el7.x86_64.rpm                                                                                            | 213 kB  00:00:01

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

Installing : tigervnc-server-1.8.0-1.el7.x86_64                                                                                                    1/1

Verifying  : tigervnc-server-1.8.0-1.el7.x86_64                                                                                                    1/1

Installed:

tigervnc-server.x86_64 0:1.8.0-1.el7

Complete!

[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 ~]# vncserver :1#开启远程端口

A VNC server is already running as :1

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

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:2.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

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

inet 127.0.0.1  netmask 255.0.0.0

inet6 ::1  prefixlen 128  scopeid 0x10

inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255

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

在win10上

接下来输入密码就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值