Installing SQL Server vNext On Linux - Part One

As per documentation, we can install SQL Server vNext on the following three versions of Linux which are available in the market.

Prerequisites for Installing SQL Server vNext on Linux
  1. Linux OS from any of the above mentioned versions.
  2. Minimum 3.25 GB RAM is required.
  3. Minimum 4.0 GB of disk space is required.
  4. Network connectivity is required to connect with Internet to download the SQL packages.
  5. 1433 TCP port should be opened on the firewall for SQL Server connections.
  6. Port 22 (which is default) should be open for SSH (SSH client, is a program for logging into a remote machine and for executing commands on a remote machine) connections.

    check SSH

­

Below is the output after running the telnet localhost 22 command.

telnet localhost 22

If SSH is not there, then we have to install it separately. We can execute the below command to install SSH.

sudo apt-get install openssh-server

Below is the output after executing the above command in terminal.

sudo apt-get install openssh-server

In my case, it is already installed so the given message openssh-server is already the newest version.

How to install SQL Server vNext on Ubuntu 16.04

To install SQL Server vNext on Ubuntu 16.04, I need to take remote of Linux server on which Ubuntu is installed. There are two ways to take remote of Linux Server from Windows PC,

  1. Using Putty
  2. Using mstsc

    1. To make a connection with Putty, we simply need to download its executable file on Windows and run that. 

      install SQL Server on Ubuntu

      Once we enter the IP address of server and hit enter, the below terminal will open of entered IP address where we can execute the commands.

      install SQL Server on Ubuntu

    2. If we want remote access of Linux server using mstsc from Windows server, then we need to install Ubuntu Desktop and Xrdp or Xfce [ Xrdp is an open source RDP server, which allows us to connect our Linux server with Remote Desktop from a Windows machine ].

Since I am using Ubuntu 16.04 version, I will use xfce Desktop instead, because from Ubuntu 12.04LTS Xrdp or Genome desktop is not supported. So, let’s start to install xfce on Ubuntu.

Step1

Open Putty, connect linux server and execute the below command to install xfce:

#sudo apt-get install xubuntu-desktop

Step2

Execute below command to enable xfce:

#echo xfce4-session >~/.xsession

Step3

Edit the config file /etc/xrdp/startwm.sh:

#sudo vi /etc/xrdp/startwm.sh >>it will open file for editing.

Step4

Add line xfce4-session before the line /etc/X11/Xsession in opened file in step3

Press ESC Key and I to insert the line

Now simply add line xfce4-session before the line /etc/X11/Xsession

Step5

Exit and Save:

Press :wq key to save and exit

Step6

Restart xrdp service to apply the changes:

#sudo service xrdp restart

Step7

Now open run command in Windows and type mstsc.

Enter IP address 172.XY.XZ.ZX which is my Ubuntu Server

It will open screen as shown in below screenshot,

mstsc

Step8

Click on OK button after entering credentials, it will open a screen as below and open your linux desktop.

install SQL Server on Ubuntu

Below is the screenshot of Ubuntu Desktop,

install SQL Server on Ubuntu

Performing some pre-checks which are given in section A of prerequisites,
  • Right click on Ubuntu desktop and click on Open Terminal Here or you can open terminal with Putty also.

    install SQL Server on Ubuntu

  • Checking Ubuntu is 32 bit or 64 bit

    #uname –i

    Check Ubuntu is 32 bit or 64 bit

    x86_64 : It means it is 64-bit architecture. For more info click here.

  • Checking version of Ubuntu

    #lsb_release –a

    Check version of Ubuntu

    Showing it is 16.04 which is required to install SQL Server vNext in prerequisites.

  • Checking RAM in Ubuntu

    #grep MemTotal /proc/meminfo

    Check RAM in Ubuntu

    Showing total memory is 8166672 KB which is around 7.78 GB and yes I have 8 GB RAM on this Server.

  • Check disk space on Ubuntu

    #df –h

    Check disk space on Ubuntu

    Showing that it has approximate 131.0 GB space in total.

  • Checking internet access in Ubuntu,

    #ping www.yahoo.com

The best way to check internet access is to use ping command as above. If in output of command, there are some transmitted and some received packages, then it means the internet is working fine. If  the internet is not working fine, then it will show some error.

Note

Sometimes the internet works fine but we are unable to ping external sites via ping command. [Click Here For More Info]

Conclusion

As you can see, it is important to have all the components in place and working before attempting to install SQL Server on vNext.

I have divided this article into two parts. This part is all about the prerequisites and connecting to the Linux Server. We've also covered some basic commands in Linux to check the prerequisites. You can use references also for basic Linux commands which I have given on 5th number. In the second part, I will describe how to install SQL Server vNext on Ubuntu 16.04 and make a connection with SQL Server and how to execute SQL queries. So, stay tuned. 

References
  • https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu
  • https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/remote-desktop
  • http://www.tutorialspoint.com
  • http://www.sqlservercentral.com/articles/SQL+Next/149118/
  • https://help.ubuntu.com/community/UsingTheTerminal#Commands


Similar Articles