博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Vncserver安装-Centos7
阅读量:7261 次
发布时间:2019-06-29

本文共 2555 字,大约阅读时间需要 8 分钟。

Step:1 Make Sure the Desktop Packages are installed

In order to setup VNC server first we make sure that Desktop is installed ,in My case i am using Gnome Desktop. If Gnome Desktop is not installed on your Linux machine then use the below command to install.

[root@linuxtechi ~]# yum groupinstall "GNOME Desktop"

Step:2 Install Tigervnc and other dependency Package.
[root@linuxtechi ~]# yum install tigervnc-server xorg-x11-fonts-Type1
Step:3 Setup VNC Server Configuration File.
Copy the VNC config file “/lib/systemd/system/vncserver@.service” to the “/etc/systemd/system/vncserver@:.service”.

While Copying the VNC config file we can mention the port number on which we want VNC service to be listen. In my case i am using port 3 , it means VNC will listen on “5903”. So while Connecting to the VNC server We can specify port number as <3> or <5903>5903>3>

[root@linuxtechi ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service

Step:4 Update the User’s Information in the Config File
[root@linuxtechi ~]# vi /etc/systemd/system/vncserver@:3.service

vnc-server-config-file

Replace the “linuxtechi” user as per your requirement. In my case linuxtechi user will able to control and manage its desktop session using remote VNC clients.

Set the Firewall Rule if firewall is enabled on your linux box.

[root@linuxtechi ~]# firewall-cmd --permanent --zone=public --add-port=5903/tcp

success
[root@linuxtechi ~]# firewall-cmd --reload
success
[root@linuxtechi ~]#
Step:5 Set the VNC password for the User.
Switch to the user (linuxtechi) and run vncserver command to set the password as shown below :

vncserver-passwd

Start and Enable the VNC Service at boot.

Execute below commands as root only.

[root@linuxtechi ~]# systemctl daemon-reload

[root@linuxtechi ~]# systemctl start vncserver@:3.service
[root@linuxtechi ~]# systemctl enable vncserver@:3.service
ln -s '/etc/systemd/system/vncserver@:3.service' '/etc/systemd/system/multi-user.target.wants/vncserver@:3.service'
[root@linuxtechi ~]#
Step:6 Access Remote Desktop Session.
From Ubuntu Machine :

ubuntu@localhost:~$ vncviewer 192.168.1.15:3

Enter the VNC password that we have set in above step, after validating the authentication Remote Desktop session will start.

From Windows Machine Using VNC Viewer

Enter the VNC Server IP Address and Port Number and then Click on OK

vncviewer

Enter the VNC Password & then click on OK.

vnc-password

Desktop Session Will start after authentication.

remote-desktop-vncviewer

转载于:https://www.cnblogs.com/kakarott/p/10627421.html

你可能感兴趣的文章
web圣杯布局
查看>>
玩转Koa -- koa-router原理解析
查看>>
数据结构和算法面试题系列—数字题总结
查看>>
通过一个场景实例 了解前端处理大数据的无限可能
查看>>
快速体验k8s集群的测试、开发环境--allinone部署,国内环境下觉得比官方的minikube方便、简单很多。...
查看>>
填坑之Hexo博客搭建
查看>>
Elasticsearch学习记录第二篇
查看>>
android 解码混淆过的堆栈信息
查看>>
[翻译]Scope in JavaScript
查看>>
Android逆向(一) —— AndroidManifest.xml 二进制解析
查看>>
iOS 自定义通知声音
查看>>
js 正则表达式
查看>>
函数式编程 - Swift中的Functor(函子)、Monad(单子)、Applicative
查看>>
《Java8实战》-第五章读书笔记(使用流Stream-01)
查看>>
border属性的多方位应用和实现自适应三角形
查看>>
ES6箭头函数 this指向
查看>>
给爬虫爱好者的福利 SelectGadget
查看>>
React - setState源码分析(小白可读)
查看>>
异步(一):Promise深入理解与实例分析
查看>>
WebSocket的SSL认证失败问题记录
查看>>