Step by step details on how to deploy Microsoft SQL Server on Linux. Includes screenshots from installing SQL Server 2019, and connecting to SQL using MSSQL-CLI.
- Connect to your Linux machine. I have Red Hat 8.3 installed.
2. As as prerequisite we need to install Python & OpenSSL
sudo yum install python2
I have preinstalled Python
3. Lets install OpenSSL
sudo yum install compat-openssl10
4. Configure python2 as the default interpreter
sudo alternatives --config python
5. Download the SQL Server 2019 Red Hat repo config file.
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo
We are downloading the repo to /etc/yum.repos.d
6. We are now ready to install SQL Server binaries.
sudo yum install -y mssql-server
7. Now we can proceed to configure sql server, choose edition & enter sa password
sudo /opt/mssql/bin/mssql-conf setup
SQL Server is now configured successfully.
8. Lets proceed to verify the installation
systemctl status mssql-server
9. We can now connect to the SQL Instance and run few queries to test. Note that am connecting using mssql-cli. To know how to install mssql-cli follow this link – Install mssql-cli on Linux
mssql-cli -S localhost -U sa --enter sa password when asked for password
That’s all about installing SQL Server on Red Hat Linux. You may read more posts on itech-blog.com to learn more about SQL Server on Linux and containers.
Very good topic