Skip to content

Commit 9c125b6

Browse files
authored
Merge pull request #36160 from rwestMSFT/rw-0102-linux-002
[Linux] Content refresh (002)
2 parents f1ce70a + b54f742 commit 9c125b6

15 files changed

Lines changed: 616 additions & 575 deletions

docs/linux/includes/cluster-availability-group-create-prereq.md

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
author: rwestMSFT
33
ms.author: randolphwest
4-
ms.date: 10/20/2025
4+
ms.date: 01/02/2026
55
ms.service: sql
66
ms.subservice: linux
77
ms.topic: include
@@ -10,12 +10,12 @@ ms.custom:
1010
---
1111
## Prerequisites
1212

13-
Before you create the availability group, you need to:
13+
Before you create the availability group, complete the following steps:
1414

15-
- Set your environment so that all the servers that will host availability replicas can communicate.
15+
- Set up your environment so that all the servers that host availability replicas can communicate.
1616
- Install [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)].
1717

18-
On Linux, you must create an availability group before you add it as a cluster resource to be managed by the cluster. This document provides an example that creates the availability group.
18+
On Linux, you must create an availability group before you add it as a cluster resource for the cluster to manage. This article provides an example that creates the availability group.
1919

2020
1. Update the computer name for each host.
2121

@@ -24,7 +24,7 @@ On Linux, you must create an availability group before you add it as a cluster r
2424
- 15 characters or fewer.
2525
- Unique within the network.
2626

27-
To set the computer name, edit `/etc/hostname`. The following script lets you edit `/etc/hostname` with **vi**:
27+
To set the computer name, edit `/etc/hostname`. The following example shows how to edit `/etc/hostname` with **vi**:
2828

2929
```bash
3030
sudo vi /etc/hostname
@@ -33,17 +33,17 @@ On Linux, you must create an availability group before you add it as a cluster r
3333
1. Configure the hosts file.
3434

3535
> [!NOTE]
36-
> If hostnames are registered with their IP address in the DNS server, you don't need to do the following steps. Validate that all the nodes intended to be part of the availability group configuration can communicate with each other. (A ping to the hostname should reply with the corresponding IP address.) Also, make sure that the `/etc/hosts` file doesn't contain a record that maps the localhost IP address 127.0.0.1 with the hostname of the node.
36+
> If the DNS server registers hostnames with their IP addresses, you don't need to complete the following steps. Validate that all the nodes intended to be part of the availability group configuration can communicate with each other. (A ping to the hostname should reply with the corresponding IP address.) Also, make sure that the `/etc/hosts` file doesn't contain a record that maps the localhost IP address 127.0.0.1 with the hostname of the node.
3737
38-
The hosts file on every server contains the IP addresses and names of all servers that will participate in the availability group.
38+
The hosts file on every server contains the IP addresses and names of all servers that participate in the availability group.
3939

4040
The following command returns the IP address of the current server:
4141

4242
```bash
4343
sudo ip addr show
4444
```
4545

46-
Update `/etc/hosts`. The following script lets you edit `/etc/hosts` with **vi**:
46+
Update `/etc/hosts`. The following example shows how to edit `/etc/hosts` with **vi**:
4747

4848
```bash
4949
sudo vi /etc/hosts
@@ -63,10 +63,13 @@ On Linux, you must create an availability group before you add it as a cluster r
6363

6464
Install [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]. The following links point to [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] installation instructions for various distributions:
6565

66-
- [Quickstart: Install SQL Server and create a database on Red Hat](../quickstart-install-connect-red-hat.md)
66+
- [Quickstart: Install SQL Server and create a database on Red Hat Enterprise Linux](../quickstart-install-connect-red-hat.md)
6767
- [Quickstart: Install SQL Server and create a database on SUSE Linux Enterprise Server](../quickstart-install-connect-suse.md)
6868
- [Quickstart: Install SQL Server and create a database on Ubuntu](../quickstart-install-connect-ubuntu.md)
6969

70+
> [!NOTE]
71+
> Starting in [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)], SUSE Linux Enterprise Server (SLES) isn't supported.
72+
7073
## Enable Always On availability groups
7174

7275
Enable Always On availability groups for each node that hosts a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance, and then restart `mssql-server`. Run the following script:
@@ -82,10 +85,7 @@ You can optionally enable Extended Events (XE) to help with root-cause diagnosis
8285

8386
```sql
8487
ALTER EVENT SESSION AlwaysOn_health ON SERVER
85-
WITH
86-
(
87-
STARTUP_STATE = ON
88-
);
88+
WITH (STARTUP_STATE = ON);
8989
GO
9090
```
9191

@@ -101,19 +101,19 @@ The following Transact-SQL script creates a master key and a certificate. It the
101101
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<master-key-password>';
102102

103103
CREATE CERTIFICATE dbm_certificate
104-
WITH SUBJECT = 'dbm';
104+
WITH SUBJECT = 'dbm';
105105

