In the previous blog, we discussed how to install RHEL Server on the virtual machine. In this quick tutorial, we will install SQL Server 2017 on Red Hat Enterprise Linux (RHEL).
- Connect to the RHEL virtual machine and log on to the server by keying username and password
- Switch to root user (superuser)
su root
- Check you can access the internet on your Linux virtual machine by pinging www.google.com
ping www.google.com
- Download the Microsoft SQL Server Red Hat repository into the RHEL Server
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
- Now, it’s time to install SQL Server on RHEL by using the below command
sudo yum install -y mssql-server
- Once SQL Server installation gets completed successfully, kindly run the configuration script. During the configuration setup, It will ask you to;
- Select the SQL Server Edition which you want to install
- Accept the SQL Server License terms
- Key “sa” password
sudo /opt/mssql/bin/mssql-conf setup
- Now verify, whether the SQL Server instance is running on RHEL Server or not.
systemctl status mssql-server
- To allow remote connections, open the SQL Server port on the firewall on RHEL. The default SQL Server port is TCP 1433. If you are using FirewallD for your firewall, you can use the following command;
sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
- Let’s apply the firewall configuration right now on the runtime.
sudo firewall-cmd --reload
Hope, you enjoyed installing SQL Server 2017 on RHEL system.