Categories
Articles SQL

Ubuntu 24.04 — Plesk & MSSQL 2025 Installation & Configuration Guide

 

The complete installation and configuration of Plesk and Microsoft SQL Server 2025 Preview on an Ubuntu 24.04 server.

🖥️ Ubuntu 24.04 LTS
🗄️ MSSQL 2025 Preview (17.0.1000.7)
🌐 Plesk Obsidian
🕐 Timezone: Europe/Istanbul (UTC+3)
🖧 gallant-gates.88-248-3-49.plesk.page

1

System Preparation

1.1 System Update

Before starting any installation, ensure the system is fully up to date:

sudo apt update && sudo apt upgrade -y

1.2 Timezone Configuration

Set the server timezone to Turkey (Europe/Istanbul):

sudo timedatectl set-timezone Europe/Istanbul
timedatectl status

Expected output:

Time zone: Europe/Istanbul (+03, +0300)

1.3 Required Packages

sudo apt install -y curl wget gnupg2 software-properties-common apt-transport-https

2

Plesk Installation

2.1 Downloading the Plesk Installer

⚠️

Using the direct sh <(curl ...) method on Ubuntu 24.04 causes a sh: 0: cannot open /dev/fd/63 error. Download the installer to disk first instead.

Download the installer to /tmp, then execute it:

curl -o /tmp/plesk-installer https://autoinstall.plesk.com/plesk-installer
chmod +x /tmp/plesk-installer
sudo /tmp/plesk-installer

2.2 Installation Options

Select Plesk Obsidian from the interactive installer menu. Installation time varies between 10–30 minutes depending on server speed.

2.3 First Login

Once installation is complete, access the panel via browser:

https://<server-ip>:8443
ℹ️

You will be prompted to create an administrator password on first login. Choose a strong password.

2.4 Plesk License

After installation, Plesk runs with a 14-day trial license. License information can be found at Tools & Settings → License Management.

License TypeDurationNotes
Trial14 daysAll features active
Web Admin EditionPaid / AnnualLimited domains
Web Pro EditionPaid / AnnualMid-scale hosting
Web Host EditionPaid / AnnualUnlimited domains
⚠️

The trial period cannot be extended. A license must be purchased before it expires. Visit: plesk.com/pricing

3

MSSQL 2025 Preview Installation

3.1 Add Microsoft GPG Key and Repository

# Add the GPG key
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | \
  sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

# Add the SQL Server 2025 Preview repository
curl -fsSL https://packages.microsoft.com/config/ubuntu/24.04/mssql-server-preview.list | \
  sudo tee /etc/apt/sources.list.d/mssql-server-preview.list

sudo apt update

3.2 Install SQL Server

sudo apt install -y mssql-server

3.3 Initial Configuration

sudo /opt/mssql/bin/mssql-conf setup

During the setup wizard:

StepSelection
Edition selectionInitially shows Enterprise Evaluation (can be changed later)
SA passwordSet a strong password (uppercase + lowercase + numbers + special characters)
License acceptanceYes

3.4 Start the Service and Verify

sudo systemctl start mssql-server
sudo systemctl enable mssql-server
sudo systemctl status mssql-server

If the output shows Active: active (running), the installation was successful.

3.5 Install sqlcmd Tools

# Add the sqlcmd repository
curl -fsSL https://packages.microsoft.com/config/ubuntu/24.04/prod.list | \
  sudo tee /etc/apt/sources.list.d/mssql-tools18.list

sudo apt update
sudo apt install -y mssql-tools18 unixodbc-dev

# Add to PATH
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
source ~/.bashrc

3.6 Connection Test

sqlcmd -S localhost -U SA -P '<your-SA-password>' -C -Q "SELECT @@VERSION"

4

Changing MSSQL Edition — Developer Edition

ℹ️

The initial installation defaults to Enterprise Evaluation Edition (180-day trial). For development environments, switching to Developer Edition is recommended — it is free, includes all Enterprise features, but cannot be used in production.

4.1 Stop the Service

sudo systemctl stop mssql-server
sudo systemctl status mssql-server
# Should show: Active: inactive (dead)

4.2 Change the Edition

In SQL Server 2025, edition changes are made using the set-edition command:

sudo /opt/mssql/bin/mssql-conf set-edition

Select Developer from the menu that appears and confirm.

4.3 Restart the Service

sudo systemctl start mssql-server
sudo systemctl status mssql-server

4.4 Verify the Edition Change

sqlcmd -S localhost -U SA -P '<your-SA-password>' -C -Q \
  "SELECT Edition, ProductVersion, GETDATE() AS SqlServerTime FROM sys.dm_os_sys_info CROSS JOIN (SELECT SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('ProductVersion') AS ProductVersion) AS props"

Successful output:

