玩Linux系統,會經常用到遠端桌面軟體。 我一直用的2個是Xmanager 和 VNC。 今天看到一個新軟體: NoMachine。 NoMachine NX 是一個快速的終端伺服器和虛擬桌面軟體,基於 X11 協議。據說速度比 VNC 還快,甚至可以在只有 10k 的頻寬環境下運行。 而且畫面也比VNC 的清楚。
NoMachine 官網地址:http://www.nomachine.com/
使用NoMachine 需要佈建服務端和用戶端。
一. 服務端
服務端需要安裝3個包:
nxserver-3.4.0-12.i386.rpm
nxnode-3.4.0-11.i386.rpm
nxclient-3.4.0-7.i386.rpm
Linux 32bit 的是:
http://www.nomachine.com/download-package.php?Prod_Id=2068
下面是NoMachine網頁的上一個使用說明:
1. Download the RPMs
2. Change your working directory to the location where you saved the package and install it by running from a console:
# sudo rpm -i nxclient-3.4.0-7.x86_64.rpm
# sudo rpm -i nxnode-3.4.0-14.x86_64.rpm
# sudo rpm -i nxserver-3.4.0-14.x86_64.rpm |
| If you don't have the sudo utility installed, log on as superuser ("root") and run the commands without sudo. |
| Note: click here for detailed instructions on how to install the NX Client, NX Node and NX Server packages. The NX service can be controlled by the command /usr/NX/bin/nxserver --status|--start|--stop|--restart. Additional commands are available to configure the server. Try /usr/NX/bin/nxserver --help for more information. Please, don't forget to download and read the NX Server Administrator's Guide available here. |
[root@rac2 /]# mkdir /windows
[root@rac2 /]# mount -o username=dave,password=888 //192.168.6.80/tmp /windows
[root@rac2 /]# cd windows/
[root@rac2 windows]# ls
nxclient-3.4.0-7.i386.rpm nxnode-3.4.0-14.i386.rpm nxserver-3.4.0-14.i386.rpm
[root@rac2 windows]# ls -lrt
total 17033
-rwxrwSrwx 1 root root 6928970 Nov 11 18:53 nxserver-3.4.0-14.i386.rpm
-rwxrwSrwx 1 root root 6033923 Nov 11 18:53 nxnode-3.4.0-14.i386.rpm
-rwxrwSrwx 1 root root 4477229 Nov 11 18:54 nxclient-3.4.0-7.i386.rpm
[root@rac2 windows]# rpm -ivh *.rpm
error: failed to stat /mnt: Host is down
Preparing... ########################################### [100%]
1:nxclient ########################################### [ 33%]
Showing file: /usr/NX/share/documents/client/cups-info
CUPS Printing Backend
The NX Client set-up procedure detected that your "IPP CUPS" printing
backend doesn't allow printing from the NX session. In order to have
printing support in your NX system, you need to set proper permissions
on the IPP backend. Please execute:
chmod 755 /usr/lib/cups/backend/ipp
2:nxnode ########################################### [ 67%]
NX> 700 Starting: install node operation at: Thu Nov 11 18:58:13 2010.
NX> 700 Autodetected system 'redhat'.
NX> 700 Install log is '/usr/NX/var/log/install'.
NX> 700 Creating configuration in /usr/NX/etc/node.cfg.
NX> 700 Inspecting local CUPS environment.
NX> 700 Generating CUPS entries in: /usr/NX/etc/node.cfg.
NX> 700 Installation of version: 3.4.0-14 completed.
NX> 700 Bye.
3:nxserver ########################################### [100%]
NX> 700 Installing: server at: Thu Nov 11 18:58:27 2010.
NX> 700 Autodetected system: redhat.
NX> 700 Install log is: /usr/NX/var/log/install.
NX> 700 Creating configuration file: /usr/NX/etc/server.cfg.
NX> 723 Cannot start NX statistics:
NX> 709 NX statistics are disabled for this server.
NX> 700 Version '3.4.0-14' installation completed.
NX> 700 Showing file: /usr/NX/share/documents/server/install-notices
...
NX> 700 Bye.
[root@rac2 windows]#
上面有提示我們執行指令碼:
[root@rac1 windows]# chmod 755 /usr/lib/cups/backend/ipp
查看NXserver :
[root@rac2 Server]# /usr/NX/bin/nxserver --status
NX> 900 Connecting to server ...
NX> 110 NX Server is running.
NX> 999 Bye.
[root@rac2 Server]#
二. 用戶端
Windows 用戶端下載:
http://www.nomachine.com/download-client-windows.php
安裝完之後去連服務端即可。
運行之後,看配置:
在這裡我們需要輸入Host 和 遠端桌面類型。 現在基本用的是KDE 和 GNOME。 如果Linux 只安裝了一個,就要選對。
下面還有一個選擇網路類型的。
串連之後的畫面:
這裡有兩點注意的地方:
1. 不能用root使用者進行串連
2. 如果遇到一下問題,請檢查環境變數:
To launch a desktop session, KDE or GNOME, the corresponding
commands, either startkde or gnome-session must be set in the PATH.
If the command is not available in the PATH, an error message like:
"Cannot run 'startkde'. Please check that the requested application is in
the system PATH and that you have the rights to execute it."
NoMachine 官網對這個錯誤做了說明:
http://www.nomachine.com/ar/view.php?ar_id=AR06D00398
三. 修改NoMachine 的連接埠
NoMachine和 SSH 使用相同的通道,所以如果SSH的連接埠修改了,NoMachine 的連接埠也要修改。
NoMachine 連接埠的2個設定檔:
檔案1:/usr/NX/etc/server.cfg
修改如下2個參數:
SSHDPort = "222"
ServerName = " ds-nb-dbserver "
--這個是/etc/hosts 檔案裡的
檔案2:/usr/NX/etc/node.cfg
修改如下3個參數:
NodeName = "ds-nb-dbserver"
SSHDPort = "222"
SSHDAuthPort = "222"
SSH 的連接埠設定檔:/etc/ssh/sshd_config
修改其中的連接埠與NoMachine保持一致:
Port 222
記得在防火牆裡把連接埠添加進去:
Linux iptables 防火牆 添加刪除 連接埠
http://www.bkjia.com/Article/201202/119414.html
重啟SSH 和連接埠:
[root@ds-nb-dbserver Linux32bitServer]#/usr/NX/bin/nxserver --stop
NX> 123 Service stopped.
NX> 153 Stopping NX server monitor.
NX> 153 NX server monitor alreadystopped.
NX> 999 Bye.
[root@ds-nb-dbserver Linux32bitServer]#/usr/NX/bin/nxserver --start
NX> 122 Service started.
NX> 999 Bye.
[root@ds-nb-dbserver Linux32bitServer]#/usr/NX/bin/nxserver --status
NX> 900 Connecting to server ...
NX> 110 NX Server is running.
NX> 999 Bye.
/etc/init.d/ssh restart
-------------------------------------------------------------------------------------------------------
著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!
Blog: http://blog.csdn.net/tianlesoftware