Install SQL Server 2019 on CentOS 9 Stream
To install SQL Server 2019 on CentOS 9 Stream, you can configure it by following the steps below:
Add SQL Server Repository:
Run the following command to add Microsoft's SQL Server repository:
sudo curl -o /etc// /config/rhel/8/
Install SQL Server:
useyum
Command to install the SQL Server package.
sudo yum install -y mssql-server
Configuring SQL Server:
After the installation is complete, run the following command to configure the SQL Server instance. You will need to set an administrator password and select the version of SQL Server (Developer, Express, etc.).
sudo /opt/mssql/bin/mssql-conf setup
When selecting the installation version, select the corresponding version 1, 2, 3, or 4 according to the prompts.
Start SQL Server and enable automatic startup:
After the configuration is complete, start the SQL Server service and set it to boot:
sudo systemctl start mssql-server sudo systemctl enable mssql-server
Check SQL Server Status:
Ensure SQL Server is running properly:
systemctl status mssql-server
Install SQL Server Command Line Tools (optional):
To use it on the command linesqlcmd
Connect and manage SQL Server, can be installedmssql-tools
:
Add a tool repository:
sudo curl -o /etc// /config/rhel/8/
Install the command line tool:
sudo yum install -y mssql-tools unixODBC-devel
Willsqlcmd
andbcp
Commands added to the path:
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile source ~/.bash_profile
Connect to SQL Server:
passsqlcmd
Or a tool such as DBeaver connects to SQL Server for management. Use the following command to connect to the SQL Server instance (replace<password>
Replace with the set administrator password):
sqlcmd -S localhost -U SA -P '<password>'
After the installation is complete, you can use DBeaver (or other database management tools) to connect to and manage SQL Server.
This is the end of this article about installing SQL Server 2019 on CentOS 9 Stream. For more related content on CentOS 9 Stream, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!