Edition ProductVersion SqlServerTime
———————————— ————— ———————–
Standard Developer Edition (64-bit) 17.0.1000.7 2026-08-19 14:47:47.600

Standard Developer Edition (64-bit) — Edition change completed successfully.

5

Plesk License Information

5.1 License Screen

Additional license keys are managed under Tools & Settings → License Management → Additional License Keys. This screen is empty on the trial version.

5.2 License Renewal / Purchase

MethodDescription
From Plesk PanelTools & Settings → License Management → Buy License
Plesk WebsitePurchase at plesk.com/pricing, then enter the key in the panel
Hosting ProviderSome providers bundle a Plesk license with the server package
⚠️

When the trial license expires, the panel enters restricted mode — no new domains or databases can be added. Existing sites continue to work.

6

Plesk & MSSQL Co-existence Architecture

🚫

Important Limitation: Plesk for Linux cannot add or manage MSSQL Server from its Database Servers screen. Only MariaDB / MySQL / PostgreSQL appear there. MSSQL runs as a completely independent service alongside Plesk.

6.1 Current Architecture

ComponentPortManagement Interface
Plesk Panel8443 (HTTPS)Web browser
MariaDB (Plesk)3306Plesk → Database Servers
MSSQL 20251433sqlcmd / SSMS / Azure Data Studio

6.2 Connecting to MSSQL Remotely

Open port 1433 in the firewall:

sudo ufw allow 1433/tcp
sudo ufw reload

Then connect using SQL Server Management Studio (SSMS) or Azure Data Studio on Windows:

FieldValue
Server nameserver IP or Domain,1433
AuthenticationSQL Server Authentication
LoginSA
Password<password set during installation>
Trust server certificate✅ Checked

6.3 Using MSSQL in Plesk-hosted Web Applications

A web application hosted on Plesk that needs to connect to MSSQL should use localhost,1433 or the server IP in its connection string. Plesk does not manage this connection — the application connects directly to MSSQL.

# .NET / C# example connection string
Server=localhost,1433;Database=MyDb;User Id=SA;Password=<password>;TrustServerCertificate=True;
# PHP (PDO) example
$pdo = new PDO("sqlsrv:Server=localhost,1433;Database=MyDb", "SA", "<password>");

7

MSSQL Management — Essential Commands

7.1 Service Management

# Start the service
sudo systemctl start mssql-server

# Stop the service
sudo systemctl stop mssql-server

# Restart the service
sudo systemctl restart mssql-server

# Check status
sudo systemctl status mssql-server

# Enable auto-start on boot
sudo systemctl enable mssql-server

7.2 Basic Operations with sqlcmd

# Connect
sqlcmd -S localhost -U SA -P '<password>' -C

# List databases
SELECT name FROM sys.databases;
GO

# Create a new database
CREATE DATABASE MyDatabase;
GO

# Create a user
CREATE LOGIN myuser WITH PASSWORD = 'Strong@Password123';
CREATE USER myuser FOR LOGIN myuser;
GO

# Check version and edition
SELECT @@VERSION;
SELECT SERVERPROPERTY('Edition');
GO

7.3 Log Files

# MSSQL log directory
sudo ls /var/opt/mssql/log/

# View the error log
sudo tail -100 /var/opt/mssql/log/errorlog

7.4 mssql-conf Configuration Commands

# List all settings
sudo /opt/mssql/bin/mssql-conf list

# Change edition
sudo /opt/mssql/bin/mssql-conf set-edition

# Reset SA password
sudo /opt/mssql/bin/mssql-conf set-sa-password

# Set memory limit (in MB)
sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 4096

8

Important Notes & Warnings

#TopicDescription
1MSSQL 2025 PreviewThis version is still in Preview. It is not recommended for production use.
2Developer EditionFree of charge and includes all Enterprise features. May only be used in development/test environments — not in production.
3Plesk + MSSQLPlesk for Linux cannot manage MSSQL through its panel. Both run as independent services.
4FirewallOpen port 1433 only to trusted IP addresses. Leaving it open to the public is a security risk.
5SA AccountAvoid using the SA account directly. Create dedicated users with minimum required permissions.
6Plesk LicenseThe 14-day trial cannot be extended. Purchase a license before it expires.
7BackupsBack up MSSQL databases regularly. Plesk’s built-in backup system does not cover MSSQL.
📌

Installation Summary:
✅ Ubuntu 24.04 — Ready
✅ Timezone: Europe/Istanbul (UTC+3)
✅ Plesk Obsidian — Installed (Trial license)
✅ MSSQL 2025 Preview (17.0.1000.7) — Installed
✅ Edition: Standard Developer Edition (64-bit)
✅ sqlcmd — Installed (/opt/mssql-tools18/bin/sqlcmd)
 

 

Leave a Reply

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