Tariscope installation on Linux
The Tariscope 4.6.x system of both Enterprise and Provider editions is created on the basis of the .Net 5.0 software platform and Microsoft SQL Server. Therefore, the choice of Linux distributions for Tariscope depends on support for these two components.
Tariscope supports work with any edition of Microsoft SQL Server 2022 or 2019 or 2017. According to Microsoft's documentation, SQL Server 2022 or 2019 can be installed on:
- Red Hat 7.7 - 7.9 for SQL Server 2019 or 8.0 - 8.6 for SQL Server 2022 and 2019.
- SUSE 12 (SP3 - SP5) for SQL Server 2019 or 15 (SP1 -SP3) for SQL Server 2022 and 2019.
- Ubuntu 16.04, 18.04 for SQL Server 2019 or 20.04 for SQL Server 2022 and 2019.
The system requirements for a Linux installation are the same for both versions of MS SQL Server:
- RAM: 2 ГБ;
- File system: XFS or EXT4;
- Disk space: 6 ГБ;
- Processor frequency: 2 ГГц;
- Processor type: compatible with x64.
Tariscope requires .Net 5.0 to work, so if Tariscope is installed only by itself without Microsoft SQL Server, and Microsoft SQL Server will be installed somewhere on another server, then the .Net 5.0 platform can be installed on the following Linux distributions:
- Alpine,
- CentOS,
- Debian,
- Fedora,
- openSUSE,
- SLES,
- Snap-packets,
- Ubuntu.
If Tariscope is installed on the physical (virtual) server together with Microsoft SQL server, then Ubuntu and SUSE are suitable Linux distributions.
We tested Tariscope on Ubuntu 20.04.
The order of installation of Microsoft SQL Server, the .Net 5.0 platform and the required software applications required can be arbitrary.
1. Microsoft SQL Server 2022 installation
Installation of this SQL server should be done according to the instructions given in the article.
2. .Net 5.0 installation
Installation must be done with rights of root. Therefore, you should specify 'sudo' before each command, or to avoid specifying it every time, you can execute the command:
sudo -i
.Net 5.0 can be installed in one of the options:
- .Net Runtime.
- .Net SDK, it includes .Net Runtime.
To check which .Net Frameworks are already installed on the system, enter:
dotnet --list-runtimes
dotnet --list-sdks
There are different options for installing .Net 5.0. For instructions on how to install the .Net Runtime, see the Microsoft article.
Microsoft instructions for installing the .Net SDK or .Net Runtime using Snap.
For example, according to these recommendations, to install the .Net SDK version 5.0, you would run the following command:
sudo snap install dotnet-sdk --classic --channel=5.0
Next, it is recommended to register an alias for dotnet-sdk.dotnet in the system:
sudo snap alias dotnet-sdk.dotnet dotnet
If you installed .Net 5.0 using Snap, you should make a symlink:
ln -s /snap/bin/dotnet /usr/bin/dotnet
3. Installing additional applications
For Tariscope to work, you need to install the following applications:
- cpuid,
- inxi,
- libgdiplus,
- wkhtmltopdf.
To install them, execute the following commands:
apt-get install cpuid
apt-get install inxi
apt-get install libgdiplus
apt-get install wkhtmltopdf
4. Installing and running Tariscope
Download the Tariscope installation and two scripts:
http://softpiua.com/files/ts-install.sh
Unpack the tariscope46.tar.gz archive, for example, into the Tariscope folder, having previously created it.
Move the ts-install.sh script to this folder.
Let's say you are a user named softpi. You need to go to the Tariscope folder using the command:
cd /home/softpi/Tariscope
and execute the following command:
sh ts-install.sh -p /home/softpi/Tariscope
The '-p' switch specifies the folder where Tariscope is installed.
Connecting the Tariscope database to the Microsoft SQL server
Microsoft SQL Server is required to run the Tariscope database. Therefore, it should be installed there. If the Tariscope installation package was installed in the Tariscope folder, the backup copy of the Tariscope database will be in the folder
…/Tariscope/www/Database/Database
The Tariscope backup file has the name: Tariscope_clear.bak
In order to install the Tariscope database from a backup on an MS SQL Server, you need to either connect to this SQL Server from a Windows computer with SQL Server Management Studio (SSMS) installed on it, or install command line tools on Linux for working with MS SQL Server.
How to install command line tools for working with MS SQL Server can be found in the Microsoft article.
Next, connect to the SQL server by executing the command:
sqlcmd -s localhost -U SA -P Tariscope123
This command means that a connection is made to the local SQL Server (localhost). The connection is performed on behalf of the system administrator (sa). Password to the SQL server is Tariscope123. You must specify the password that was specified during the installation of Microsoft SQL Server.
When connecting to the SQL server, a symbol will appear in the terminal: '>', which means that you can enter SQL commands. To execute an SQL command, you must enter the GO command. To check the operation, you can issue a command to get the names of the databases that are on the SQL server:
1>select name from sysdatabases
2>go
And you should get the answer:
master
tempdb
model
msdb
After that, type quit to exit SQL Server management mode.
How to install a database from a backup copy can be read, for example, in the article.
That is, with root rights, you should go to the /var/opt/mssql folder by executing the command:
cd /var/opt/mssql/
Next, create a new backup folder:
mkdir backup
Move the backup file to the created folder:
mv /home/softpi/Tariscope/www/Database/Database/Tariscope_clear.bak /var/opt/mssql/backup
In your case, instead of the /softpi/Tariscope/ folder, there may be others, depending on the ones you created in the previous steps.
Connect to SQL Server again using the above command.
To restore the Tariscope database from a backup, execute the command:
RESTORE DATABASE Tariscope FROM DISK=’/var/opt/mssql/backup/Tariscope_clear.bak’
WITH MOVE ‘Tariscope’ TO ‘/var/opt/mssql/data/Tariscope.mdf’
MOVE “Tariscope_log’ TO ‘/var/opt/mssql/data/Tariscope_log.ldf’
GO
Installation of the Tariscope database will be performed. You can make sure that it is installed, for example, by executing the command that was already given above:
select name from sysdatabases
The Tariscope database should be added to the database list.
Exit SQL Server management mode.
Move the rrun.sh script to the www folder, which is in the Tariscope folder. Navigate to this folder:
cd /home/softpi/Tariscope/www
Locate the appsettings.json file. Open it for editing. An example of this file is shown in the figure below.
Figure
In the connection string (DefaultConnection) after Data Source, specify the IP address of the server where Microsoft SQL Server was installed. In the example in Figure 1.2.1, this is the IP address: 10.10.0.133. In the same line, the system administrator, "sa", with the password "Tariscope123" is specified as the user from whom the Tariscope system works. Instead of the "sa" user, you can use any other user who has all the rights (owner) to the Tariscope database.
Tariscope works on the Kestrel server. By default, this server keeps a log of requests to it. This is reflected in the line:
“KestrelLogger”: true
Change true to false to disable this logging. We recommend keeping this log.
The line "KestrelLoggerPeriod": 1 defines the period for creating a new Kestrel log: 0 - daily, 1 - weekly, 2 - monthly. Change the period for creating the log if necessary.
The IP port on which Tariscope will work is specified in the line:
"Http": "8085"
That is, IP port of 8085 will be used by default. Change it if necessary.
If you want Tariscope to work over HTTPS, you must have an SSL certificate and set its parameters in this file.
In the line "SSLCertificate": "" specify the path where the file of this certificate is located.
In the line "SSLPassword": "" enter the password for this certificate.
Specify the IP port for working over HTTPS in the line: "Https": ""
To enable HTTPS, change false to true in the line:
"HttpsEnabled": false
If you want to redirect all requests made in Tariscope via HTTP to HTTPS port, change the value false to true in the line:
"HttpsRedirect": false
Save the settings for this file.
Run Tariscope:
sh rrun.sh
You can check whether the Tariscope system is running using the command:
systemctl status TS.MAIN.service
If the system is up and running, you will receive a response like the following:
TS.MAIN.service - Tariscope daemon
Loaded: loaded (/etc/systemd/system/TS.MAIN.service; disabled; vendor pres>
Active: active (running) since Sat 2022-12-24 23:14:32 EET; 3min 8s ago
Main PID: 35886 (dotnet)
Tasks: 0 (limit: 4648)
Memory: 732.0K
CGroup: /system.slice/TS.MAIN.service
‣ 35886 /snap/dotnet-sdk/167/dotnet /home/softpi/Tariscope/www/Sof>
After that, in the browser, you can connect to the Tariscope system and start configuring it according to the document "Tariscope 4.6. Administrator's Guide".