Home > Storage > PowerFlex > White Papers > Dell APEX Block Storage for AWS: Microsoft SQL Server 2022 on Linux with Multi-AZ Resiliency > Install SQL Server 2022
All the configuration actions in this section are performed in SQLNode-1a.
USE [master]
GO
CREATE LOGIN [pacemaker] with PASSWORD= N'Password@123!' ;
ALTER SERVER ROLE [sysadmin] ADD MEMBER [pacemaker];
root@node-1a:~# touch /var/opt/mssql/secrets/passwd
root@node-1a:~# echo pacemaker | sudo tee -a /var/opt/mssql/secrets/passwd
root@node-1a:~# echo 'Dellam123!' | sudo tee -a /var/opt/mssql/secrets/passwd
root@node-1a:~# chown root:root /var/opt/mssql/secrets/passwd
root@node-1a:~# chmod 600 /var/opt/mssql/secrets/passwd
root@node-1a:~# cat /var/opt/mssql/secrets/passwd
exec sp_dropserver sqlnode-1a
go
exec sp_addserver 'sqlvirtualname1','local'
sudo systemctl stop mssql-server
sudo systemctl restart mssql-server
sudo systemctl stop mssql-server
Steps to change the default data or log directory location:
By default, the SQL Server Database Engine database file location is /var/opt/mssql/data.
sudo systemctl stop mssql-server
sudo mkdir /mnt/sqldb
sudo mkdir /mnt/sqllog
3. Run the following commands to change the owner and group of the directory to the mssql user:
sudo chown mssql /mnt/sqldb
sudo chgrp mssql /mnt/sqllog
4. Use mssql-conf to change the expected master database names for the master data and log files with the set command as follows:
sudo /opt/mssql/bin/mssql-conf set filelocation.datafile /mnt/sqldb/tpcc.mdf
sudo /opt/mssql/bin/mssql-conf set filelocation.logfile /mnt/sqllog/tpcc.ldf
5. Run the following command to move the master.mdf and mastlog.ldf files:
sudo mv /var/opt/mssql/data/tpcc.mdf /mnt/sqldb/tpcc.mdf
sudo mv /var/opt/mssql/data/tpcc.ldf /mnt/sqllog/tpcc.ldf
6. Run the following command to start the SQL Server service:
sudo systemctl start mssql-server