Support Center

Your questions answered

Knowledge Base

Searching in: Documents
Filter the search results
Version:
Last update:
Searching in: Documents
ID: DT07M00092
Version: NX 5
Added on: 2015-07-07
Last update: 2016-02-15
Instructions for upgrading the NX 3.5.0 production environment to NoMachine

Pre-requisite is to download and use the server packages labeled as 'PRODUCTION VERSION' from your Customer Area.

The production version will install libraries necessary to support H.264 encoding. Only one production package per license can be downloaded, due to the corresponding MPEGLA royalties fee. All next updates or upgrades will have to be one with the package labeled as 'UPDATE VERSION'.

Please read carefully all the steps below before proceeding with the upgrade.

Index

Click on any of the following links to reach the appropriate section:

Provide the list of available desktops to users

PREMISES
1.Compatibility with licenses 3.5.0 and NoMachine 5
2. Planning a server downtime period
3. Preserving 3.5.0 configurations
4. Preserving the DBs
UPGRADE INSTRUCTIONS
5. Upgrading NX Server
6. Upgrading a multi-node environment
FURTHER CONFIGURATIONS
7. Provide the list of available desktops to users
8. Multi-node: configuring the server to not start sessions on localhost
9. Multi-node: adding a new node

 

1.1. Compatibility with licenses 3.5.0 and NoMachine 5

Server and Node v. 5 are compatible with node.lic and server.lic 3.5.0. Create a backup copy of these licenses before performing the upgrade or retreive them from your Customer Area if necessary. When the upgrade is completed, verify that licenses 3.5.0 are still in place:

$ /usr/NX/bin/nxserver --version
$ /usr/NX/bin/nxnode --version

Licenses 3.5.0 are mapped to the correspondent product version 4 or later. So, for example, if you had a NX Advanced Server, you will then have a NoMachine Enterprise Server.

If you have a multi-node environment, it's necessary that the node license is in place on each node:

$ sudo /usr/NX/bin/nxnode --version

 

2. Planning a server downtime period

Upgrading the installed software requires the termination of all the running sessions. These sessions cannot be recovered later.

This is necessary for installing the new libraries and binaries. Processes already loaded in the system memory lock down the corresponding binaries and
libraries that cannot be otherwise replaced.

The upgrade procedure implies a shutdown of the server. As a precaution, we suggest to:

a) Send a broadcast message to all connected users informing about ongoing operations:

$ sudo /usr/NX/bin/nxserver --broadcast "Your message here"

b) Shutdown NX Server 3.5.0

$ sudo /usr/NX/bin/nxserver --shutdown


Note:

If you have a multi-node environment, you need to upgrade each remote node with the proper package (Production Version). This doesn't require stopping the node before proceeding.

 

3. Preserving 3.5.0 configurations

Large environments often adopt specific configurations that are different from the default ones. The upgrade procedure preserves automatically the original configurations: it creates a backup of the original configuration files (/usr/NX/etc/server.cfg.backup and /usr/NX/etc/node.cfg.backup) and reports their settings into the new configuration files.

Additionally the procedure:

- Removes obsolete keys not used in version 5, e.g. MountShareProtocol in node.cfg.

- Renames 3.5.0 keys to be compliant with the new key name used in version 5 (e.g. 'SessionLimit' in server.cfg becomes 'ConnectionsLimits').

- Adds new configuration keys if any.

 

Note:

Since version 4, load-balancing, users' profiles and automatic generation of guests accounts are managed via profile rules. The related server configuration keys used in version 3.5.0 are no longer available.

Please consult also the 'NoMachine Enterprise Products - Server Guide - Advanced Functions':

https://www.nomachine.com/DT07M00091

 

4. Preserving the DBs

 

All these 3.5.0 DBs are automatically preserved during the upgrade procedure:

- /usr/NX/etc/administrators.db
- /usr/NX/etc/guests.db
- /usr/NX/etc/passwords.db
- /usr/NX/etc/profiles.db
- /usr/NX/etc/nodes.db

 

Notes:

a)The users db (/usr/NX/etc/users.db) is recreated, and a copy of the original db is made: /usr/NX/etc/users.db.backup. This db is automatically populated when the user starts the session. Restoring the original content of users.db is therefore not necessary.

b)The use of the administrators.db has been re-introduced in NoMachine v. 5 and allow to enable NoMachine aministrators for node management via the GUI. See:

https://www.nomachine.com/DT07M00091#18

c) The /usr/NX/etc/nodes.db is preserved since version 4.3.30, previous NoMachine versions required to re-add each remote node manually.

d) Two new dbs have been introduced with NoMachine v. 4:

- /usr/NX/etc/hosts.db to store client redirection directives

- /usr/NX/etc/groups.db to store information about users' groups

 


UPGRADE INSTRUCTIONS

 

5. Upgrading NX Server

a) Shutdown NX Server 3.5.0 (See also par. 2. Planning server downtime period)

$ sudo /usr/NX/bin/nxserver --shutdown

b) Upgrade the installation using the NoMachine package labeled 'PRODUCTION VERSION'.

For DEB installations:

$ sudo dpkg -i <packageName>

For RPM installations:

$ sudo rpm -Uvh <packageName>

If you don't have 'sudo' installedd, run the commands as root user and without sudo. For more detailed instructions, you may refer to the installation guies available here: https://www.nomachine.com/all-documents

c) Verify your installation:

$ /etc/NX/nxserver --version

$ sudo  /etc/NX/nxserver --status

$ sudo /etc/NX/nxserver --subscription

 

6. Upgrading a multi-node environment

a) Shutdown NX Server 3.5.0 (See also par. 2. Planning server downtime period)

$ sudo /usr/NX/bin/nxserver --shutdown

b) Upgrade each remote node.

c) Finally upgrade the server installation.

Note:

If for some reasons you have upgraded the server installation before the remote nodes, you have to run the following command on the server:

$ sudo /usr/NX/bin/nxserver --nodedbupdate

 


FURTHER CONFIGURATIONS

 

7. Provide the list of available desktops to users

Since version 4, NoMachine presents to the user the default desktop environment of the server host unless you configure it otherwise. Please refer to: https://www.nomachine.com/AR04K00667 for some examples.

To provide users with the list of all the available desktop types on that host (e.g. GNOME, KDE, etc...) as it was with NX Server 3.5.0:

a) Edit the /usr/NX/etc/server.cfg file.

b) Uncomment the ConnectPolicy key and set option 'desktop=1'.

The list of available desktops shown to users is ruled by values specified in the AvailableSessionTypes key set in the server and node configurations.

These keys are populated automatically by the upgrade procedure according to what is available on the system. For example, for being able to run an RDP virtual desktop, it's necessary that the rdpclient is installed on the node host. If it's present, the procedure will add 'windows' to the list AvailableSessionTypes key.

More about running RDP sessions with NoMachine 4 or later is available here: https://www.nomachine.com/AR07J00645

 

Virtual desktop
session types

Description Where to set the command
to start the virtual desktop
unix-xsession-default un the default virtual desktop as set on the system DefaultDesktopCommand in node.cfg
unix-gnome run a virtual GNOME desktop CommandStartGnome in node.cfg
unix-kde run a virtual KDE desktop CommandStartKDE in node.cfg
windows run a RDP session encapsulated into a virtual desktop session CommandStartRDP in node.cfg
vnc un a VNC session encapsulated into a virtual desktop session CommandStartRFB in node.cfg
unix-xdm run a virtual desktop through the X Desktop Manager Set XDM query type in the server.cfg file
EnableIndirectXdmQuery
EnableDirectXdmQuery
EnableBroadcastXdmQuery
unix-console
Run a virtual Unix console application. It can be embedded into the player session window or be a floating window console depending on the user's choice: run or not the command in a virtual desktop
unix-default
Run a virtual session by using the default X client script on server
unix-application
Run a virtual custom application. It can be embedded into the player session window or be a floating window application depending on the user's choice: run or not the command in a virtual desktop
physical-desktop
Connect to a remote desktop session
unix-remote
Connect to the physical desktop of a Foreign node

 

8. Multi-node: configuring the server to not start sessions on localhost

Starting from version 4, localhost is added by default to the list of the available nodes as you can see from the output of the nodelist command:

$ sudo /usr/NX/bin/nxserver --nodelist
NX> 104 Node list:
Status Connection Node Type LB Weight Limit Label
------- ---------- ------------ ---- --- ------ ----- -----
running encrypted localhost:22 NX yes


If you don't want to allow connections on the server host machine, remove this node from the nodes db:

$ sudo /usr/NX/bin/nxserver --nodedel localhost:22

 

9. Multi-node: adding a new node

The manual command, to be executed on the server host, to add a new remote nodes is:

$ sudo /usr/NX/bin/nxserver --nodeadd NODEIP

When running this command, the server connects to the node for retrieving the list of all resources available on that host. The server tries to authenticate as the nx user by using the server DSA key. If this fails, it will request username and password for login as a privileged user on the node. Depending on the system configuration, 'sudo' password can be requested too.

 

For example:

# /usr/NX/bin/nxserver --nodeadd 192.168.2.33
NX> 769 The authenticity of host '192.168.2.33' can't be established.
NX> 769 The certificate fingerprint is:
NX> 769 '11:2F:8F:D8:E4:FA:6C:CF:0E:C4:D3:50:B0:D6:5A:F7:34:A4:E5:E3'
NX> 769 Are you sure you want to continue connecting? [yes|no]: yes
NX> 763 Could not authenticate on the remote node using servers public key.
NX> 763 Would you like to login on remote node as a privileged user to add
NX> 763 this key and try again? [yes|no]: yes
NX> 765 Username: nomachine
NX> 766 Password:
NX> 761 Sudo password:
NX> 104 Connected to NX Node.


When adding the remote node, it's also possible to specify the connection protocol and port to be used between server and node.
For example:

$ sudo /usr/NX/bin/nxserver --nodeadd 192.168.2.250 --protocol SSH --port 2222


Reference:

Add the Node to the Server

https://www.nomachine.com/DT07M00091#9.1.