Centos安装vncserver服务
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服务的更多相关文章
- centos 安装memcache服务后memcahce本机连接Permission
自己手动在虚拟机下装了下memcache,整个过程真是充满波折,本身用php5.3安装memcache扩展就麻烦很多,无法通过yum直接安装,安装方法详见http://chenwei.me/blog/ ...
- 桌面版centos安装vncserver并在windows下使用VNC Viewer远程连接
首先关闭防火墙 在Centos中安装vncserver yum install tigervnc-server 拷贝一份 /lib/systemd/system/vncserver@.service ...
- centos安装openoffice服务
第一步:yum install openoffice.org-brand openoffice.org-core openoffice.org-java-common xvfb openoffice. ...
- CentOS 安装nginx服务
安装nginx服务 sudo yum install nginx 启动nginx systemctl start nginx 加入启动项 systemctl enable nginx 测试nginx服 ...
- centos 安装vnc服务
1.安装tigervnc-server yum install tigervnc-server 2.启动vnc服务 vncserver:1 [错误提示待解决bad display name " ...
- CentOS安装FTP服务
最近公司有一个内部比赛(黑客马拉松),报名参加了这么一个赛事,在准备参赛作品的同时(参赛服务器需要自己搭建),借着这个机会,决定把tomcat部署相关的知识从0到1重新捋一遍.就当备忘录了. FTP服 ...
- CentOS安装Openfire服务
原文::http://xiao987334176.blog.51cto.com/2202382/979677 系统是全新新安装的系统.版本号是Centos 5.6 x86 同步北京时间 # ntpda ...
- Centos安装vsftp服务
1.安装vsftp yum install vsftpd 2.开启vsftp服务,设置开机自启 service vsftpd restart chkconfig vsftpd on 停止vsftpd: ...
- centos 安装git 服务端
// 在服务端安装好git后,开始安装gitosis 3.在服务器安装gitosis sudo yum install python python-setuptools cd /usr/local/s ...
随机推荐
- YC(Y Combinator)斯坦福大学《如何创业》课程要点记录(粗糙)
20节课程,每节都是干货满满,时常听说理论无用,但是好的理论,绝对能帮助你少走一些弯路. YC简介: Y Combinator成立于2005年,是美国著名创业孵化器,Y Combinator扶持初创企 ...
- SharePoint 2016 自定义城市和区域字段
前言 最近有这么一个需求,就是用到中国的各种行政区,然后还是三级联动,就琢磨写这么一个字段.然后,觉得挺有意义的,写字段的过程也有点心得,就想到拿到博客里分享给大家,一起看看. 1. 创建字段的解决方 ...
- EntityFramework Core Raw Query再叙注意事项
前言 最近一直比较忙没有太多时间去更新博客,接下来会一直持续发表相关内容博客,上一篇我们讲到了EF Core中的原始查询,这节我们再来叙述一下原始查询,本文是基于在项目当中用到时发现的问题. 话题 我 ...
- Dell-R730 【Pxe+dhcp+ftp+tftp+Kickstart+CentOs6.6】
IP:10.104.0.101 [root@localhost network-scripts]# cat ifcfg-em1 [root@localhost network-scripts]# ip ...
- Oracle-11g 中两库间物化视图的同步
html,body { font-size: 15px } body { font-family: Helvetica, "Hiragino Sans GB", "微软雅 ...
- windows环境自动获取SVN仓库当前版本
如果我们的软件能够自动引入SVN修订号(仓库版本号),那么我们开发软件的时候就能快速定位bug出自哪个SVN版本.那么如何让软件直接自动生成并引用SVN版本号呢? 我们可以使用SVN info命令,在 ...
- case a.ass_term_unit when '01' then (case a.ass_profit_mode when '0' then round(sum(a.ass_amount*a.ass_annual_rate/365*365*a.ass_term/100) ,2) when '1' then round(sum(a.ass_amount*a.ass_annual_rate/
--01 年 02 月 03 日 select a.ass_due_date, case a.ass_term_unit when '01' then (case a.ass_profit_mode ...
- YUM变量
有一个简单的python命令可以看到yum的 releaserver.arch.basearch的值 /usr/bin/python -c 'import yum, pprint; yb = yum. ...
- Html5浏览器端less应用
之前的一个布局是用rem来做的 我上一段代码 div { margin: 0.833333333rem 0; } /* 去处a标签的下划线*/ a { text-decoration: none; } ...
- python json.load 的奇葩错误
json.load() 可以参数是文件对象, 但是这种方式会遇到莫名其妙的错误: No JSON object could be decoded 有的朋友说的是utf-8编码有BOM和无BOM造成的. ...