How to install SQL Server 2022 on Ubuntu Server 24.04 LTS

Eghost 0 Reputation points
2024-06-09T22:09:54.9333333+00:00

I couldn't find a proper way to install SQL Server 2022 on Ubuntu Server 24.04 LTS. I tried to use Microsoft SQL Server 2022 from the Ubuntu 22.04 repository, but I couldn't run the service correctly. I'm done with this state of service (see printout).Is there any way I can perform the service? The truth is I'm just using Linux but I need to install SQL Server. If you could guide me step by step I would appreciate it.

Captura desde 2024-06-09 17-59-25

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,269 questions
{count} votes

4 answers

Sort by: Most helpful
  1. PhiHung Bach 5 Reputation points
    2024-07-06T00:32:50.3966667+00:00

    Solved. Complete Steps.

    =========================================
    Install MSSQL Server 2022 on Ubuntu 24.04
    curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
    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 | sudo tee /etc/apt/sources.list.d/mssql-server-2022.list
    :: Need to download & install libldap-2.5
    curl -OL http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get install ./libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get update
    sudo apt-get install -y mssql-server
    sudo /opt/mssql/bin/mssql-conf setup		####!
    systemctl status mssql-server --no-pager
    sudo ufw allow 1433/tcp
    sudo ufw enable
    sudo ufw status
    
    
    1 person found this answer helpful.

  2. LucyChenMSFT-4874 2,985 Reputation points
    2024-06-11T05:21:20.8466667+00:00

    Hi @Eghost ,

    Thank you for reaching out and welcome to Microsoft Q&A.

    What steps did you take? Here is an article of how to install SQL Server on Ubuntu, it shows steps in detail, hope this can help you well.

    In addition, from the error messages you provided, please ensure the virtual machine configure available memory to at least 2GB and use the correct mssql-conf command.

    Please feel free to share your issue here if you have any confusions.

    Best regards,

    Lucy Chen


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/support/email-notifications


  3. Olaf Helper 42,926 Reputation points
    2024-06-11T05:26:24.6166667+00:00

    How to install SQL Server 2022 on Ubuntu Server 24.04 LTS

    Currently installation of SQL Server is supported on Ubuntu 20.04 and 22.04, but not on 24.04

    It may will work, but not supported. See

    https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-ver16#supportedplatforms

    0 comments No comments

  4. PhiHung Bach 5 Reputation points
    2024-07-06T00:13:56.6066667+00:00

    Solved.

    Download & Install :

    curl -OL http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get install ./libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    
    
    
    
    0 comments No comments