Last active
May 6, 2025 04:45
-
-
Save tangingw/9d0ff82e410cc3fb28ca960f5900d883 to your computer and use it in GitHub Desktop.
Install MS SQL 2022 on Ubuntu 24.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start as root user | |
sudo su | |
# download and install libldap-2.5-0 | |
curl -O http://debian.mirror.ac.za/debian/pool/main/o/openldap/libldap-2.5-0_2.5.13+dfsg-5_amd64.deb | |
dpkg -i libldap-2.5-0_2.5.13+dfsg-5_amd64.deb | |
# download and install libldap-dev | |
curl -O http://debian.mirror.ac.za/debian/pool/main/o/openldap/libldap-dev_2.5.13+dfsg-5_amd64.deb | |
dpkg -i libldap-dev_2.5.13+dfsg-5_amd64.deb | |
# get key and sources list from microsoft | |
# The instructions on the MS page gives 2 links for the key. | |
# Use this line to get the key and avoid "public key not available" warnings | |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc | |
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list | |
# wipe out the rebuild apt lists | |
rm -rf /var/lib/apt/lists/* && apt update | |
# install mssql-server | |
apt install -y mssql-server | |
#run the config tool | |
/opt/mssql/bin/mssql-conf setup | |
# below is optional if you need mssql-tools18 and unixodbc-dev | |
# curl https://packages.microsoft.com/config/ubuntu/24.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list | |
# apt update | |
# apt install -y mssql-tools18 unixodbc-dev | |
# No SSL Verify Command | |
sqlcmd -S localhost -U sa -C -Q 'select @@VERSION' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
0x540514dC1551aAaD738741f270Db649f31781CE2