-
2022-02-20 21:30:19
1、安装Xfce桌面环境(如果没有桌面环境的话)
# 安装Xfce桌面环境 sudo apt-get install xfce4 xfce4-goodies
2、配置VNC服务端
ubuntu系统 sudo apt-get install tightvncserver centos系统 yum install tigervnc-server -y
3、设置VNC密码
#vncpasswd
4、启动VNC服务端
vncserver
注意:VNC服务端默认监听的是5901端口
5、端口开放
根据监听的端口,进行端口开放,默认为5901端口开始。 #firewall-cmd --add-port=5901/tcp --permanent #firewall-cmd --reload
6、修改配置文件(如果不想使用默认的话)
vim /usr/bin/vncserver #注意刚开始会发现这个文件是可执行文件,可能觉得比较奇怪 正常情况下配置文件应该是.conf的类似形式,是的,刚开始我也奇怪,网上查阅资料后你会 发现应该这样解释比较好,就是这个文件是可执行的脚本文件
查找端口信息(如果想修改默认监听端口的话)
18:# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 118:vncPort=5900+displayNumber; 238:# n is taken if something is listening on the VNC server port (5900+n) or the 257:# (5900+n) or the X server port (6000+n). 274: if (!bind(S, pack('S n x12', AFINET,5900+n))) { #这里又需要注意的是,vnc服务端默认开启了两个远程桌面,桌面一和桌面二, 两个桌面是在5900的基础上加上桌面的号码1或者2,所以我们只需要修改5900为自己想要的端口号 就可以了 grep "59" /usr/bin/vncserver -n 实现快速定位位置
7、VNC开启停止
vncserver 直接就可以启动vnc服务 systemctl start vncserver 这个指令不一定能用,因为vnc不一定添加到系统的 服务项中 可以通过下面指令查看系统的服务项都有哪些 systemctl list-unit-files --type=service 如果有的话: systemctl daemon-reload 可以重新加载系统的服务项 #vncserver -kill :1 杀死第一个VNC桌面 #vncserver -kill :2 杀死第二个VNC桌面
之后我们就可以通过VNC客户端进行远程桌面连接了
更多相关内容 -
Linux系统安装VNC
2021-05-16 06:43:17一、安装tigervnc-server VNC软件包[root@localhost~]#yuminstalltigervnc-server###没有配置yum源可以使用rpm-ivh安装[root@localhost~]#rpm-qctigervnc-server/etc/sysconfig/vncservers[root@localhost~]#...一、安装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
-
Linux7.6安装Vnc
2022-03-15 14:15:32安装并配置vnc server 1.安装vnc server 使用xshell远程系统,root用户 执行命令安装 Gnome 包 #yum groupinstall "GNOME Desktop" "Graphical Administration Tools" ```sql (我的安装了995个rpm包,较慢) 更新...安装并配置vnc server
1.安装vnc server
使用xshell远程系统,root用户
执行命令安装 Gnome 包#yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
(我的安装了995个rpm包,较慢)
更新系统的运行级别,如果你想在系统下次启动的时候自动进入图形界面,那么我们需要更改系统的运行级别,输入下面的命令来启用图形界面。
#ln -sf /lib/systemd/system/runlevel5.target/etc/systemd/system/default.target
重启完成GNOME的安装。
安装vnc server
#yum install tigervnc-server tigervnc-server-module
安装vncviewer
#yum install vnc
2.配置vnc
第一次启动vncserver会要求输入root密码,输入两次即可;也可以用vncpasswd重置密码停止vncserver
#vncserver -kill :1 #vncserver -kill :2
3、通过配置vnc登录,提示一下错误:
[oracle@19ctest 19.3.0]$ pwd
/u01/app/oracle/product/19.3.0
[oracle@19ctest 19.3.0]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable. No X11 DISPLAY variable was set, but this program performed an operation which requires it. 确定连接的vnc是几号号桌面,这里是1号桌面:
[root@19ctest .vnc]# vncserver
New ‘19ctest:1 (root)’ desktop is 19ctest:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/19ctest:1.log解决:需要使用oracle用户
[oracle@19ctest ~]$ export DISPLAY=":1.0" [oracle@19ctest ~]$ echo $DISPLAY
:1.0
[oracle@19ctest ~]$ xhost +
access control disabled, clients can connect from any host
[oracle@19ctest ~]$ xdpyinfo | head
name of display: :1.0 version number: 11.0 vendor string: The X.Org Foundation vendor release number: 12001000 X.Org version: 1.20.1 maximum request size: 16777212 bytes motion buffer size: 256 bitmap unit, bit order, padding: 32, LSBFirst, 32 image byte order: LSBFirst number of supported pixmap formats: 6
[oracle@19ctest ~]$ cd $ORACLE_HOME [oracle@19ctest database]$ export LANG=zh_CN.UTF-8 [oracle@19ctest database]$ ./runInstaller
Launching Oracle Database Setup Wizard...
然后切换到vnc软件下,图形界面已打开,进行安装配置
安装监听报错:
****DISPLAY environment variable not set! Oracle Net Configuration Assistant is a GUI tool which requires that DISPLAY specify a location where GUI tools can display. Set and export DISPLAY, then re-run.
[oracle@19ctest app]$ export DISPLAY=:1.0 [oracle@19ctest app]$ xhost +
access control disabled, clients can connect from any host
[oracle@19ctest app]$ export LANG=zh_CN.UTF-8 [oracle@19ctest app]$ netca
Oracle Net Services 配置:
然后切换到vnc软件下,图形界面已打开,进行安装配置
-
Linux 平台安装 VNC
2021-04-23 12:01:271. 安装VNC sudo yum install tigervnc tigervnc-server 2. 修改配置 sudo vim /etc/sysconfig/vncservers 修改内容如下: # THIS FILE HAS BEEN REPLACED BY /lib/systemd/system/vncserver@.service # ...VNC一共有三个版本,TightVNC、RealVNC、UltraVNC,RealVNC旨在推进商业化,因此需要License;TightVNC旨在改善服务器和查看器之间的VNC压缩,但是该版本最大的缺点是不能远程复制粘贴,而RealVNC则可以(这里的复制粘贴指的是文本的复制粘贴,文件的复制粘贴各版本都不支持);最后是UltraVNC,它则结合了其他两个版本的优势,但由于时间原因,暂时还未具体研究,先把其他两个贴出来。
一、tigervnc
1. 安装VNC
sudo yum install tigervnc tigervnc-server
2. 修改配置
sudo vim /etc/sysconfig/vncservers
修改内容如下:
# THIS FILE HAS BEEN REPLACED BY /lib/systemd/system/vncserver@.service # VNCSERVERS="桌面号:系统用户 桌面号:系统用户" VNCSERVERS="1:zhang 2:root" # VNCSERVERARGS[桌面号]="-geometry 分辨率 -alwaysshared[允许多个客户端同时连接] -depth [色深,值有8,16,24,32]" VNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared -depth 24" VNCSERVERARGS[2]="-geometry 1024x768 -alwaysshared -depth 24"
3. 设置密码
vncpasswd
4. 启动服务
vncserver
5. 客户端连接
若没有客户端,可前往 这里下载
二、realvnc
1. 下载deb或rpm安装包
官方下载地址:https://www.realvnc.com/en/connect/download/vnc/
CSDN下载地址:https://download.csdn.net/download/u013992330/18503629
2. 安装
下载之后直接安装即可,例如kylin平台使用deb包进行安装:
sudo dpkg -i VNC-Server-6.7.4-Linux-x64.deb
3. 加载VNC License
由于RealVNC旨在推进商业化,因此在安装之后需要使用vnclicense加载License,命令如下:
vnclicense -add xxxx # xxxx 是License序列号,也就是realvnc license key,自己想办法搞到。
vnclicense工具的其他用法可使用vnclicense --help查看。
License加载之后,可使用vnclicense -list查看:
4. 启动VNC
realvnc有两种启动方式,一种是virtual,一种是x11,virtual跟上边的TightVNC原理差不多,x11则是直接连接的服务器的X桌面,跟你直接在服务器上操作是一样的。两种选择其中一种启动、使用即可。
a. virtual启动:
systemctl start vncserver-virtuald.service
查看启动状态:
systemctl status vncserver-virtuald.service
b. x11启动:
systemctl start vncserver-x11-serviced.service
查看启动状态:
systemctl status vncserver-x11-serviced.service
5. 连接VNC Server
连接方法跟上边的TightVNC一样,但是我在连接的时候,使用 IP:桌面号 的方式连接不上,因此查看了它监听的端口,使用端口连接成功了,端口查看命令:
netstat -tnlp |grep vnc
可以看到virtual的监听端口是5999,x11的监听端口是5900,现在使用ip:port的方式就可以连接了。
-
Linux安装vnc server
2021-05-14 18:59:16操作系统:centos7.6需求:安装并配置vnc server参考:... -
linux怎么安装vnc,简述linux怎么安装vnc
2020-08-07 17:53:46那大家知道linux怎么安装vnc吗?知道linux安装vnc的具体步骤吗?没关系,你看完我这篇文章,一定能或多或少有所收获。今天我就跟大家讲讲在linux怎么安装vnc。 首先,是软件的选择。目前我使用的是IIS7服务器管理... -
CentOS/Linux 安装VNC Server
2021-05-11 09:57:09CentOS/Linux 安装VNC ServerVNC全称是Virtual Network Computing,属于远程控制类软件。其优点是支持跨操作系统的远程图形化控制。在日常工作中,服务器常常是存在机房,不可能每次需要图形界面操作就跑到机房,... -
Linux安装配置 VNC Server
2021-10-27 18:53:071、安装图形化界面 (1)查看当前的运行级别和可以安装的group systemctl get-default yum grouplist 注意:这里list的结果如下没有“GNOME Desktop”之类的而且下面的语句也执行提示不存在就以为这这个镜像缺少... -
Linux下vnc配置及启动
2021-05-11 08:03:271.查看VNC是否有安装,若没安装,就执行yum安装。rpm -qa|grep vnc[root@AY324323253 ~]# yum -y install vnc-server tigervnc-servertigervnc-server.i686 //32位系统tigervnc-1.1.0-8.el6_5.x86_64 //64位系统2.... -
linux 开启 vnc
2021-05-18 02:37:161.安装 vnc-serverubuntu:sudo apt-get install vnc4serverfedora 下载.rpm rpm -ivh安装2.设置密码#vncpasswdPassword: ******Verify:*****3.客户端安装vncviewersudo apt-get install vncviewer客户端登陆:vnc... -
Linux之VNC远程桌面安装和使用
2021-08-18 16:16:13因为运维工作需要,部分Linux服务器安装了桌面服务。有些工作开着需要远程桌面Linux服务器进行操作。Windows服务器远程桌面管理和维护很常见,Linux服务器日常情况下我们通过shell终端进行管理和维护,现在因为工作... -
Linux上安装VNC
2020-08-05 09:45:51一:确认VNC服务是否有安装 rpm -qa|grep tigervnc 发现显示已经安装过vnc,说明已经安装过vnc服务了 如果显示没有安装,如下图: 我们用yum安装命令来安装 此法比较简单,直接使用yum命令即可: yum -y ... -
Linux学习之路--启动VNC服务
2021-05-18 01:46:35我的Linux是Fedora 13,安装方法如下:1、打开终端,执行# yum install -y tigervnc tigervnc-server2、编辑/etc/sysconfi/vncservers# vi /etc/sysconfig/vncservers在最后加入:VNCSERVERS="1:sky"VNCSERVERARGS[1... -
linux vnc 关闭,Linux上VNC 启动和关闭常见问题
2021-05-18 06:25:410, 重设密码[root@yqrh5u2 ~]# vncpasswdPassword:Verify:[root@yqrh5u2 ~]#1,启动和kill vncserver[root@yqrh5u2 ~]# vncserver :1New 'yqrh5u2:1 (root)' desktop is yqrh5u2:1Starting applications specified ... -
轻松几步在Linux中安装使用VNC服务
2021-02-01 09:18:33VNC是基于UNIX和Linux操作系统的免费的开源软件,由于其远程控制能力强大且高效实用的特点深受大家的青睐。众所周知,在创建Oracle数据库的过程中我们...为此在本文中课课家笔者就为大家介绍在Linux中安装使用VNC服... -
Linux 上安装配置 VNC Server
2022-04-05 15:06:15VNC (Virtual Network Console),即 虚拟网络控制台。它是一款优秀的远程控制工具软件,而且是基于 UNIX 和 Linux 操作系统的免费开源的。 1、优点 远程控制能力强大,高效实用,其性能可以和 Windows 和 MAC 中的... -
linux系统中VNC远程桌面安装和配置方法详解
2021-05-14 00:22:04检查linux系统是否安装VNC命令rpm -q vnc-server如果没有安装则使用yum install vnc vnc-server2.启动vnc服务代码如下vncserverYou will require a password to access your desktops.Password:Verify:输入两次密码... -
Linux下vnc的安装、使用以及设置开机启动
2020-01-03 15:14:15Linux下vnc的安装、使用以及设置开机启动 -
如何在Linux Mint 20上安装VNC服务器
2021-05-18 05:12:56在本文中,我们将描述如何在Linux Mint 20系统上安装VNC服务器。为了测试与VNC服务器的连接,我们将使用VNC查看器(VNC客户端)应用程序。您可以使用任何其他VNC客户端应用程序。步骤1:安装桌面环境Linux中有多个桌面... -
linux启动vnc server
2019-11-13 14:41:01在Windows下安装了VNC之后,第一次连接到相应的linux服务器时,需要启动linux上相应的服务,下面是启动步骤: 1、对于普通用户而言,以下两个步骤就可以了 [root@localhost /]#su ceboy#ceboy 是用户名 [ceboy@... -
【Linux】在Linux上安装VNC
2017-12-10 21:43:30有幸能够亲自在服务器上面操作一下,这篇博客来说一说,如何在Linux上安装VNC 首先要知道的是,VNC是什么。VNC(Virtual Network Computing ),一种使用RFB协议的显示屏画面分享及远程操作软件。它与操作系统... -
Debian9.5安装VNC并且配置vnc开机自启动
2021-12-15 17:26:241、两台Debian9.5系统的linux环境,一台部署vnc client, 一台部署 vnc server,然后通过client远程登录server获取桌面。 2、在vnc server端设置vnc服务开机自启动 操作: 一、配置VNC 1、在客户端计算机安装: ... -
实战记录在 Linux Ubuntu 20.04 安装VNC 远程桌面
2021-08-09 20:36:37主要用在我们有一些服务器都是Linux系统,无法安装Windows系统,于是就用VNC的方式替代RDP协议桌面。 Ubuntu 20.04 镜像安装VNC实现Linux系统远程桌面 在这篇文章中,笔者准备记录如何在 Ubuntu 20.04 上安装和... -
vnc viewer下载,在Linux中vnc viewer下载安装教程
2020-07-31 10:37:33可能有时候你有这个需求,你需要在linux上安装一个集成开发环境ide图形界面版(如eclipse)以便编写代码或调试部署在Linux上代码。但是,远程机器上是bash命令行的,没有界面。那这时,通过VNC Viewer远程登录到... -
linux上安装部署vnc远程服务
2021-12-01 17:55:29本文介绍linux系统下安装vnc服务的步骤,图文讲解,简单易操作 -
Linux下vncviewer和vncserver的安装
2020-07-22 11:39:01(2)安装vncviewer,命令行为: yum install vnc (3)停用或者设置防火墙,方法有多种: systemctl stop firewalld.service systemctl disable firewalld.service vi /etc/sysconfig/iptables -A INPUT -m ... -
linux上通过yum安装vnc
2021-01-19 14:07:31在linux上通过yum安装vnc 1、 执行sudo yum install tigervnc-server 2、 执行y确认,下载安装 3、 执行rpm -q tigervnc-server查看是否安装成功 4、 执行vncserver :1,启动服务 5、 设置密码:vncpasswd 6、 查看... -
一加手机安装linux以及vnc服务端
2022-03-13 21:26:10本文根据Gitee项目Tmoe-linux...首先安装所需要的app:版本号为0.118.0的termux和版本号为3.7.1.44443的vnc viewer 2、安装中 打开termux,在显示界面输入代码如下 bash -c "$(curl -Lv gitee.com/mo2/linux/raw -
Linux上VNC 启动和关闭
2021-05-20 15:59:24# 查看vnc进程ps -ef|grep vncroot 45557 1 4 13:17 pts/0 00:00:00 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop LENOVO-LA0X1631:1 (root)-fp catalogue:/etc/X11/fontpath.d -geometry 1024x768...