| title | Configure Ubuntu Cluster for SQL Server Availability Group | Microsoft Docs |
|---|---|
| description | |
| author | MikeRayMSFT |
| ms.author | mikeray |
| manager | jhubbard |
| ms.date | 02/09/2017 |
| ms.topic | article |
| ms.prod | sql-linux |
| ms.technology | database-engine |
| ms.assetid | dd0d6fb9-df0a-41b9-9f22-9b558b2b2233 |
[!INCLUDE SLES-Create-SQL-Login]
sudo ufw allow 2224/tcp
sudo ufw allow 3121/tcp
sudo ufw allow 21064/tcp
sudo ufw allow 5405/udp
sudo ufw allow 1433/tcp # Replace with TDS endpoint
sudo ufw allow 5022/tcp # Replace with DATA_MIRRORING endpoint
sudo ufw reloadAlternatively, you can just disable the firewall:
sudo ufw disableOn all nodes, run the following commands:
sudo apt-get install pacemaker pcs fence-agents resource-agentsSet the password for the default user that is created when installing pacemaker and corosync packages. Use the same password on all nodes. The following command sets the password.
sudo passwd haclusterThe following command enables and starts pcsd service and pacemaker. This allows the nodes to rejoin the cluster after reboot.
sudo systemctl enable pcsd
sudo systemctl start pcsd
sudo systemctl enable pacemakerRun the following command on all nodes.
sudo pcs cluster destroy # On all nodesRun the following command the primary SQL Server.
sudo pcs cluster auth nodeName1 nodeName2 -u hacluster -p <password for hacluster>
sudo pcs cluster setup --name <clusterName> <nodeName1> <nodeName2…> --force
sudo pcs cluster start --allRun the following command to disable STONITH
sudo pcs property set stonith-enabled=false