Linux下更方便的远程桌面控制(Install NoMachine on RHEL and Use it)
本文将介绍一个Linux下的远程控制工具:Nomachine。
该工具事实上不只限于Linux平台,还包括MS Windows、Mac等。
开始本文前。
先需要下载Nomachine的MS Windows客户端工具以及Linux的服务端安装包。
Nomachine的官方网站为:www.nomachine.com
其中,Linux64位的RPM下载页链接为:https://www.nomachine.com/download/download&id=4
Download Link is:http://download.nomachine.com/download/4.2/Linux/nomachine_4.2.26_1_x86_64.rpm
在客户端主机上安装好Nomachine的Windows客户端工具(如果您的操作系统为Mac,则安装Mac版的Nomachine):
(MS Windows的安装只需“下一步”即可,故不详述。)
一、服务器端的安装(on CentOS 6.5)
OS Version:
1 2 3 4 5 6 7 |
[root@DatabaseLogic ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final [root@DatabaseLogic ~]# |
上传介质到服务器的“/software”目录下:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@DatabaseLogic ~]# cd /software [root@DatabaseLogic software]# pwd /software [root@DatabaseLogic software]# ll 总用量 3817460 drwxr-xr-x 2 root root 4096 4月 7 17:47 iredmail -rw-r--r-- 1 root root 23949546 7月 21 15:42 nomachine_4.2.26_1_x86_64.rpm -rw-r--r-- 1 root root 3885117440 4月 7 18:05 V41362-01_RHEL6U5_64Bit.iso [root@DatabaseLogic software]# du -sh * 116K iredmail 23M nomachine_4.2.26_1_x86_64.rpm 3.7G V41362-01_RHEL6U5_64Bit.iso [root@DatabaseLogic software]# |
安装“nomachine_4.2.26_1_x86_64.rpm”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
[root@DatabaseLogic software]# rpm -qa | grep --color nomachine [root@DatabaseLogic software]# rpm -ivh nomachine_4.2.26_1_x86_64.rpm Preparing... ########################################### [100%] 1:nomachine ########################################### [100%] NX> 700 Starting install at: 一 7月 21 15:47:36 2014. NX> 700 Installing: nxclient version: 4.2.26. NX> 700 Using installation profile: Red Hat. NX> 700 Install log is: /usr/NX/var/log/nxinstall.log. NX> 700 Compiling the USB module. NX> 700 Installing: nxplayer version: 4.2.26. NX> 700 Using installation profile: Red Hat. NX> 700 Install log is: /usr/NX/var/log/nxinstall.log. NX> 700 Installing: nxnode version: 4.2.26. NX> 700 Using installation profile: Red Hat. NX> 700 Install log is: /usr/NX/var/log/nxinstall.log. NX> 700 Creating configuration in: /usr/NX/etc/node.cfg. NX> 700 Installing: nxserver version: 4.2.26. NX> 700 Using installation profile: Red Hat. NX> 700 Install log is: /usr/NX/var/log/nxinstall.log. NX> 700 Creating configuration in: /usr/NX/etc/server.cfg. NX> 700 Install completed at: 一 7月 21 15:47:46 2014. NX> 700 NoMachine was configured to run the following services: NX> 700 NX service on port: 4000 [root@DatabaseLogic software]# rpm -qa | grep --color nomachine nomachine-4.2.26-1.x86_64 [root@DatabaseLogic software]# |
(安装成功。)
该软件包的安装具体部署了如下的内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@DatabaseLogic software]# rpm -ql nomachine /etc/NX /etc/NX/server /etc/NX/server/localhost /etc/NX/server/localhost/server.cfg.sample /etc/NX/server/packages /etc/NX/server/packages/nxclient.tar.gz /etc/NX/server/packages/nxnode.tar.gz /etc/NX/server/packages/nxplayer.tar.gz /etc/NX/server/packages/nxserver.tar.gz /usr/NX [root@DatabaseLogic software]# [root@DatabaseLogic software]# ls -l /etc/init.d/ | grep nxserver -rwxr-xr-x 1 root root 1395 7月 21 15:47 nxserver [root@DatabaseLogic software]# |
(可以看到操作系统上新增了一项服务:nxserver)
如果需要NX客户端连接该服务器,那么“nxserver”服务必须打开,且保证没有防火墙之类的阻碍(关闭防火墙;设置足够的访问策略)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
[root@DatabaseLogic software]# service iptables status 表格:filter Chain INPUT (policy ACCEPT) num target prot opt source destination Chain FORWARD (policy ACCEPT) num target prot opt source destination Chain OUTPUT (policy ACCEPT) num target prot opt source destination [root@DatabaseLogic software]# service iptables stop iptables:将链设置为政策 ACCEPT:filter [确定] iptables:清除防火墙规则: [确定] iptables:正在卸载模块: [确定] [root@DatabaseLogic software]# service iptables status iptables:未运行防火墙。 [root@DatabaseLogic software]# getenforce Disabled [root@DatabaseLogic software]# [root@DatabaseLogic software]# service nxserver status NX> 161 Enabled service: nxserver. NX> 161 Enabled service: nxnode. NX> 161 Enabled service: nxd. [root@DatabaseLogic software]# [root@DatabaseLogic software]# netstat -tupln | grep --color "/nx" tcp 0 0 127.0.0.1:24088 0.0.0.0:* LISTEN 20307/nxserver.bin tcp 0 0 127.0.0.1:7001 0.0.0.0:* LISTEN 20334/nxnode.bin tcp 0 0 0.0.0.0:4000 0.0.0.0:* LISTEN 20315/nxd tcp 0 0 127.0.0.1:12001 0.0.0.0:* LISTEN 20334/nxnode.bin tcp 0 0 127.0.0.1:20001 0.0.0.0:* LISTEN 20314/nxserver.bin tcp 0 0 127.0.0.1:25001 0.0.0.0:* LISTEN 20364/nxclient.bin tcp 0 0 ::1:7001 :::* LISTEN 20334/nxnode.bin tcp 0 0 :::4000 :::* LISTEN 20315/nxd udp 4584 0 192.168.242.1:5353 0.0.0.0:* 20307/nxserver.bin udp 4584 0 192.168.58.1:5353 0.0.0.0:* 20307/nxserver.bin udp 18336 0 168.0.1.213:5353 0.0.0.0:* 20307/nxserver.bin udp 0 0 0.0.0.0:5353 0.0.0.0:* 20307/nxserver.bin [root@DatabaseLogic software]# |