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 ...
随机推荐
- c++ a+b
#include<iostream> using namespace std; int main() { int a,b,sum; cin>>a>>b; sum=a ...
- 将欢迎消息添加到PeopleSoft主页--登录事件
以下是如何为PeopleSoft应用程序设置Signon事件消息. 导航到PeopleTools>实用程序>管理> SignOn事件消息 在此页面上,您将看到当前处于活动状态或过去处 ...
- SQL Server查询重复数据
1.查询单列重复: select * from test where name in (select name from test group by name having count (name) ...
- JS与IOS、Android的交互
一.JS与Android 放在了assets文件夹下了(注意若使用的是AS这个IDE,assets文件夹应放在src/main目录下) <!DOCTYPE html> <html&g ...
- anaconda安装opencv(python)
1.win10 win10没有安装python,只安装了anaconda,然后使用pip安装opencv-python,版本很新,opencv_python4.0.0的. 网速有点莫名其妙,时快时慢 ...
- 去掉input在type="number"时右边的上下箭头
加了代码之后: input::-webkit-outer-spin-button, input::-webkit-inner-spin-button{ -webkit-appearance: none ...
- Python基础之模块+异常
一.模块相关概念 1.定义:包含一系列数据.函数.类的文件,通常以.py结尾. 2.作用:让一些相关的数据,函数,类有逻辑的组织在一起,使逻辑结构更加清晰.有利于多人合作开发. 3.模块导入方式(三种 ...
- mysql根据查询结果批量更新多条数据(插入或更新)
mysql根据查询结果批量更新多条数据(插入或更新) 1.1 前言 mysql根据查询结果执行批量更新或插入时经常会遇到1093的错误问题.基本上批量插入或新增都会涉及到子查询,mysql是建议不要对 ...
- python 模型 ORM简介
Django之ORM (Object Relational Mapping(ORM)一.ORM介绍1.ORM概念 对象关系映射模式是一种为了解决面向对象与关系数据库存在的互不匹配的现象的技术.2.OR ...
- Array.from();Object.keys();Array.map()
Array.from():方法从一个类似数组或可迭代对象创建一个新的数组形式: const bar = ["a", "b", "c"]; A ...