Issue
- Install ESET PROTECT Server on Linux and connect it to your MS SQL database installed on a Windows Server
Solution
Prerequisites
- Microsoft SQL Server installed on a Windows machine.
- Configure MS SQL Server
- Install ESET PROTECT Server on Linux and connect it to MS SQL Server database installed on Windows
- Configure MS SQL Server
I. Configure MS SQL Server
-
Allow TCP/IP connections to the SQL database on port 1433, as described here.
-
Create a database and database user that you will use to access the database.
II. Install ESET PROTECT Server on Linux and connect it to MS SQL Server database installed on Windows
- Open the Terminal as root and run the code below (line by line) to install the Microsoft ODBC driver for Linux:
Ubuntu 20.04:
apt install curl curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list apt-get update ACCEPT_EULA=Y apt-get install msodbcsql17
Red Hat Enterprise Linux 7/CentOS 7:
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo yum remove unixODBC-utf16 unixODBC-utf16-devel ACCEPT_EULA=Y yum install msodbcsql17
- Before installing ESET PROTECT Server on Linux, make sure the system meets all other prerequisites (except the ODBC driver).
- Download the ESET PROTECT Server installation file from the ESET website.
- Open the Terminal as root, navigate to the folder where you saved the ESET PROTECT Server installer and make the file executable:
chmod +x server-linux-x86_64.sh
- Run the ESET PROTECT Server installer with proper parameters (see example code below).
sudo ./server-linux-x86_64.sh \
--skip-license \
--db-type="MS SQL Server" \
--db-driver="ODBC Driver 17 for SQL Server" \
--db-hostname=10.20.30.40 \
--db-port=1433 \
--db-admin-username=user \
--db-admin-password=pAssword1 \
--server-root-password=pAssword1 \
--db-user-username=user \
--db-user-password=pAssword1 \
--cert-hostname="10.20.30.50;ubuntu1"
If the installation stops with an error Unknown database driver or data source name you may need to install a different version of MS ODBC driver.
- After the successful installation, the ESET PROTECT Server installed on Linux is connected to SQL Server database installed on Windows.
- You can continue with other ESET PROTECT installation components: Web Console and ESET Management Agent.
III. Enable encrypted connection to MS SQL database (optional)
To improve security, enable an encrypted connection between the ESET PROTECT Server and the SQL database.
Perform the steps below on the ESET PROTECT Server Linux machine:
- Open the terminal as
root
.
- Stop the
eraserver
service:
service eraserver stop
- Open the
StartupConfiguration.ini
file:
nano /etc/opt/eset/RemoteAdministrator/Server/StartupConfiguration.ini
- Add the following code to the end of the file:
Below is an example of theEncrypt=yes;TrustServerCertificate=yes;
StartupConfiguration.ini
file (replace the parts highlighted in yellow with your values):DatabaseType=MSSQLOdbc
DatabaseConnectionString=Driver=ODBC Driver 17 for SQL Server;Server=10.20.30.40,1433;Uid=era_user;Pwd={SecretPassword};CharSet=utf8;Database=era_db;Encrypt=yes;TrustServerCertificate=yes;
- Save the updated file.
- Start the
eraserver
service:
service eraserver start
- If you are able to log in to the ESET PROTECT Web Console, the encrypted connection to the database works properly. If you are not able to log in to the ESET PROTECT Web Console, revert your changes to the StartupConfiguration.ini file.