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

本文共 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

你可能感兴趣的文章
centos6.x 抓取ssh登录的用户名和密码
查看>>
我从程序猿到DBA的进化之路
查看>>
ClassLoader原理扩展
查看>>
MongoDB基本使用
查看>>
CAT 测试事件开关
查看>>
php实现工厂模式
查看>>
mirror driver学习(二. 安装)
查看>>
zz:控制台程序后台运行
查看>>
【超清视频】CCNA系列课程之三:交换机工作原理及VLAN创建
查看>>
Exchange2010学习笔记之 解决从远程服务器处理数据失败问题
查看>>
python GUI 猜数字游戏
查看>>
awk相关用法
查看>>
oracle中创建java包.执行JAVA代码的方法
查看>>
线上查询及帮助命令
查看>>
我的友情链接
查看>>
php mysql数据库导出sql文件
查看>>
web.xml 3.0头文件
查看>>
Hibernate缓存
查看>>
如何从程序员到架构师,不断总结补充中
查看>>
使用Eclipse给Android App签名打包
查看>>