设为首页
收藏本站
淘宝精选
开启辅助访问
登录
注册后绑定Q登陆
手机号登录
手机号码,快捷登录
微信登录
QQ登录
快捷导航
发布信息
搜索
搜索
支持我们
使用96IE来支持论坛
首页
任务
勋章
签到
签到等于每天打卡
导读
邀请码
装机必备的软件、去广告版
装机助手
装机网
精品操作系统下载
免费邀请码
记录
Doing
每日签到
本版
帖子
用户
PCOS技术网
»
首页
›
≡技术交流≡
›
电脑技术交流
›
Redhat as 5 vncserver及vncviewer的详细配置
返回列表
发新帖
查看:
570
|
回复:
2
Redhat as 5 vncserver及vncviewer的详细配置
[复制链接]
amwdnuff
amwdnuff
当前离线
积分
10395266
IP卡
狗仔卡
签到天数: 2626 天
连续签到: 5 天
[LV.Master]至尊海神IIIIII
发表于 2009-5-23 14:09
|
广东
|
显示全部楼层
|
阅读模式
Redhat as 5 vncserver及vncviewer的详细配置
1、首先要配置的是服务端
A 确认服务器端是否安装了vncserver
使用rpm –qa vnc命令如果收到如下信息说明已经安装了vncserver,
[root@localhost: ~]#rpm -qa |grep vnc
gtk-vnc-python-0.3.2-3.el5
vnc-server-4.1.2-14.el5
gtk-vnc-0.3.2-3.el5
vnc-4.1.2-14.el5
B从光盘找到安装包进行安装
首先将光盘挂载(也叫解压)到某个目录这里是在/var/ftp/pub/下面建立了rhel5-64目录
mount –o loop rhel-server-5.3-x86_64-dvd.iso/var/ftp/pub/rhel5-64/
然后在/var/ftp/pub/rhel5-64/Server目录下找到 vnc-server-4.1.2-14.el5.x86_64.rpm安装包,使用rpm –ivh vnc-server-4.1.2-14.el5.x86_64.rpm命令直接安装;
C 接下来就是最重要的配置步骤了:
服务器端配置如下:
1)第一次启动vncserver 会提示输入密码:
管理员帐户:
[root@localhost /]# vncserver
You will require a password to access your desktops.
Password: 输入vnc 连接密码
Verify: 确认vnc密码
xauth:creating new authority file /root/.Xauthority
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
普通用户:
[root@localhost /]#su huilin
[huilin@localhost /]$ vncserver
You will require a password to access your desktops.
Password:输入vnc 连接密码
Verify:确认vnc密码
xauth:creating new authority file /home/huilin/.Xauthority
New 'localhost.localdomain:2 (huilin)' desktop is localhost.localdomain:2
Creating default startup script /home/huilin/.vnc/xstartup
Starting applications specified in /home/huilin/.vnc/xstartup
Log file is /home/huilin/.vnc/localhost.localdomain:2.log
* 注意到每个用户都可以启动自己的 vncserver,每个用户可以启动多个 vncserver,
用ip加端口号 ip:1,ip:2,ip:3 来标识。vncserver的大部分配置文件及日志文件都在用户home目录下.vnc目录下
用户可以自定义启动号码如:
[huilin@localhost /]$ vncserver :2
A VNC server is already running as :2
2)配置vnc的配置文件xstartup文件
如果用的是gnome 桌面环境还需要修改
[root@localhost .vnc]# vi xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER将此行的注释去掉
# exec /etc/X11/xinit/xinitrc 将此行的注释去掉
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title \"$VNCDESKTOP Desktop\" &
gnome-session gnome 添加连接时使用 gnome 桌面环境
twm &
3)在vncserver设置登录用户的信息
[root@localhost: ~]#vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!For a secure way of using VNC, see
# <URL:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
>.
# Use \"-nolisten tcp\" to prevent X connections to your VNC server via TCP.
# Use \"-nohttpd\" to prevent web-based VNC clients connecting.
# Use \"-localhost\" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.See the \"-via\" option in the
# `man vncviewer' manual page.
VNCSERVERS=\"1:root 2:demo\" 此处添加用户
VNCSERVERARGS[2]=\"-geometry 800x600 -nolisten tcp -nohttpd -localhost\"
#vncserver -geometry 800x600设置vncserver的分辨率
#vncserver -geometry 640x480设置vncserver的分辨率
#vncserver -depth 8设置vncserver的色深
#vncserver -depth 16 设置vncserver的色深
4)客户端的连接
a、在linux下,运行vncviewer命令即可,服务器地址的写法形如192.168.3.119:1
b、在windows下,运行windows版本的vncviewer即可,用法与linux下相近。
c、用浏览器(平台无关),作为java applet来实现,以形如
http://192.168.3.119:5801
的方式来启动(vnc 端口从5800 开始依次类推,一般会是5800,5900)
5)修改密码
运行vncpasswd即可
6)停止vncserver
#vncserver -kill :1
#vncserver -kill :2
注意到vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,
除非用kill命令暴力杀死进程。
7)稳定性设置
vncserver默认在多个客户机连接同一个vncserver的显示端口时,vncserver端口旧连接,而为新连接服务,可通过-dontdisconnect拒绝新连接请求而保持旧的连接。
8)同一个显示器可以连接多个客户机
#vncserver –alwaysshared
PCOS系统下载站:http://zhuangji.wang
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
抢沙发
千斤顶
显身卡
amwdnuff
amwdnuff
当前离线
积分
10395266
IP卡
狗仔卡
签到天数: 2626 天
连续签到: 5 天
[LV.Master]至尊海神IIIIII
楼主
|
发表于 2009-5-23 14:09
|
广东
|
显示全部楼层
Redhat as 5 vncserver及vncviewer的详细配置
Redhat as 5 vncserver及vncviewer的详细配置
1、首先要配置的是服务端
A 确认服务器端是否安装了vncserver
使用rpm –qa vnc命令如果收到如下信息说明已经安装了vncserver,
[root@localhost: ~]#rpm -qa |grep vnc
gtk-vnc-python-0.3.2-3.el5
vnc-server-4.1.2-14.el5
gtk-vnc-0.3.2-3.el5
vnc-4.1.2-14.el5
B从光盘找到安装包进行安装
首先将光盘挂载(也叫解压)到某个目录这里是在/var/ftp/pub/下面建立了rhel5-64目录
mount –o loop rhel-server-5.3-x86_64-dvd.iso/var/ftp/pub/rhel5-64/
然后在/var/ftp/pub/rhel5-64/Server目录下找到 vnc-server-4.1.2-14.el5.x86_64.rpm安装包,使用rpm –ivh vnc-server-4.1.2-14.el5.x86_64.rpm命令直接安装;
C 接下来就是最重要的配置步骤了:
服务器端配置如下:
1)第一次启动vncserver 会提示输入密码:
管理员帐户:
[root@localhost /]# vncserver
You will require a password to access your desktops.
Password: 输入vnc 连接密码
Verify: 确认vnc密码
xauth:creating new authority file /root/.Xauthority
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
普通用户:
[root@localhost /]#su huilin
[huilin@localhost /]$ vncserver
You will require a password to access your desktops.
Password:输入vnc 连接密码
Verify:确认vnc密码
xauth:creating new authority file /home/huilin/.Xauthority
New 'localhost.localdomain:2 (huilin)' desktop is localhost.localdomain:2
Creating default startup script /home/huilin/.vnc/xstartup
Starting applications specified in /home/huilin/.vnc/xstartup
Log file is /home/huilin/.vnc/localhost.localdomain:2.log
* 注意到每个用户都可以启动自己的 vncserver,每个用户可以启动多个 vncserver,
用ip加端口号 ip:1,ip:2,ip:3 来标识。vncserver的大部分配置文件及日志文件都在用户home目录下.vnc目录下
用户可以自定义启动号码如:
[huilin@localhost /]$ vncserver :2
A VNC server is already running as :2
2)配置vnc的配置文件xstartup文件
如果用的是gnome 桌面环境还需要修改
[root@localhost .vnc]# vi xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER将此行的注释去掉
# exec /etc/X11/xinit/xinitrc 将此行的注释去掉
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title \"$VNCDESKTOP Desktop\" &
gnome-session gnome 添加连接时使用 gnome 桌面环境
twm &
3)在vncserver设置登录用户的信息
[root@localhost: ~]#vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!For a secure way of using VNC, see
# <URL:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
>.
# Use \"-nolisten tcp\" to prevent X connections to your VNC server via TCP.
# Use \"-nohttpd\" to prevent web-based VNC clients connecting.
# Use \"-localhost\" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.See the \"-via\" option in the
# `man vncviewer' manual page.
VNCSERVERS=\"1:root 2:demo\" 此处添加用户
VNCSERVERARGS[2]=\"-geometry 800x600 -nolisten tcp -nohttpd -localhost\"
#vncserver -geometry 800x600设置vncserver的分辨率
#vncserver -geometry 640x480设置vncserver的分辨率
#vncserver -depth 8设置vncserver的色深
#vncserver -depth 16 设置vncserver的色深
4)客户端的连接
a、在linux下,运行vncviewer命令即可,服务器地址的写法形如192.168.3.119:1
b、在windows下,运行windows版本的vncviewer即可,用法与linux下相近。
c、用浏览器(平台无关),作为java applet来实现,以形如
http://192.168.3.119:5801
的方式来启动(vnc 端口从5800 开始依次类推,一般会是5800,5900)
5)修改密码
运行vncpasswd即可
6)停止vncserver
#vncserver -kill :1
#vncserver -kill :2
注意到vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,
除非用kill命令暴力杀死进程。
7)稳定性设置
vncserver默认在多个客户机连接同一个vncserver的显示端口时,vncserver端口旧连接,而为新连接服务,可通过-dontdisconnect拒绝新连接请求而保持旧的连接。
8)同一个显示器可以连接多个客户机
#vncserver –alwaysshared
PCOS系统下载站:http://zhuangji.wang
回复
支持
反对
使用道具
举报
显身卡
amwdnuff
amwdnuff
当前离线
积分
10395266
IP卡
狗仔卡
签到天数: 2626 天
连续签到: 5 天
[LV.Master]至尊海神IIIIII
楼主
|
发表于 2009-5-23 14:09
|
广东
|
显示全部楼层
Redhat as 5 vncserver及vncviewer的详细配置
Redhat as 5 vncserver及vncviewer的详细配置
1、首先要配置的是服务端
A 确认服务器端是否安装了vncserver
使用rpm –qa vnc命令如果收到如下信息说明已经安装了vncserver,
[root@localhost: ~]#rpm -qa |grep vnc
gtk-vnc-python-0.3.2-3.el5
vnc-server-4.1.2-14.el5
gtk-vnc-0.3.2-3.el5
vnc-4.1.2-14.el5
B从光盘找到安装包进行安装
首先将光盘挂载(也叫解压)到某个目录这里是在/var/ftp/pub/下面建立了rhel5-64目录
mount –o loop rhel-server-5.3-x86_64-dvd.iso/var/ftp/pub/rhel5-64/
然后在/var/ftp/pub/rhel5-64/Server目录下找到 vnc-server-4.1.2-14.el5.x86_64.rpm安装包,使用rpm –ivh vnc-server-4.1.2-14.el5.x86_64.rpm命令直接安装;
C 接下来就是最重要的配置步骤了:
服务器端配置如下:
1)第一次启动vncserver 会提示输入密码:
管理员帐户:
[root@localhost /]# vncserver
You will require a password to access your desktops.
Password: 输入vnc 连接密码
Verify: 确认vnc密码
xauth:creating new authority file /root/.Xauthority
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
普通用户:
[root@localhost /]#su huilin
[huilin@localhost /]$ vncserver
You will require a password to access your desktops.
Password:输入vnc 连接密码
Verify:确认vnc密码
xauth:creating new authority file /home/huilin/.Xauthority
New 'localhost.localdomain:2 (huilin)' desktop is localhost.localdomain:2
Creating default startup script /home/huilin/.vnc/xstartup
Starting applications specified in /home/huilin/.vnc/xstartup
Log file is /home/huilin/.vnc/localhost.localdomain:2.log
* 注意到每个用户都可以启动自己的 vncserver,每个用户可以启动多个 vncserver,
用ip加端口号 ip:1,ip:2,ip:3 来标识。vncserver的大部分配置文件及日志文件都在用户home目录下.vnc目录下
用户可以自定义启动号码如:
[huilin@localhost /]$ vncserver :2
A VNC server is already running as :2
2)配置vnc的配置文件xstartup文件
如果用的是gnome 桌面环境还需要修改
[root@localhost .vnc]# vi xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER将此行的注释去掉
# exec /etc/X11/xinit/xinitrc 将此行的注释去掉
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title \"$VNCDESKTOP Desktop\" &
gnome-session gnome 添加连接时使用 gnome 桌面环境
twm &
3)在vncserver设置登录用户的信息
[root@localhost: ~]#vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!For a secure way of using VNC, see
# <URL:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
>.
# Use \"-nolisten tcp\" to prevent X connections to your VNC server via TCP.
# Use \"-nohttpd\" to prevent web-based VNC clients connecting.
# Use \"-localhost\" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.See the \"-via\" option in the
# `man vncviewer' manual page.
VNCSERVERS=\"1:root 2:demo\" 此处添加用户
VNCSERVERARGS[2]=\"-geometry 800x600 -nolisten tcp -nohttpd -localhost\"
#vncserver -geometry 800x600设置vncserver的分辨率
#vncserver -geometry 640x480设置vncserver的分辨率
#vncserver -depth 8设置vncserver的色深
#vncserver -depth 16 设置vncserver的色深
4)客户端的连接
a、在linux下,运行vncviewer命令即可,服务器地址的写法形如192.168.3.119:1
b、在windows下,运行windows版本的vncviewer即可,用法与linux下相近。
c、用浏览器(平台无关),作为java applet来实现,以形如
http://192.168.3.119:5801
的方式来启动(vnc 端口从5800 开始依次类推,一般会是5800,5900)
5)修改密码
运行vncpasswd即可
6)停止vncserver
#vncserver -kill :1
#vncserver -kill :2
注意到vncserver只能由启动它的用户来关闭,即时是root也不能关闭其它用户开启的vncserver,
除非用kill命令暴力杀死进程。
7)稳定性设置
vncserver默认在多个客户机连接同一个vncserver的显示端口时,vncserver端口旧连接,而为新连接服务,可通过-dontdisconnect拒绝新连接请求而保持旧的连接。
8)同一个显示器可以连接多个客户机
#vncserver –alwaysshared
PCOS系统下载站:http://zhuangji.wang
回复
支持
反对
使用道具
举报
显身卡
返回列表
发新帖
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册后绑定Q登陆
本版积分规则
发表回复
回帖并转播
回帖后跳转到最后一页