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 ...
随机推荐
- 黑马程序员:Java基础总结----GUI图形化界面
黑马程序员:Java基础总结 GUI图形化界面 ASP.Net+Android+IO开发 . .Net培训 .期待与您交流! GUI(Graphical User Interface)图形化界 ...
- Future 和 ExecutorCompletionService 对比和使用
当我们通过Executor提交一组并发执行的任务,并且希望在每一个任务完成后能立即得到结果,有两种方式可以采取: 方式一: 通过一个list来保存一组future,然后在循环中轮训这组future,直 ...
- [.net] c# webservice
采用的工具VS2010生成工程 1. 生成webservice工程:建 ASP.NET 空WEB 应用程序. 2. 在建好的ASP.NET 空WEB应用程序中新建项“web 服务”. 完成上述内容工程 ...
- 从ASP.NET Web API 2 (C#)开始说起
[译]Getting Started with ASP.NET Web API 2 (C#) 单击此处查看原文 HTTP不是单单为网页服务的,它更是一种用于构建API(用于暴露服务和数据)的强大平台. ...
- javascript构造函数以及原型对象的理解
以下是一个构造函数的例子 如果是实例方法,不同的实例化,它们引用的地址是不一样的,是唯一的. //定义一个构造函数 function People(name,age){ this.name=name; ...
- 如何在标题栏的title前添加网站logo
之前在哪个网上看到的,今天没事给写下来了: 1.将像素大小为16*16的图片命名为 favicon.ico,(图片使用的颜色好像不能超过16色),放到网站根目录下就可以了; 2.在head标签中添加代 ...
- C#Redis字符串
上周六通宵打牌周日白天只睡3小时累成狗,从今天起以后不能玩太大的了,小赌怡情大赌伤身,和同事朋友有空玩玩还是好的.今天公司外面马路上有人挂灯笼时死了一个人,哎,快过年了悲剧又发生了,真是生命是脆弱的. ...
- Javascript中 a.href 和 a.getAttribute('href') 结果不完全一致
今天无意中发现这个么问题,页面上对所有A标签的href属性为空的自动添加一个链接地址,结果发现if判断条件始终都没生效,莫名其妙. 原来Javascript中 a.href 和 a.getAttrib ...
- Notepad++中调试用心lua程序
一.配置: 1.打开Notepad++: 2. 按下F5,或者打开Run->Run… 3. 弹出Run的窗口 3. 这一步是最关键的,将下列语句拷贝粘贴至输入框中:cmd /k Python & ...
- udp接收
char receive_buffer[500] = {0}; std::vector<std::string> mysplit(std::string str,std::string p ...