centos7 vnc oracle,Centos7远程桌面的安装与vnc/vnc-server的设置
一.安装 GNOME-Desktop桌面环境
1、安装 GNOME
# yum -y groups install"GNOME Desktop"
2、完成安装后,使用如下命令启动桌面
# startx
首次启动,进行一些初始设置
选择系统语言
选择键盘类型
添加在线用户(可选)
开始使用
启动后的桌面环境,如下所示:
二、使用GNOME Shell
CentOS 7的默认GNOME桌面以经典模式开始,但如果您想使用GNOME Shell,请设置如下:
方式一:如果以 startx 命令启动GNOME,设置如下:
#echo"exec gnome-session">> ~/.xinitrc# startx
单击“登录”按钮旁边的按钮。
在列表中选择“GNOME”。(默认为GNOME Classic模式)
GNOME shell的启动后,如下所示:
三、安装 TigerVNC Server
1. 安装TigerVNC Server
建议使用非root用户安装,-y代表直接安装
sudo yum install-ytigervnc-server
2. 配置VNC Service
以下方法是新方法,以前是要配置/etc/sysconfig/vncservers,现在第一步是将默认提供的文件复制到/etc/systemd/system,命令如下sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
注意上述命令参数重的“@:1”,可以将数字1换成30000内的任意数字,“5900+数字”即为程序的显示(监听)端口,如”@:1″表示监听5901端口。
接下来修改该配置文件sudo vim /etc/systemd/system/vncserver@:1.service
将其中替换为你想要的用户名,所有内容如下:# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@.service
# 2. Replace with the actual user name and edit vncserver
# parameters in the wrapper script located in /usr/bin/vncserver_wrapper
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB's port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
#
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver_wrapper root %i
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
保存文件并退出vim,重新加载配置
sudo systemctl daemon-reload
也可以设置成开机启动
sudo systemctl enable vncserver@:1.service
3 修改防火墙
首先判断firewalld是否启动,输入以下命令判断sudo firewall-cmd --state
如果启动应该输出running
如果是not running,执行下面命令sudo systemctl start firewalld
添加端口号5901-5905sudo firewall-cmd --permanent --zone=public --add-port=5901-5905/tcp
重新加载防火墙sudo firewall-cmd --reload
可以使用下面命令查看端口号是否被加入firewall-cmd --list-all-zones
5. 设置VNC密码
通过ssh,用oracle用户名登录到服务器,执行下面命令vncserver
终端会提示你输入密码,如下You will require a password to access your desktops.
Password:
Verify:
xauth: file /home/oracle/.Xauthority does not exist
New 'localhost.localdomain:1 (oracle)' desktop is localhost.localdomain:1
Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:1.log
如果想修改密码,可以使用vncpasswd。现在已经有一个vnc服务在运行了,但我们需要使用刚刚配置的服务来启动,所以我们需要先杀死刚刚的vnc服务,使用下面命令。vncserver -kill :1
接下来,重启我们配置的服务sudo systemctl daemon-reload
sudo systemctl restart vncserver@:1.service
使用下面命令查看该服务是否正确运行sudo systemctl status vncserver@:1.service -l
如果正确启动,输出应为● vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:2.service; enabled; vendor preset: disabled)
Active: active (running) since 日 2017-07-23 21:55:35 CST; 12h ago
Process: 8720 ExecStart=/usr/sbin/runuser -l oracle -c /usr/bin/vncserver %i -geometry 1280x720 (code=exited, status=0/SUCCESS)
Process: 8716 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 8744 (Xvnc)
CGroup: /system.slice/system-vncserver.slice/vncserver@:2.service
‣ 8744 /usr/bin/Xvnc :2 -desktop 127.0.0.1:2 (oracle) -auth /home/oracle/.Xauthority -geometry 1280x720 -rfbwait 30000 -rfbauth /home/oracle/.vnc/passwd -rfbport 5902 -fp catalogue:/etc/X11/fontpath.d -pn
7月 23 21:55:32 127.0.0.1 systemd[1]: Starting Remote desktop service (VNC)...
7月 23 21:55:35 127.0.0.1 systemd[1]: Started Remote desktop service (VNC).
如果想配置多用户同时访问,需要将上面vncserver@:1.service,改为vncserver@:2.service,然后配置其中用户名,再按以上步骤走一遍就可以了
四、客户端连接
服务端配置完毕,接下来用客户端连接。
vnc是免费技术,许多客户端都支持该协议。本文采用App Store上免费的“Remote Desktop – VNC”软件进行连接,打开后软件界面如下:
在输入框填写服务器地址:vnc://ip:port,其中ip是服务器的ip或域名,port是监听的端口,例如5901。输入后按回车,弹出密码输入框,输入vncpasswd设置的密码。密码正确的话就可以看到服务器的图形桌面。
按回车键进入登录界面,输入登录用户名和密码进入系统。
接下来就可以做各种图形操作了。
centos7 vnc oracle,Centos7远程桌面的安装与vnc/vnc-server的设置相关推荐
- CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器
CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器 vnc客户端地址:https://files.cnblogs.com/files/MYSQLZOUQI/vnc- ...
- Centos7使用xrdp进行远程桌面访问
目录 1.xrdp安装配置 2.端口使用说明3389 远程默认端口 3.windows 远程连接centos配置 一.修改方法: 二.修改后的访问方法 三.退出远程桌面 1.xrdp安装配置 安装 $ ...
- mac能远程到wjn的linux,linux远程桌面vnc-server安装配置
最近安装了kvm,需要远程桌面,所以现在就来安装调试 #yum install tigervnc-server #chkconfig vncserver on #vncserver :1 ...
- linux vncviewer使用教程,vnc viewer 远程桌面,11步实现vnc viewer 远程桌面连接Linux
Virtual Network Computing(VNC)是进行远程桌面控制的一个软件.客户端的键盘输入和鼠标操作通过网络传输到远程服务器,控制服务器的操作.服务器的图形界面 通过网络传输会客户端显 ...
- 系统没有远程桌面,如何安装远程桌面
From: http://blog.sina.com.cn/s/blog_53657b280100avdb.html 系统没有远程桌面,如何安装远程桌面 可能是远程桌面对应的组件文件被删除,或是相关服 ...
- 桌面程序加sql数据库服务器,在桌面上安装和部署 (SQL Server Compact)
在桌面上安装和部署 (SQL Server Compact) 05/27/2011 本文内容 将 SQL Server Compact 4.0 安装程序用于台式机 (SSCERuntime-ENU.m ...
- Centos8.2安装配置 VNC 远程桌面Xfce、解决输入法VNC无法使用的问题、解决浏览器无法播放视频的问题
本文使用MobaXterm(Xshell).Xfce.TightVNC来搭建百度智能云Centos8.2.同时解决解决输入法VNC无法使用的问题.解决浏览器无法播放视频的问题. 目录 一.Window ...
- tigerVNC的简单使用教程(CentOS 自带VNC包的远程桌面连接)
tigerVNC的简单使用教程(CentOS的远程桌面连接) 分类: K - Linux/Unix2012-11-18 17:37578人阅读评论(0)收藏举报 tigerVNC的简单使用教程(Cen ...
- linux下远程桌面remmina安装,Linux-远程桌面连接工具remmina
前言 在windows下有很多的远程连接ssh的工具,包括xshell.SecureCRT.putty等等.在Linux下面有什么呢?Linux有虚拟终端啊!但是,不能保存密码,每次连接都需要输入密码 ...
最新文章
- VC manifest
- 分布式系统的面试题14
- On-Heap与Off-Heap
- 如何在android中创建自定义对话框?
- swift 字符串中查找字符位置
- 【转】并行计算、分布式计算、集群计算和云计算
- 重叠IO模型-异步IO
- Python字符串格式化之format方法详解
- (转)Docker volume plugin - enabled create local volume on docker host
- boost::graph模块实现bellman算法的测试程序
- 文本框为空按钮不可点击
- 耦合层:撮合物联网的理论与实践牵手的“月老”
- 两条信号之间加电容_模电总结:第七章、波形的发生和信号的转换,正弦波振荡的电路...
- Bootstrap基础九辅助类
- 服务器443端口响应代码,使用443端口远程服务器
- 学计算机轻松的表情包,轻松的表情包
- 安装win 7 + ubuntu 16.04 双系统安装
- C++之Queue容器初学
- 计算机网络安全的一些概念以及知识点
- BZOJ4585: [Apio2016]烟火表演