Xmanage 的Unix/linux端配置

一、  REHL5

1、/etc/inittab 中为init 5

2、搜索gdm文件目录并配置

#find /etc -name 'gdm'

#cp /etc/gdm/custom.conf /etc/gdm/gdm.conf  ##该不该名没大问题

[fukeyun@heliy ~]$ cat -n /etc/gdm/gdm.conf
     1 # GDM configuration storage
     2 
     3 [daemon]
     4 
     5 [security]
     6 DisallowTCP = false
     7 AllowRemoteRoot = true
     8 
     9 [xdmcp]
    10 Enable = 1
    11 Port = 177
    12 
    13 [greeter]
    14 
    15 [chooser]
    16 
    17 [debug]
 #gdmsetup  图形界面配置远程访问,我在rhel5.1中必须配置才能登录,不知为什么?还没找到原因。

#gdm-restart  重启gdm

xmanage 链接前关闭iptables 或 开放177端口

iptables -A INPUT -p udp,tcp  -s 0/0 -d 0/0 --dport 177 -j ACCEPT 

 

===================================================

VNC

1\   check install    我是全部都安装了,也可以仅安装vnc server

root@heliy fukeyun]# rpm -qa | grep 'vnc'
tigervnc-server-1.0.90-0.10.20100115svn3945.el6.i686
gtk-vnc-python-0.3.10-3.el6.i686
libvncserver-0.9.7-4.el6.i686
gtk-vnc-0.3.10-3.el6.i686
tigervnc-1.0.90-0.10.20100115svn3945.el6.i686
 

2、配置前基础

文件:

[fukeyun@heliy ~]$ ls -l ./.vnc/
total 0                ##没启动vncserver没有配置文件

 /etc/sysconfig/vncservers

命令:

[fukeyun@heliy ~]$ vnc
vncconfig  vncpasswd  vncserver  vncviewer 

服务:

[root@heliy fukeyun]# /etc/init.d/vncserver --help
Usage: /etc/init.d/vncserver {start|stop|restart|try-restart|status|force-reload}

 3、 配置

[root@heliy fukeyun]# vi /etc/sysconfig/vncservers

 # VNCSERVERS="2:myusername 3:user2"  ##多用户模式
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
# VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -localhost"

## user configure
VNCSERVERS="3:fukeyun"
VNCSERVERARGS[3]="-geometry 1024x768 -AlwaysShared"

 启动服务

[root@heliy fukeyun]# /etc/init.d/vncserver start
Starting VNC server: 3:fukeyun

New 'heliy.rhel6:3 (fukeyun)' desktop is heliy.rhel6:3

Creating default startup script /home/fukeyun/.vnc/xstartup
Starting applications specified in /home/fukeyun/.vnc/xstartup
Log file is /home/fukeyun/.vnc/heliy.rhel6:3.log

 查看用户目录下文件

[root@heliy fukeyun]# ls ./.vnc/
heliy.rhel6:3.log  heliy.rhel6:3.pid  passwd  xstartup

 生成xstartup文件,不许要修改此文件,老版本需要修改下。

查看端口

[root@heliy fukeyun]# netstat -an |grep 5903
tcp        0      0 0.0.0.0:5903                0.0.0.0:*                   LISTEN

 

 5、其他命令的使用

[fukeyun@heliy ~]$ vncserver :4
New 'heliy.rhel6:4 (fukeyun)' desktop is heliy.rhel6:4
Starting applications specified in /home/fukeyun/.vnc/xstartup
Log file is /home/fukeyun/.vnc/heliy.rhel6:4.log
[fukeyun@heliy ~]$ ls ./.vnc/
heliy.rhel6:3.log  heliy.rhel6:4.log  passwd
heliy.rhel6:3.pid  heliy.rhel6:4.pid  xstartup

这时生成的端口5904应该是临时的,重启后应该没有(还没验证)。

[fukeyun@heliy ~]$ vncpasswd fukeyun
Password:
Verify:

修改不成共,还没做详细测试。 vncconfig也没测试,不过vnc远程已经可用了