client--> windows xp

server--> linux (fedora 8)

nxserver---> freenx-server-0.7.3-11.fc8

安裝freenx-server

[root@v9 ~]# yum install freenx-server

安裝完後需要一個script 來設定nx,不過沒找到,先用locate找找看

[root@v9 ~]#updatedb ; locate nxsetup

/usr/libexec/nx/nxsetup
/usr/share/doc/freenx-server-0.7.3/nxsetup

嗯應該是PATH的關係,加入PATH吧

[root@v9 ~]#vi ~/.bash_profile

PATH=$PATH:$HOME/bin:/usr/libexec/nx

[root@v9 ~]# source ~/.bash_profile

看一下nxsetup的用法吧

[root@v9 ~]# nxsetup --help
nxsetup - Setup the FreeNX server.
Syntax: nxsetup --help
        nxsetup --test [--ignore-errors]
        nxsetup --install [--setup-nomachine-key] [--uid <nummber>] [--clean [--purge]]
        nxsetup --uninstall [--purge]

  --help                 Display this help message.
  --test                 Test the configuration and connection to localhost NX Server.
  --install              Install necessary files and add the special user "nx".
  --ignore-errors        Check for false configuration, but don't complain.
  --setup-nomachine-key  Allow login with the key shipped with the NoMachine
                         client. This is fairly secure, and it simplifies the
                         configuration of clients. (Using a custom key pair.
                         increases security even more, but complicates the
                         configuration of clients.)
                         Use this option at your own risk.
  --ssh2                 Create additionally commercial pubkey-support; beware:
                         own _commercial_ ssh2-key is not supported!
  --uid <number>         Give the uid <number> to the user "nx".
  --gid <number>         Give the gid <number> to the user "nx".
  --localuser            The special user "nx" will be created locally using
                         "luseradd", for use in NIS and NISplus environments.
  --clean                Perform an uninstallation prior to installation.
  --uninstall            Remove log and session files, as well as the special
                         user "nx".
  --purge                Remove extra configuration files and ssh keys when
                         performing a "--uninstall".
                         Note that node.conf will always be saved.
  --auto                 Perform automatic installation without testing or asking.

了解了,下達指令吧

[root@v9 ~]# nxsetup --install --setup-nomachine-key
nxserver 到底啟動了沒,先看指令用法

[root@v9 ~]# nxserver --help
NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
Usage: nxserver <option>
--adduser <user>: Add a new user
--passwd <user>: Change password of <user>
--deluser <user>: Remove a user from nx
--listuser: List enabled users

--start: Start the nx server
--stop: Stop the nx server
--status: Show status of nx server
--restart: Restart the nx server. (start,stop)

--list [ user | sessionid ]: List running sessions of user or sessionid
--history [ user | sessionid | clear ]: Show history [ of user | sessionid ] or clear the history
--terminate <user | :display | sessionid>: Terminate the session pointed to by
       sessionid or display, or all sessions of the specified user.
       Use * for all sessions.
--force-terminate: Like terminate, but removes also session info.
--suspend <user | :display | sessionid>: Suspend the session pointed to by
       sessionid or display, or all sessions of the specified user.
       Use * for all sessions.
--cleanup: Terminates all running sessions. Useful after power-outage.

--broadcast <message>: Send a message to all users
--send <user | :display | sessionid> <message>: Send a message to the specified user or sessionid

編輯設定檔

[root@v9 ~]# cp /etc/nxserver/node.conf.sample /etc/nxserver/node.conf
[root@v9 ~]# vi /etc/nxserver/node.conf

修改以下幾行

SERVER_NAME="$(hostname)"
SSHD_PORT=22
ENABLE_PASSDB_AUTHENTICATION="1"

測試
[root@v9 ~]#nxsetup --test
你會看到幾行 warning,我們來修正lib部分
[root@v9 ~]#cd /usr/lib/nx/
ln -s libXcomp.so.3 libXcomp.so
ln -s libXcompext.so.3 libXcompext.so
ln -s libXrender.so.1.2.2 libXrender.so.1.2


[root@v9 ~]# nxserver --status
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
NX> 110 NX Server is running
NX> 999 Bye
看樣子啟動了,下一部是哪一些使用者要使用nxserver都需一一建立帳號,當然系統帳號也要應該建立,我系統已有ben的帳號,接下來只要加入nxserver就可以了

[root@v9 ~]# nxserver --restart
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
NX> 123 Service stopped
NX> 122 Service started
NX> 999 Bye
[root@v9 ~]# nxserver --adduser ben
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
NX> 716 Public key added to: /home/ben/.ssh/authorized_keys2
NX> 1001 Bye.
NX> 999 Bye
[root@v9 ~]# nxserver --passwd ben
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.2.0)
New password:
Password changed.
NX> 999 Bye

download 給 windows 用的 nxclient

http://www.nomachine.com/download.php

安裝應該不用說了吧,白痴安裝法next按到底,接著點開桌面上的NX Client for Windows, 開始設定

0002-498x382.png

0003-498x382.png 0004-498x382.png 0005-498x382.png 

 0006-328x217.png

 

 0007-328x217.png

 0008-1030x800.png 

 0009-1030x800.png

完成

arrow
arrow
    全站熱搜

    ben88168 發表在 痞客邦 留言(2) 人氣()