Skip to content

Instantly share code, notes, and snippets.

@ItzJustJosh
Created July 23, 2022 15:51
Show Gist options
  • Save ItzJustJosh/38dd414b11c2e2fcffd2005e6bcca289 to your computer and use it in GitHub Desktop.
Save ItzJustJosh/38dd414b11c2e2fcffd2005e6bcca289 to your computer and use it in GitHub Desktop.
Install Python MS SQL/SQL Server Driver [Fedora/RHEL]
#!/bin/zsh
wget https://packages.microsoft.com/config/rhel/8/prod.repo
sudo mv ./prod.repo /etc/yum.repos.d/mssql-release.repo
sudo dnf remove unixODBC-utf16 unixODBC-utf16-devel -y #to avoid conflicts
sudo ACCEPT_EULA=Y dnf install -y msodbcsql18
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y dnf install -y mssql-tools18
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> $HOME/.zshrc
# optional: for unixODBC development headers
sudo dnf install -y unixODBC-devel
echo "Please reload your terminal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment