centos7上部署vnc伺服器並實現遠端桌面
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<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
在win10上
接下來輸入密碼就可以了
https://blog.csdn.net/weixin_41004350/article/details/80805927