在REDHAT 2.1 AS設置VNC server

VNC是比較流行的遠程管理軟件,在windows下比較容易使用,在rh 8以上也沒有什么要特別設定的,比rh8的kernel的edition低的話,就要做如下設定才可以正常使用:
001.vncserver
002.vncpasswd
003.vncviewer

1.確認有安裝vnc
[root@Linux1 root]# rpm -qa |grep vnc
vnc-server-3.3.3r2-18.6
vnc-3.3.3r2-18.6
[root@Linux1 root]#

2.設置vncserver為開機自啟動
[root@Linux1 root]#setup

    ┌────────┤ Choose a Tool ├─────────┐
    │                                  │
    │   Authentication configuration   │
    │   Firewall configuration         │
    │   Keyboard configuration         │
    │   Mouse configuration            │
    │   Network configuration          │
    │   Printer configuration          │
    │   System services                │
    │   Timezone configuration         │
    │   X configuration                │
    │                                  │
    │                                  │
    │      ┌──────────┐  ┌──────┐      │
    │      │ Run Tool           │  │ Quit      │   │
    │      └──────────┘  └──────┘      │
    │                                      │
    │                                     │
    └───────────────────────────┘
choose [System services] ==>[enter]

              ┌──────────┤ Services ├───
              │                                                 │
              │ What services should be automatically started?  │
              │                                                 │
              │              [ ] talk            ▒              │
              │              [ ] telnet          ▒              │
              │              [ ] time            ▒              │
              │              [ ] time-udp        ▒              │
              │              [ ] tux             ▒              │
              │              [*] vncserver       #              │
              │              [ ] winbind         ▒              │
              │              [ ] xfs             ▒              │
              │                                                 │
              │         ┌────┐       ┌────────┐ │      
              │         │ Ok     │       │ Cancel        │ │    
              │         └────┘       └────────┘ │     
              └──────────────────────── ┘
choose [vncserver] ==>Tab [OK] ==>Tab [Quit]

3.切換到要使用vnc的user account下找到xstartup這個文件(for e.g. root)
[root@Linux1 .vnc]# pwd
/root/.vnc
[root@Linux1 .vnc]# ls xstartup
xstartup
[root@Linux1 .vnc]#

4.修改xstartup這個文件讓在用vnc連到server是顯示為KDE or GNOME
  vncserver default開啟的是XDM
[root@Linux1 .vnc]# vi xstartup

#!/bin/sh

#xrdb $HOME/.Xresources
#xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#exec /etc/X11/xinit/xinitrc

#add by vongates for gnome
gnome-session
#if you use KDE,Please add follow line
#startkde
#add end
~
5.啟動VNC
[root@Linux1 .vnc]# vncserver

New 'X' desktop is Linux1.com.cn:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Linux1.com.cn:1.log

[root@Linux1 .vnc]# vncserver

Warning: Linux1.com.cn:2 is taken because of /tmp/.X11-unix/X2
Remove this file if there is no X server Linux1.com.cn:2

New 'X' desktop is Linux1.com.cn:3

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Linux1.com.cn:3.log

[root@Linux1 .vnc]# ps -aux |grep vnc
root     24930  0.2  0.1  5660 3540 pts/2    S    13:08   0:00 Xvnc :1 -desktop
root     25124  0.2  0.1  4880 3100 pts/2    S    13:09   0:00 Xvnc :3 -desktop
root     25479  0.0  0.0  1740  600 pts/2    S    13:12   0:00 grep vnc
[root@Linux1 .vnc]#

6.關閉VNC
[root@Linux1 .vnc]# vncserver -kill :1
Killing Xvnc process ID 24930
[root@Linux1 .vnc]# vncserver -kill :3
Killing Xvnc process ID 25124
[root@Linux1 .vnc]# ps -aux |grep vnc
root     25497  0.0  0.0  1736  588 pts/2    S    13:13   0:00 grep vnc
[root@Linux1 .vnc]#

7.變更vncserver的密碼
[root@Linux1 .vnc]# vncpasswd
Password:
Verify:
[root@Linux1 .vnc]#

8.vncserver --help
[root@Linux1 .vnc]# vncserver --help

usage: vncserver [:] [-name ] [-depth ]
                 [-geometry x]
                 [-pixelformat rgbNNN|bgrNNN]
                 ...

       vncserver -kill

[root@Linux1 .vnc]#

9.VNC Client如何連接上server
a.)http://Linux1.com.cn:5801
b.)在windows下的通過vncview這個應用程式
c.)在Linux下的run中輸入vncviewer

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51630/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29987/viewspace-51630/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值