惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - 安安

macOS 10.13允许任何来源开启方法 mac系统如何处理来自身份不明的开发者 依赖注入 与 控制反转 捷波朗 jabra BT3030 蓝牙耳机 罗技 UE3100 蓝牙耳机使用 代理服务器 Eclipse快捷键 Html5的表单 host asp.net程序的小型IIS msdn windows 电驴资源(转) Zookeeper .Net Client 使用 Windows与Linux拷贝数据 搭建自己的NuGet服务器 Windows 下 Zookeeper 启动脚本 Zookeeper安装 实现CentOS 中的单窗口打开文件夹 运行jar程序批处理bat程序编写 设置Eclipse的Maven库 maven jetty的eclipse 插件
ContOS Linux下VNC Server远程桌面配置详细
安安 · 2012-10-19 · via 博客园 - 安安

1 用su命令 修改当前 终端 用户为 root

2.检测是否安装 桌面端 软件

   a. GNOME桌面

   # yum groupinstall "X Window System" "Desktop"(CentOS 6.x安装GNOME桌面环境)

  或

  yum groupinstall "Desktop"

  b. XFce桌面(跟上面选择一个)
  # yum groupinstall Xfce(CentOS安装Xfce桌面环境,可选,Xfce比 GNOME 消耗资源小)

  c. 安装中文支持

  yum groupinstall "Chinese Support"

  d. 编辑系统编码配置为 LANG="zh_CN.UTF-8"

     cd /etc/sysconfig

     vi i18n
     LANG="zh_CN.UTF-8"
     Esc

     :wq

3.执行 安装命令 

  yum install tigervnc tigervnc-server

  省略一堆下载提示

  Is this ok [y/N]: y <- 这里输入 y回车继续安装

4.添加启动项

  chkconfig --add vncserver

  chkconfig vncserver on
5.设置VNC Server 连接密码

  [root@m-ibot2 ~]# vncserver <-- 输入提示要创建密码
  You will require a password to access your desktops.
  Password:  <--输入密码
  Verify:    <--重复密码
  提示 在当前用户主目录下 生成 .vnc 目录 和 配置文件

  也可以通过密码命令 修改密码:

  [root@m-ibot2 sysconfig]# vncpasswd<-- 输入
  Password:  <--输入密码
  Verify:    <--重复密码
6. 修改 xstartup 文件,把最后的 twm & 删掉,并加上 gnome-session &

   执行:

   cd /root/.vnc/       <- 进入vnc目录

   tail -n 3 xstartup   <- 执行命令
7. VNC配置

   下面尝试启动VNC Server

   [root@m-ibot2 .vnc]# /etc/init.d/vncserver start
   正在启动 VNC 服务器:no displays configured                [失败] 

   错误说明 没有配置

   用vi打开配置文件:  

   [root@m-ibot2 .vnc]# vi /etc/sysconfig/vncservers

   vi命令说明:

   i 进入insert模式

   Ecs 退出模式回到命令模式

   :w 保存 不退出 vi

   :w file 另存为 不退出vi

   :w! 强制保存 不退出 vi

   :wq 保存并退出vi

   :wq! 强制保存并退出 vi

   :q  不保存 退出 vi

   :q! 不保存 强制退出 vi

   :e! 放弃所有修改,从上次保存文件内容开始再编辑
  
   打开配置文件,看到两行注释掉的行:

   # VNCSERVERS="2:myusername"
   # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

   修改成

VNCSERVERS="2:root"
  VNCSERVERARGS[2]="-geometry 1024x768 -alwaysshared"
  -alwaysshared表示同一个显示端口允许多用户同时登录

8.VNC Server启动,重新启动等命令

  /etc/init.d/vncserver start 启动

  /etc/init.d/vncserver restart 重新启动

  /etc/init.d/vncserver stop 停止

  /etc/init.d/vncserver -kill :2 关闭某一个Server

9. 查看VNC Server启动情况

   可以使用 netstat -tulnp 命令查看端口占用

   tcp 0.0.0.0:5801
   tcp 0.0.0.0:5901

   等 端口占用

10.Windows客户端连接

  在服务器上 查看一下ip地址

  用 ifconfig  必须 su - 命令,将root用户的环境变量带过来,才能执行查看。

  使用  RealVNC 的 VNC Viewer 软件即可。

  Server : 192.168.140.199:2  <- 这里IP后的数字 跟在ContOS下的配置一致
 

ssh到linux上通过命令行启动 vnc server,会分配一个桌面号(例如1)。
然后通过vnc viewer,输入服务器的IP和桌面编号,如:172.28.10.113:1
而后输入VNC连接密码就可以登录了。
 
特别注意:一定要记下自己的桌面号,在不用的时候,使用命令
   vncserver  -kill  :桌面号 
把你的桌面号删除,以免占用资源。
 
由于默认的配置是终端登陆方式,如果使用桌面图形登陆,需要修改自己home目录下的 .vnc/xstartup文件中的内容。
修改方式是:将 xstartup中的  “twm  &” 修改为 “gnome &”,并kill掉前面创建的桌面号,重新创建即可登陆桌面环境。

http://blog.csdn.net/txg703003659/article/details/6619652