对于需要经常远程到X windows的网友来说,VNC与Xmanager经常被使用,而NoMachine也是不错的选择之一,该工具简单,易用,尤其是在低带宽、慢速率的网络环境下工作性能良好。本文描述了NoMachine的快速安装与使用。
NoMachine 官网地址:http://www.nomachine.com/
NoMachine 的下载地址: http://www.nomachine.com/download.php
该软件支持多种平台,也有多种不同的版本,因此下载时,应选择适合自己平台使用的相应版本。
本文下载的是基于linux 64bit的安装版本,即 NX Free Edition。
一、NX简单介绍
NoMachien能使用户从另一台计算机访问和控制远程的Windows,Linux PC或Mac电脑,实现工作或娱乐等操作。
NoMachien的NX主要分为两部分:NX Client和NX Server。
NX Server的部署见文档 ,较为简单。部署完成后,就可以使用NX Client进行连接了。NX Client有Windows版本,Linux版本,Mac版本和Solaris版本。
NX远程桌面技术,采用了新的远程协议,把x桌面的数据经过提取,仅传送一些参数,而且通过ssh来进行数据加密传送,因此相比VNC或直接XDMP具有很快的速度和较高的安全性能。
二、安装与使用
下面是安装说明,直接参照安装即可
Note: Installation of NX Server for Linux requires the download and installation of three packages: client, node and server.
The client is needed because it ships libraries used by the node. The node is needed because it ships tools needed by the server.
Furthermore, the SSH server daemon (SSHD) needs to be up and running on each of the NX Node machines since NX relies on the mechanism provided by the SSH subsystem for handling user authentication.
TAR.GZ version
Download the TAR.GZs in the /usr directory
Change your working directory to the location where you saved the package and install it by running from a console:
# cd /usr
$ sudo tar zxvf nxclient-3.5.0-7.x86_64.tar.gz
$ sudo tar zxvf nxnode-3.5.0-9.x86_64.tar.gz
$ sudo tar zxvf nxserver-3.5.0-11.x86_64.tar.gz
Run the setup script for installing the NX Node and NX Server software:
$ sudo /usr/NX/scripts/setup/nxnode –install
$ sudo /usr/NX/scripts/setup/nxserver –install
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.
上面的安装说明中也给出了nxserver命令使用方式,如使用 –help获得所有的帮助信息
blade4:/ # /usr/NX/bin/nxserver –help
Usage: nxserver [Option]
–help
Show this message.
–version
Show version of NX Server.
………………
下面是硬件需求信息
Hardware
400 MHz processor
128 MB RAM
35 MB free disk space on your hard drive
Network connection (either a LAN, or Internet link: dial-up (minimum 33.6 Kbps modem), broadband, cable, DSL, etc.)
blade4:/usr # ls nx*
nxclient-3.5.0-7.x86_64.tar.gz nxnode-3.5.0-9.x86_64.tar.gz nxserver-3.5.0-11.x86_64.tar.gz
blade4:/usr # tar -zxvf nxclient-3.5.0-7.x86_64.tar.gz
blade4:/usr # tar -zxvf nxnode-3.5.0-9.x86_64.tar.gz
blade4:/usr # tar -zxvf nxserver-3.5.0-11.x86_64.tar.gz
blade4:/usr # cd NX
blade4:/usr/NX # ls
bin etc home lib scripts share var
blade4:/usr/NX/ # cd scripts/
blade4:/usr/NX/scripts # ls
init restricted setup
blade4:/usr/NX/scripts # cd setup/
blade4:/usr/NX/scripts/setup # ls
nxnode nxserver
blade4:/usr/NX/scripts/setup # ./nxnode –install
NX> 700 Starting: install node operation at: Mon Oct 08 07:24:52 2012.
NX> 700 Autodetected system ‘SUSE’.
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.5.0-9 completed.
NX> 700 Showing file: /usr/NX/share/documents/node/cups-info
CUPS Printing Backend
The NX Node setup procedure could not detect your “CUPS”
installation: either CUPS is not installed on your system
or it was installed in a non-standard path. CUPS is needed
in order to enable printing support in your NX system.
Please note that you can enable printing support for your
NX system at any time; to do this make sure that you have
CUPS installed then run:
/usr/NX/scripts/setup/nxnode –nxprintsetup <pathname>
to specify the location of the CUPS root path.
NX> 700 Bye.
blade4:/usr/NX/scripts/setup # ./nxserver –install
NX> 700 Installing: server at: Mon Oct 08 07:25:20 2012.
NX> 700 Autodetected system: suse.
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.5.0-11’ installation completed.
NX> 700 Showing file: /usr/NX/share/documents/server/install-notices
NX> 700 Bye.
#下面是安装后的状态检查
blade4:/ # /usr/NX/bin/nxserver –status
NX> 900 Connecting to server …
NX> 110 NX Server is running.
NX> 999 Bye.
接下来安装客户端,客户端的安装也比较简单,下载NX Client for Windows根据提示一步步安装即可。如果是linux客户端,下载相应的linux client即可。
下载连接: http://www.nomachine.com/documents/client/install.php
客户端安装完毕之后,根据NX connection winzard向导来配置nomachine。
输入session的名字,如此处是blade4
输入想要remote的ip,端口号缺省是22
选择合适的internet连接方式
接下来是选择操作系统类型以及桌面类型,我这里的是suse linux + gnome,因此选择unix + gnome
远程桌面的size可以保留缺省,也可以根据情况自行调节
下一个窗口提示是否要创建快捷方式以及显示高级配置对话框,之后,单击finish
出现最终的登陆窗口,输入linux上的用户名以及密码登陆到X windows
三、注意事项
1、一定要下载并解压nxclient-3.5.0-7.x86_64.tar.gz(tar安装版),否则收到错误信息。
本人在安装到第二台linux上时由于前面的安装貌似没有使用到nxclient,因此没有复制到第二台机器的/usr路径下,出现下列错误信息
下面是直接将下载的文件复制到usr路径后解压
blade10:/usr/NX/scripts/setup # /usr/NX/bin/nxserver –status
NX> 595 ERROR: Detected an inconsistency in the NX server configuration.
NX> 595 ERROR: The exception id is: F0305311. To get detailed information about
NX> 595 ERROR: the error, search for the string: F0305311 in the system log file
NX> 595 ERROR: (usually ‘/var/log/messages’).
blade10:~ # vi /var/log/messages
Oct 8 08:01:38 blade10 NXSERVER-3.5.0-11[29992]: ERROR: Exception id F0305311.
Wrong configuration: key ‘CommandNXSSH’ specifying nxssh command has wrong value : command ‘/usr/NX/bin/nxssh’ not found (NXNsSUSErManager::init)
2、 应根据安装指导下载到/usr路径解压后再安装,否则,会后到无法创建配置文件的错误信息
3、不能使用root用户登录到X windows。但登陆到X windows后,命令行下可以切换到root账户
下面是使用root账户登陆的错误提示
NX> 203 NXSSH running with pid: 5320
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 10.10.43.112 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER – Version 3.5.0-11 – LFE
NX> 105 Hello NXCLIENT – Version 3.5.0
NX> 134 Accepted protocol: 3.5.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: root
NX> 500 ERROR: User ‘root’ cannot be used as an NX user
NX> 999 Bye.
NX> 280 Exiting on signal: 15
Author: Robinson Cheng
Blog: http://www.linuxidc.com