Linux系统安装VNC的过程-创新互联

这篇文章主要介绍“Linux系统安装VNC的过程”,在日常操作中,相信很多人在Linux系统安装VNC的过程问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Linux系统安装VNC的过程”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

公司主营业务:网站建设、成都网站建设、移动网站开发等业务。帮助企业客户真正实现互联网宣传,提高企业的竞争能力。创新互联是一支青春激扬、勤奋敬业、活力青春激扬、勤奋敬业、活力澎湃、和谐高效的团队。公司秉承以“开放、自由、严谨、自律”为核心的企业文化,感谢他们对我们的高要求,感谢他们从不同领域给我们带来的挑战,让我们激情的团队有机会用头脑与智慧不断的给客户带来惊喜。创新互联推出潮阳免费做网站回馈大家。
一、安装tigervnc-server VNC软件包
[root@localhost ~]# yum install tigervnc-server ###没有配置yum源可以使用 rpm -ivh安装
[root@localhost ~]# rpm -qc tigervnc-server
/etc/sysconfig/vncservers
[root@localhost ~]# chkconfig --level 35 vncserver on
二、目的:以root用户启动
[root@localhost ~]# vim /etc/sysconfig/vncservers
VNCSERVERS="1:root"
以vnc使用用户登录系统,创建vnc密码,vncpasswd
[root@localhost ~]$ vncpasswd
Password: 输入密码
Password must be at least 6 characters - try again
Password: 再次输入密码
Verify:

启动服务一次,生成 /home/visitor/.vnc/xstartup

[root@localhost ~]$ vncserver
New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1
Starting applications specified in /home/visitor/.vnc/xstartup
Log file is /home/visitor/.vnc/localhost.localdomain:1.log
三,启动服务
[root@localhost ~]# /etc/init.d/vncserver start
正在启动 VNC 服务器:1:root
New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1
Starting applications specified in /home/visitor/.vnc/xstartup
Log file is /home/student/.vnc/localhost.localdomain:2.log
[确定]
四.添加防火墙配置
[root@localhost ~]# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
[root@localhost ~]# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]

PS: 有时因为网络安全要求,不能使用常用端口,需要更改vnc服务的默认端口,按照以下步骤即可: 

1。修改vnc的默认端口
[root@localhost ~]# vim /usr/bin/vncserver
注释:修改如下两行中默认的端口5900为你想要修改的端口 118:$vncPort = 5900 + $displayNumber;
274: if (!bind(S, pack(‘S n x12’, $AF_INET, 5900 + $n))) {
2.重启vnc服务 [root@localhost ~]# /etc/init.d/vncserver restar
3.访问vnc时,比如使用VNC viewer访问,你访问的端口比如是:
192.168.2.11:9701 而你在/etc/sysconfig/vncserver中配置的桌面端口是 1:root 那么在第1步中配置文件中修改的端口号就应该是 9701-1=9700

到此,关于“Linux系统安装VNC的过程”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联-成都网站建设公司网站,小编会继续努力为大家带来更多实用的文章!

网站标题:Linux系统安装VNC的过程-创新互联
标题来源:https://www.cdcxhl.com/article48/diisep.html

成都网站建设公司_创新互联,为您提供网站设计公司企业网站制作做网站标签优化ChatGPT企业建站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都网站建设公司