MSSQL Server 2017 Installation on Oracle Linux 7.5 | Install and Configure MSSQL Server Step by Step
MSSQL Server 2017 installation on Linux 7.5.
Once the Linux VM is build follow the instructions below to install SQL Server latest release.
Step 1: Download the Microsoft SQL Server Red Hat repository configuration file:
Issue following command as root user:-
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
Step 2: Install SQL Server:
yum -y install mssql-server
Step 3: Setup SQL Server Installation:
/opt/mssql/bin/mssql-conf setup
The Setup would prompt for the type of edition and sa password, please supply the same on the command prompt itself.
This completes the SQL Server installation on Linux, you can cross check the SQL Server service and processes from below commands:-
Service:
systemctl status mssql-server
ps -ef | grep sqlservr | grep -v grep
netstat -tulpn | grep 1434
Step 4: Connect to the SQL Server Instance:
For connecting you need to first install mssql-tools sqlcmd , bcp, which can be installed by executing below command
Download:
curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
Install:
yum install -y mssql-tools unixODBC-devel
Mssq-tools has been installed now but to use them add the mssql-tools binaries to your path:
export PATH=”$PATH:/opt/mssql-tools/bin”
export PATH=$PATH:/opt/mssql-tools/bin
To permanently add it, enter below command for every user by which you want to access mssql-tools binaries:-
Once this is done you can connect to SQL Server Instance by executing below command:-
sqlcmd -S localhost -U SA -P ”
Step 5: Now to allow remote connection you need to disable firewall, this can be achieved by:
Disabling firewall:
systemctl disable firewalld
OR Allow port 1433:
firewall-cmd –zone=public –add-port=1434/tcp –permanent
firewall-cmd –reload
Step 6: Install SQL Server Agent
yum install mssql-server-agent
systemctl restart mssql-server
Hope this helps!
Cheers!
Ramesh.
centos 7