vnc server的安装
vnc是一款使用广泛的服务器管理软件,可以实现图形化管理。我在安装vnc server碰到一些问题,也整理下我的安装步骤,希望对博友们有一些帮助。
1 安装对应的软件包
[root@centos6 ~]# yum search vnc
[root@centos6 ~]# yum -y install tigervnc-server
2 设置vnc远程连接密码
[root@centos6 ~]# vncpasswd
Password:
Verify:
3 修改vncserver配置文件
[root@centos6 ~]# vim /etc/sysconfig/vncservers
VNCSERVERS="2:root"
VNCSERVERARGS[]="-geometry 1024x768"
注意:1024x768的中间的那个符号是小写字母x。
4 重启服务并查看服务
[root@centos6 ~]# service vncserver restart #重启vncserver
Shutting down VNC server: [ OK ]
Starting VNC server: :root xauth: file /root/.Xauthority does not exist
xauth: (stdin):: bad display name "centos6.magedu.com:2" in "add" command New 'centos6.magedu.com:2 (root)' desktop is centos6.magedu.com: Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/centos6.magedu.com:.log [ OK ]
[root@centos6 ~]# netstat -tunlp |grep vnc #发现监听在5902端口上
tcp 0.0.0.0: 0.0.0.0:* LISTEN /Xvnc
tcp 0.0.0.0: 0.0.0.0:* LISTEN /Xvnc
tcp ::: :::* LISTEN /Xvnc
5 测试vnc服务
我这里在windows机器使用vncview进行测试。在vncview连接种输入ip:5902,发现连不上去。百度了下,从下面的这个参考地址获取到帮助
整理下需要3个步骤:
- 确保能ping通vnc server所在的服务器
- 临时关闭防火墙
- 临时关闭selinux
[root@centos6 ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
ACCEPT all -- 0.0.0.0/ 0.0.0.0/ state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/ 0.0.0.0/
ACCEPT all -- 0.0.0.0/ 0.0.0.0/
ACCEPT tcp -- 0.0.0.0/ 0.0.0.0/ state NEW tcp dpt:
REJECT all -- 0.0.0.0/ 0.0.0.0/ reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT)
num target prot opt source destination
REJECT all -- 0.0.0.0/ 0.0.0.0/ reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT)
num target prot opt source destination [root@centos6 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@centos6 ~]# getenforce
Enforcing
[root@centos6 ~]# setenforce
执行上面的操作就可以远程连接了。后续我们还需要把启用防火墙把对应的端口放行,并且设置selinux支持vncserver。

vnc server的安装的更多相关文章
- 云服务器 ECS Linux 安装 VNC Server 实现图形化访问配置说明
阿里云官方公共 Linux 系统镜像,基于性能及通用性等因素考虑,默认没有安装 VNC 服务组件.本文对常见操作系统下的 VNC Server 安装配置进行简要说明. 本文中仅讨论VNC的安装,关于图 ...
- CentOS 8 配置 VNC Server
CentOS 8 配置 VNC Server 2020-12-31 | 标签: centos, vnc 前言 CentOS 8 配置 VNC Server, 使用户可以远程访问,本例介绍安装和配置流程 ...
- CentOS 安装VNC Server
环境 服务器:192.168.10.181 系统:CentOS 6.0 安装过程 1.切换至root用户 2.检测系统是否安装VNC [root@Nginx canyouNgx]# rpm -q vn ...
- Ubuntu 下安装VNC server
尽管我们在大部分情况下用ssh登录Ubuntu服务器就好了,但是有时候我们的程序需要在图形界面下运行,这时我们就要用到vnc server这个软件了.在Ubuntu下安装vnc server很简单的, ...
- Linux下安装VNC Server
操作系统centos6.5,在其之上安装vnc server,可利用windows上的vnc client远程登录. 1. 安装 yum install tigervnc-server.x86_64 ...
- Linux : fedora 安装 vnc server
Linux配置VNC服务 安装VNC服务端 #yum install vnc-server 配置VNC服务参数文件 编辑vncservers文件追加如下 #vi /etc/sysconfig/vncs ...
- 在CentOS 7.6上安装VNC Server
停止并禁用防火墙 systemctl stop firewalld.service systemctl disable firewalld.service 安装vnxserver yum instal ...
- Linux VNC server 安装配置
1.安装vnc server [root@pxe ~]# yum install tigervnc-server -y 2.设置 vnc server 开机启动 [root@pxe ~]# chk ...
- Ubuntu12.04 64bit 下安装VNC server
1. 安装gonme核心包(如果是字符界面的话) apt-get install x-window-system-coreapt-get install gnome-core (下载完成后需要安装dg ...
随机推荐
- css3_transition: 体验好的过渡效果。附 好看的按钮
利用css的transition属性详解,上图就是利用transition效果做的一个按钮. transition属性://举例子:transition:all 1s ease;transition: ...
- PS2键盘扫描码:通码与断码
键盘扫描码(实用于标准PC的101.102和104 键的键盘),按下发送通码,弹起发送断码. 说明: 第一类按键,通码为1字节,断码为 0xF0+通码 形式.如A键,其通码为 0x1C,断码为 0xF ...
- json格式的数据及遍历:
代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- [HACK] docker runtime 挂载宿主机目录
网上看到的很多所谓的挂载都是容器创建时期的挂载,而且参数都不清不楚,整理如下(--name别名自己加): docker run -v /src/path:/dest/path:rw ${IMAGE} ...
- ubuntu下安装pandas出现 compile failed with error code 1 in /tmp/pip_build_hadoop/pandas
都是用pip装的,是不是应该用apt-get 装的呀 ubuntu下安装pandas (出现 compile failed with error code 1 in /tmp/pip_build_ha ...
- [LeetCode] Length of Longest Fibonacci Subsequence 最长的斐波那契序列长度
A sequence X_1, X_2, ..., X_n is fibonacci-like if: n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 ...
- Tomcat问题
1 Tomcat控制台中文乱码 打开tomcat/conf/logging.properties 找到java.util.logging.ConsoleHandler.encoding = UTF-8 ...
- 十五、过滤器(Filter)
过滤器(Filter) 过滤器概述 1 什么是过滤器 过滤器JavaWeb三大组件之一,它与Servlet很相似!不它过滤器是用来拦截请求的,而不是处理请求的. 当用户请求某个Servlet时,会先执 ...
- threejs立方体贴图产生边缘锯齿问题
threejs立方体贴图产生边缘锯齿问题 立方体贴图边缘锯齿 解决后 经过试验测试发现, textureGrass.wrapS和 textureGrass.wrapT属性导致的. 解决方法1: 删掉t ...
- HTTP协议概念与特点,HTTP的状态码,HTTPS是什么?
很多人在打开网页的时候,在浏览器地址栏里都会看到http ,在Java WEB里,HTTP也是个重点内容,今天我们就来详细了解和学习HTTP . HTTP是Hyper Text Transfer P ...