106106
BACKUP CERTIFICATE dbm_certificate
107-
TO FILE = '/var/opt/mssql/data/dbm_certificate.cer'
108-
WITH PRIVATE KEY (
109-
FILE = '/var/opt/mssql/data/dbm_certificate.pvk',
110-
ENCRYPTION BY PASSWORD = '<private-key-password>'
107+
TO FILE = '/var/opt/mssql/data/dbm_certificate.cer'
108+
WITH PRIVATE KEY (
109+
FILE = '/var/opt/mssql/data/dbm_certificate.pvk',
110+
ENCRYPTION BY PASSWORD = '<private-key-password>'
111111
);
112112
```
113113

114-
At this point, your primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica has a certificate at `/var/opt/mssql/data/dbm_certificate.cer` and a private key at `var/opt/mssql/data/dbm_certificate.pvk`. Copy these two files to the same location on all servers that will host availability replicas. Use the mssql user, or give permission to the mssql user to access these files.
114+
At this point, your primary [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] replica has a certificate at `/var/opt/mssql/data/dbm_certificate.cer` and a private key at `/var/opt/mssql/data/dbm_certificate.pvk`. Copy these two files to the same location on all servers that host availability replicas. Use the mssql user, or give permission to the mssql user to access these files.
115115

116-
For example, on the source server, the following command copies the files to the target machine. Replace the `<node2>` values with the names of the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances that will host the replicas.
116+
For example, on the source server, the following command copies the files to the target machine. Replace the `<node2>` values with the names of the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances that host the replicas.
117117

118118
```bash
119119
cd /var/opt/mssql/data
@@ -135,10 +135,10 @@ The following Transact-SQL script creates a master key and a certificate from th
135135
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<master-key-password>';
136136

137137
CREATE CERTIFICATE dbm_certificate
138-
FROM FILE = '/var/opt/mssql/data/dbm_certificate.cer'
139-
WITH PRIVATE KEY (
140-
FILE = '/var/opt/mssql/data/dbm_certificate.pvk',
141-
DECRYPTION BY PASSWORD = '<private-key-password>'
138+
FROM FILE = '/var/opt/mssql/data/dbm_certificate.cer'
139+
WITH PRIVATE KEY (
140+
FILE = '/var/opt/mssql/data/dbm_certificate.pvk',
141+
DECRYPTION BY PASSWORD = '<private-key-password>'
142142
);
143143
```
144144

@@ -148,48 +148,42 @@ In the previous example, replace `<private-key-password>` with the same password
148148

149149
Database mirroring endpoints use the Transmission Control Protocol (TCP) to send and receive messages between the server instances that participate in database mirroring sessions, or host availability replicas. The database mirroring endpoint listens on a unique TCP port number.
150150

151-
The following Transact-SQL script creates a listening endpoint named `Hadr_endpoint` for the availability group. It starts the endpoint and gives connection permission to the certificate that you created. Before you run the script, replace the values between `< ... >`. Optionally you can include an IP address `LISTENER_IP = (0.0.0.0)`. The listener IP address must be an IPv4 address. You can also use `0.0.0.0`.
151+
The following Transact-SQL script creates a listening endpoint named `Hadr_endpoint` for the availability group. It starts the endpoint and gives connection permission to the certificate that you created. Before you run the script, replace the values between `< ... >`. Optionally, you can include an IP address `LISTENER_IP = (0.0.0.0)`. The listener IP address must be an IPv4 address. You can also use `0.0.0.0`.
152152

153153
Update the following Transact-SQL script for your environment on all [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances:
154154

155155
```sql
156156
CREATE ENDPOINT [Hadr_endpoint]
157-
AS TCP
158-
(
159-
LISTENER_PORT = 5022
160-
)
161-
FOR DATABASE_MIRRORING
157+
AS TCP (LISTENER_PORT = 5022)
158+
FOR DATABASE_MIRRORING
162159
(
163-
ROLE = ALL,
164-
AUTHENTICATION = CERTIFICATE dbm_certificate,
165-
ENCRYPTION = REQUIRED ALGORITHM AES
160+
ROLE = ALL,
161+
AUTHENTICATION = CERTIFICATE dbm_certificate,
162+
ENCRYPTION = REQUIRED ALGORITHM AES
166163
);
167164

168165
ALTER ENDPOINT [Hadr_endpoint]
169-
STATE = STARTED;
166+
STATE = STARTED;
170167
```
171168

172169
> [!NOTE]
173170
> If you use [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] Express edition on one node to host a configuration-only replica, the only valid value for `ROLE` is `WITNESS`. Run the following script on [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] Express edition:
174171
175172
```sql
176173
CREATE ENDPOINT [Hadr_endpoint]
177-
AS TCP
178-
(
179-
LISTENER_PORT = 5022
180-
)
181-
FOR DATABASE_MIRRORING
174+
AS TCP (LISTENER_PORT = 5022)
175+
FOR DATABASE_MIRRORING
182176
(
183-
ROLE = WITNESS,
184-
AUTHENTICATION = CERTIFICATE dbm_certificate,
185-
ENCRYPTION = REQUIRED ALGORITHM AES
177+
ROLE = WITNESS,
178+
AUTHENTICATION = CERTIFICATE dbm_certificate,
179+
ENCRYPTION = REQUIRED ALGORITHM AES
186180
);
187181

188182
ALTER ENDPOINT [Hadr_endpoint]
189-
STATE = STARTED;
183+
STATE = STARTED;
190184
```
191185

192-
The TCP port on the firewall must be open for the listener port.
186+
You must open the TCP port on the firewall for the listener port.
193187

194188
> [!IMPORTANT]
195189
> The only authentication method supported for the database mirroring endpoint is `CERTIFICATE`. The `WINDOWS` option isn't available.

0 commit comments

Comments
 (0)