Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install MSSQL Tools including ODBC driver & dependencies, bulk copy program (BCP), SQLCMD to Redhat 6 and similar e.g. CentOS, Amazon Linux
#!/bin/bash
sudo su <<HERE
curl https://packages.microsoft.com/keys/microsoft.asc | rpm --import -
curl https://packages.microsoft.com/config/rhel/6/prod.repo > /etc/yum.repos.d/mssql-release.repo
HERE
sudo yum -y remove unixODBC-utf16 unixODBC-utf16-devel
sudo ACCEPT_EULA=Y yum -y install msodbcsql-13.1.4.0-1 mssql-tools-14.0.3.0-1 unixODBC-devel --disableplugin=priorities
echo -e '\nexport PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo -e '\nexport PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.