vnc是一款Windows远程桌面软件,其优点是支持跨操作系统的远程图形化控制。下面开始记录第一次安装vnc服务的过程。

  1.先检查系统是否有安装VNC服务

  [root@localhost ~]# [root@localhost ~]# rpm -qa | grep tigervnc

  2.安装vnc服务

  [root@localhost ~]# yum -y install tigervnc-server  //yum安装减少了很多不必要的麻烦

  3.启动并设置密码

  在第一次启动vncserver会提示输入密码,之后就需要使用vncpasswd命令

  [root@localhost ~]# vncserver    //启动vnc服务

  4.检查服务有没有启动

  [root@localhost ~]# ps aux | grep vnc  //查进程

  root 2744 0.0 2.4 63860 25372 pts/1 S 21:09 0:00 /usr/bin/Xvnc :1 -desktop localhost.localdo

  main:1 (root) -auth /root/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth   /root/.vnc/passwd -rfbport   //查看是否启动vnc服务

  5901 -fp catalogue:/etc/X11/fontpath.d -pn         
  root 2750 0.0 0.1 6776 1852 pts/1 S 21:09 0:00 vncconfig -iconic

  5.系统现已安装成功,若还无法连接到Centos系统,则需要一步步排查原因,大致分为以下步骤:

    1>ping

    2>服务是否有启动   ps uax | grep vnc

    3>端口有没被占用或启动  netstat –anp | grep vnc

    [root@localhost ~]# netstat -anp | grep vnc
    tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2744/Xvnc
    tcp 0 0 192.168.1.104:5901 192.168.1.100:55209 ESTABLISHED 2744/Xvnc
    unix 2 [ ACC ] STREAM LISTENING 20986 2744/Xvnc @/tmp/.X11-unix/X1
    unix 2 [ ACC ] STREAM LISTENING 20987 2744/Xvnc /tmp/.X11-unix/X1
    unix 3 [ ] STREAM CONNECTED 43055 2744/Xvnc @/tmp/.X11-unix/X1
    unix 3 [ ] STREAM CONNECTED 23785 2744/Xvnc @/tmp/.X11-unix/X1

    4>防火墙是否被允许访问  iptables -- list  /etc/init.d/iptables stop

    5>服务的配置文件

  6.vncserver 至此Centos远程成功

  7.其他小知识:

    1>设置为开机启动

    [root@localhost ~]# chkconfig --add vncserver
    [root@localhost ~]# chkconfig vncserver on

    2>重启vncserver
    [root@localhost ~]# service vncserver restart

    3>查看启动状况

    [root@localhost ~]# netstat -tulnp
    注:如果通过VNC客户端来访问VNC,则端口为5901

    4>修改VNC密码
    [root@localhost ~]# vncpasswd

    5>停止vnc server:
    [root@localhost ~]# vncserver -kill :桌面号

    例如:[root@localhost ~]# vncserver -kill :1

    注:vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,除非用kill命令杀死进程。

    6>设置同一个显示端口可以连接多个客户机
    [root@localhost ~]# vncserver -alwaysshared

  

Centos安装vncserver服务的更多相关文章

  1. centos 安装memcache服务后memcahce本机连接Permission

    自己手动在虚拟机下装了下memcache,整个过程真是充满波折,本身用php5.3安装memcache扩展就麻烦很多,无法通过yum直接安装,安装方法详见http://chenwei.me/blog/ ...

  2. 桌面版centos安装vncserver并在windows下使用VNC Viewer远程连接

    首先关闭防火墙 在Centos中安装vncserver yum install tigervnc-server 拷贝一份  /lib/systemd/system/vncserver@.service ...

  3. centos安装openoffice服务

    第一步:yum install openoffice.org-brand openoffice.org-core openoffice.org-java-common xvfb openoffice. ...

  4. CentOS 安装nginx服务

    安装nginx服务 sudo yum install nginx 启动nginx systemctl start nginx 加入启动项 systemctl enable nginx 测试nginx服 ...

  5. centos 安装vnc服务

    1.安装tigervnc-server yum install tigervnc-server 2.启动vnc服务 vncserver:1 [错误提示待解决bad display name " ...

  6. CentOS安装FTP服务

    最近公司有一个内部比赛(黑客马拉松),报名参加了这么一个赛事,在准备参赛作品的同时(参赛服务器需要自己搭建),借着这个机会,决定把tomcat部署相关的知识从0到1重新捋一遍.就当备忘录了. FTP服 ...

  7. CentOS安装Openfire服务

    原文::http://xiao987334176.blog.51cto.com/2202382/979677 系统是全新新安装的系统.版本号是Centos 5.6 x86 同步北京时间 # ntpda ...

  8. Centos安装vsftp服务

    1.安装vsftp yum install vsftpd 2.开启vsftp服务,设置开机自启 service vsftpd restart chkconfig vsftpd on 停止vsftpd: ...

  9. centos 安装git 服务端

    // 在服务端安装好git后,开始安装gitosis 3.在服务器安装gitosis sudo yum install python python-setuptools cd /usr/local/s ...

随机推荐

  1. poj1483 It's not a Bug, It's a Feature!

    It's not a Bug, It's a Feature! Time Limit: 5000MS   Memory Limit: 30000K Total Submissions: 1231   ...

  2. 本地数据jqGrid分页

    var mydata=''; $(function() { var str = ''; str += "<span>共<span id='p_total'></ ...

  3. c++代码的陪伴下----菜鸟的转变

    在c++代码的陪伴下快乐的长大 学了c++也快一年了,在这里把自己的心得体会说一下吧. 1.感觉自己这一年做过的代码行数也不少,博客点击量和浏览量却不是很多,可能是自己所编的程序里面都是很基础的吧,对 ...

  4. PHP里文件的查找方式及写法

    PHP里说的文件包括:文件和目录1.用filetype方法加路径("./11.txt")是判断文件类型 //var_dump(filetype("./11.txt&quo ...

  5. Eclipse连接MySQL出现Server time zone is unrecognized错误

    错误代码: The server time zone value '?й???????' is unrecognized or represents more than one time zone. ...

  6. InnoDB的Named File Formats

    随着InnoDB存储引擎的发展,新的页数据结构有时用来支持新的功能特性.比如前面提到的InnoDB Plugin,提供了新的页数据结构来支持表压缩功能,完全溢出的(Off page)大变长字符类型字段 ...

  7. SpringMVC 学习-上传文件分解器 CommonsMultipartResolver 类

    Spring 组件 CommonsMultipartResolver 类的主要作用是配置文件上传的一些属性,也可以控制上传文件的大小. 在 springmvc-servlet.xml 配置文件中: & ...

  8. trove taskmanger api

    trove-taskmanager服务在配置实例,管理实例的生命周期以及对数据库实例执行操作方面做了很多工作.taskmanager会通过Nova.Swift的API访问Openstack基础的服务, ...

  9. python 数据清洗之字符串处理

    在数据分析中,特别是文本分析中,字符处理需要耗费极大的精力, 因而了解字符处理对于数据分析而言,也是一项很重要的能力. 字符串处理方法 首先我们先了解下都有哪些基础方法 首先我们了解下字符串的拆分sp ...

  10. centos设置svn开机自启动

    安装好 svn 服务后,默认是没有随系统启动自动启动的, CentOS 7 的 /etc/rc.d/rc.local 是没有执行权限的, 系统建议创建 systemd service 启动服务 于是查 ...