Linux下VNC的安装,配置,连接
安装配置VNC
1.服务器端配置YUM
mount -o loop /data/software/CentOS-7.6-x86_64-DVD-1810.iso /mnt
cd /pos.d
po
------------------------------
[base]
name=centos 7.6
baseurl=file:///mnt
gpgcheck=0
enable=1
------------------------------
2.安装图形化
安装Linux时选择了最⼩化安装,因此需要安装图形化⽀持
# 查看是否安装有图形化界⾯
rpm -qa|grep gnome
# 安装图形化界⾯
yum groupinstall "X Window System" "Chinese Support" "GNOME Desktop"
X Window System和GNOME Desktop的关系可以参考:
3.安装VNC Server
yum install -y tigervnc tigervnc-server
4.配置VNC Server
vncserver --help
linux安装oracle图形化界面
# 最简单的配置
vncserver :1
----------------------------------------------------------
[root@localhost system]# vncserver :1
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
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
----------------------------------------------------------------
VNCSERVER允许同时启动多个VNCSERVER,每⼀个不同的VNCSERVER使⽤display#来区分,不同的⽤户可以使⽤不同的display#,同⼀个⽤户,也可以启动多个display#。
可以到config⽂件中修改配置,主要配置有分辨率geometry
以下演⽰创建oracle⽤户的VNCSERVER
useradd oracle
passwd oracle
su - oracle
vncserver :2
# 在使⽤Vnc Viewer连接的时候,输⼊display#后直接连⼊oracle账户
5.VNC Server管理
5.1.设置开机⾃启动
systemctl enable vncserver@:1.service
5.2.关闭VNC Server
vncserver -kill :1
5.3.修改配置
vncserver -kill :1
vi $HOME/.vnc/config
-
-----------------------
## Supported server options to pass to vncserver upon invocation can be listed ## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
## Several common ones are shown below. Uncomment and modify to your liking. ##
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
geometry=1440x900
# depth
# localhost
# alwaysshared
------------------------
vncserver :1
6.使⽤VNC Viewer连接VNC Server
6.1.下载安装
6.2.连接
输⼊IP和Display#即可
6.3.全屏展⽰
如果VNCServer的分辨率设置合适的话,可以全屏展⽰
⿏标悬浮到VNC Viewer的中间,点击全屏选项即可

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。