Skip to content

Instantly share code, notes, and snippets.

@nelson6e65
Created July 20, 2021 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelson6e65/d24cc3b1bf3e13ae57b8fe1b4b60781a to your computer and use it in GitHub Desktop.
Save nelson6e65/d24cc3b1bf3e13ae57b8fe1b4b60781a to your computer and use it in GitHub Desktop.
Installl mssql in Fedora 34

Dependencies

sudo dnf install openldap*

Switch to Python2

# Check current
sudo alternatives --list | grep -i python

# If no output, run this:
sudo alternatives --install /usr/bin/python python /usr/bin/python3 2
sudo alternatives --install /usr/bin/python python /usr/bin/python2 1

# Configure default by selecting python2
sudo alternatives --config python

Instructions

https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat?view=sql-server-ver15

# Install repo
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo

# Install server
sudo dnf install -y mssql-server

# Configure
sudo /opt/mssql/bin/mssql-conf setup

Install the SQL Server command-line tools:

sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repo

sudo dnf install -y mssql-tools unixODBC-devel

# Export
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

Then you can use https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat?view=sql-server-ver15#connect-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment