Server - Installation

 Operating System

The currently supported operating systems for YarraServer are Ubuntu 16.04 LTS 64bit and Ubuntu 18.04 LTS 64bit, which can be downloaded here (using older Ubuntu versions is not recommended). It is possible to use both, the Server Edition as well as the Desktop Edition. It might be easier for users less familiar with Linux to use the Desktop edition because it comes with many helpful tools such as graphical editors. The Server edition, on the other hand, comes with less preinstalled unneeded programs.

Linux Installation

The initial installation of the server should be done by a person with knowledge of the Linux operating system.

 

 General Server Installation

Install Ubuntu 16.04 or 18.04 using default installation options. After the installation has been finished and Ubuntu shows the graphical user interface, open a terminal shell (e.g., by typing “terminal” into the Ubuntu launcher). If you installed the Server Edition, log into the terminal screen that shows at the end of the boot process.

Install the following additional packages (sendmail is only required if the server should send notifications about the task status, which, however, is recommended):

sudo apt-get update
sudo apt-get install openssh-server
sudo apt-get install dcmtk
sudo apt-get install sendmail
sudo sendmailconfig
sudo apt-get install unzip
sudo apt-get install qt5-default

Add the user “yarra” for access from the Yarra clients, and the user “yarraserver” to run the YarraServer software. Both users should be added to the user group “yarra”. By setting the shell to “/bin/false” for the user yarra, it is prevented that users can open a shell login on the server (note that the password for user yarra can be seen in the configuration file of the Yarra client). Therefore, the user yarra must have access only to the Yarra queue share. The users yarra and yarraserver must never have the same password! It is not recommended to run the YarraServer software with root rights.

sudo groupadd yarra
sudo adduser --ingroup yarra --shell /bin/false yarra
sudo adduser --ingroup yarra yarraserver
 

 Installation of the YarraServer package

Login with the account yarraserver and create the subfolder in the home directory, e.g. ~/yarra. It is recommended to set the permission of the folder to 750, so that only the user yarraserver and users of the group yarra can access the folder. Depending on the configuration/installation of your server, it can be advantageous to install the software at a different location (e.g., if the disk drives have been partitioned with only limited space for the home directories). In the following, it is assumed that the installation location is /home/yarraserver/yarra.

ssh yarraserver@localhost
mkdir yarra
chmod 750 yarra

Download and extract the YarraServer installation zip file into this folder:

cd yarra
unzip yarraserver_xx.zip

In most cases, the files will be extracted with correct file permissions. The folder ~/yarra should now look like this:

drwxr-xr-x 9 yarraserver yarra   4096 Oct 10 08:58 ./
drwxr-xr-x 3 yarraserver yarra   4096 Oct 10 08:22 ../
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 08:24 fail/
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 08:24 finished/
drwxr----- 2 yarraserver yarra   4096 Oct 10 08:25 install/
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 08:25 log/
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 08:25 modes/
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 09:02 modules/
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 09:02 modules_user/
drwxrwx--T 2 yarraserver yarra   4096 Oct 10 09:00 queue/
-rwxr----- 1 yarraserver yarra  69184 Oct 10 08:24 ServerCtrl*
drwxr-x--- 2 yarraserver yarra   4096 Oct 10 08:24 work/
-rwxr----- 1 yarraserver yarra 283617 Oct 10 08:24 YarraServer*
-rw-r----- 1 yarraserver yarra   2615 Oct 10 08:42 YarraServer.ini
-rw-r----- 1 yarraserver yarra   2615 Oct 10 08:42 YarraServer.ymf

If the file and directory permission are equivalent to the settings shown above (except for the T in the permissions of queue/), no changes need to be made. Otherwise, the following command can be used to obtain a working configuration, which will set the permissions for all extracted files to 750:

chmod 750 *

Next, set special permissions for the “queue” directory:

chmod 1770 queue

In addition, lock the write permissions for the files “queue/YarraModes.cfg” and “queue/YarraServer.cfg”, so that clients under no circumstances can delete this file:

chmod 440 queue/YarraModes.cfg
chmod 440 queue/YarraServer.cfg

Logout of the ssh session, which brings you back to the user shell of the administrator account:

exit
 

 Installation and Configuration of Samba

Yarra clients connect to the server using a SMB network share. To provide the share, install the Samba package with:

sudo apt-get update
sudo apt-get install samba

Set the Samba password for the user yarra. This should be the same password that was used when creating the user:

sudo smbpasswd -a yarra

Edit the file /etc/samba/smb.conf. This can be done using the nano command (when the desktop edition of Ubuntu has been installed, this can also be conveniently done using the editor gedit):

sudo nano /etc/samba/smb.conf

Add the following section to the end of the file:

[YarraServer]
path = /home/yarraserver/yarra/queue
available = yes
valid users = yarra
read only = no
browseable = no
public = no
writable = yes
create mask = 0770
directory mask = 0400
force user = yarraserver
force group = yarra

In addition, change the following setting in the file:

############ Misc ############
usershare allow guests = no

Save and close the file. Then restart the samba server.

sudo systemctl restart smbd
 

 Test Client Connectivity

It should now be possible to access the Samba share of the server from any Windows client in your network. To test this, open a command shell at a Windows client in your network and type the following command:

net use Y: \\[server IP]\YarraServer [pwd of yarra] /USER:yarra /yes

where [server IP] is the IP address of the server and [pwd of yarra] is the selected password of the user yarra. If the return value is “The command completed successfully.” then the server connection could be established. You should see now a network drive Y:\, containing the files YarraServer.cfg and YarraModes.cfg.

It is recommended to reboot the server when these steps have been finished. Afterwards, continue to configure the YarraServer, which is described in the next section.

Server Security

Note that additional configuration steps might be needed to properly securing your server. The steps described here are the minimum required procedures to bring the server into operation, but it is not said that these steps sufficiently secure the server. Please review the server configuration with your local IT department and review related documentation.

 

 Manual Installation of Qt5

YarraServer requires the Qt5 runtime libraries. Newer Ubuntu versions (such as 16.04 and 18.04) come with Qt5 packages that can be used. However, if trying to run YarraServer on older Ubuntu versions or other Linux distributions, it might be necessary to install the libraries manually. The steps below describe how Qt5 can be installed using the official installer from the Qt developers.

The following steps are normally not needed when using Ubuntu 16.04 or 18.04.

The easiest way is to open a graphical shell (terminal) and login as the user yarraserver:

ssh -X yarraserver@localhost

Download and install Qt5 (for user yarraserver) using the following commands (you may want to use a newer version than 5.2):

wget http://download.qt.io/archive/qt/5.2/5.2.1/qt-opensource-linux-x64-5.2.1.run
chmod 700 qt-opensource-linux-x64-5.2.1.run
./qt-opensource-linux-x64-5.2.1.run

Ubuntu Server Edition

Because the Qt installation is done with a graphical installer, it is necessary to first install the X11 Window System when using the Server Edition. This can be done with the command:
sudo apt-get install xorg

Go through the graphical installer and use all default options (there is no need to change anything). If you are connected to your server via an ssh connection, you may see the following error message:

qt-opensource-linux-x64-5.2.1.run: cannot connect to X server

In this case, you have to install a local X server application for your client computer (e.g. Xming for Windows or XQuartz for macOS) and restart your ssh session (with the -X option, as listed above).

After the installation, edit the file .bashrc in the home directory of user yarraserver using the following command:

gedit .bashrc

or, in case of a non-graphical ssh connection, using:

nano .bashrc

and add the following line at the end of the file:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/yarraserver/Qt5.2.1/5.2.1/gcc_64/lib