+7 902 589 0933
info@trustservice.tech

Installing TrustServer in Ubuntu 16.04

Installing TrustServer in Ubuntu 16.04

This article will cover the typical installation and initial configuration of the TrustViewerPro – TrustServer server administrator account.
We will install TrustServer on a” clean ” Ubuntu 16.04 LTS.
First, you need to download the distribution of the TrustViewerPro software package, which contains the necessary TrustServer files:

wget http://pro.trustviewer.com/file/TrustViewerPro-ru.7z

The distribution of the software package is in the 7z archive, so we need the command-line port of the 7-Zip archiver: p7zip.
Install it:

sudo apt-get update
sudo apt-get install p7zip

After installing the archiver unpack the downloaded archive:

sudo p7zip -d TrustViewerPro-ru.7z

Next, you need to create a directory where we put the TrustServer executable. In our example, this will be the directory /srv/trustserver
Let’s create it:

sudo mkdir /srv/trustserver

Copy the TrustServer executable file to the created directory: TrustServer (for the 32-bit version of the operating system) or TrustServer64 (for the 64-bit version of the operating system):

sudo cp TrustViewerPro-ru/Server/Linux/TrustServer /srv/trustserver/

and mark it as Executable:

sudo chmod u+x /srv/trustserver/TrustServer

Now create the TrustServer startup script file:

sudo nano /etc/init.d/trustserver

and add the following code to it (hover over to display the entire code):

#!/bin/bash
# chkconfig: - 98 02
### BEGIN INIT INFO
# Provides: TrustServer
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Should-Start: $syslog $named
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TrustServer
# Description: TrustServer Coordinate Server
### END INIT INFO

EXECUTABLE="/srv/trustserver/TrustServer"
PORT="8443"
DATA="/srv/trustserver/"
LOG="/var/log"
PASS="123456"

PATH=$PATH:/usr/sbin:/usr/bin:sbin:/bin:

. /lib/lsb/init-functions

if [ ! -f $EXECUTABLE ]; then
	echo "Check variables in init daemon"
	exit 1
fi

do_start () {
$EXECUTABLE start -port $PORT -data $DATA -log $LOG -pass $PASS 
}

do_stop () {
$EXECUTABLE stop
}

case "$1" in
	start)
		do_start
	;;
	stop)
		do_stop
	;;
	restart)
		do_stop
		do_start
	;;
	*)
		echo "Usage: $0 start|stop|restart">&2
	exit 0
	;;
еsac

or you can download the finished script file specified in the example and copy it to /etc/init.d/:

wget https://trustservice.tech/download/trustserver
sudo cp trustserver /etc/init.d/

In the script file, pay attention to the lines that need to be corrected if necessary:
EXECUTABLE=”/srv/trustserver/TrustServer” – specify the path to the TrustServer executable file, and do not forget that the case in the path must match the case in the name of the directories and file.
PORT=”8443″ – specify the port on which the TrustServer console will be available. You can specify any non-reserved port at your discretion.
DATA=”/srv/trustserver/” – the path where the work files created by TrustServer will be located.
LOG=”/var/log” – the path where the TrustServer logs will be stored.
PASS=”123456″ – password for the temporary root account of the TrustServer console for the first login. This password and root account are blocked after the first server initialization and in the future it will not be possible to log in with this data.

Mark the created script file as “Executable” and add the created script to autoload:

sudo chmod u+x /etc/init.d/trustserver
sudo systemctl enable trustserver

Now we need to allow the firewall access to the server console on port 8443, which we registered in the script. In our system there is ufw. Let’s open port 8443 for it:

sudo ufw allow 8443

You can check the firewall rules to make sure the correct port is allowed:

sudo ufw status verbose

Run TrustServer:

sudo service trustserver start

If everything was done correctly, then we will not see any error messages. Also, to make sure the launch is successful, we can check the status of the service:

sudo systemctl status trustserver

The next step is to create a TrustServer administrator account. To do this, open the TrustServer management console in the browser at
http://your-domain:8443/admin, where “your-domain” is the name or ip address of the host where TrustServer is installed.
In the console page that opens, in the “Username” field, enter “root”, in the “Password” field the temporary password that was prescribed in the trustserver script, in our case “123456” and click on the “Login” button

After successfully logging into the TrustServer management console, go to the “Users” tab, click the “Add” button and create a TrustServer administrator account with maximum permissions.
To do this, fill in the fields:
Username (English only)
Display name
Full name
Password.
In the field “Authorization” be sure to set the rights “Super admin”

Save the account with the “Save” button and exit the console by clicking the “Logout” link in the upper-right corner.
Attention! After creating the server administrator account, the temporary account with the username “root” is blocked and subsequent authorizations must be performed with the new account.

This completes the installation of the TrustServer server. Further configuration of TrustServer takes place directly in the management console under an account with super administrator rights.

Discuss article on the forum

Full or partial copying and publication of materials is permitted with the obligatory reference to this article.

Leave a Reply

Your email address will not be published. Required fields are marked *