With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.
Note: All screenshots and commands are applied to Ubuntu 16.04
In this first part of this tutorial we will learn what the prerequisites are to install SQL Server vNext on Linux. How we can we check the prerequisites with shell commands and how can we connect to a Linux machine from a Windows PC?
SQL Server vNext can be installed on the follow three Linux flavours available in the market as found in the documentation [Microsoft Documentation]:
B. Prerequisites for Installing SQL Server vNext on Linux:
How to check if the SSH Server is running?
Step 1: Open terminal
Step 2: execute command telnet localhost 22
If the output shows OpenSSH and the version then it means that SSH is open and running on your Linux server.
Below is the output after running telnet localhost 22 command:
Figure 1: Checking SSH is working or not
If SSH is not there then we have to install it separately. We can execute the following command to install SSH:
sudo apt-get install openssh-server
Below is the output after executing above command in terminal:
Figure 2: Installation of SSH
In my case it is already installed so giving message openssh-server is already the newest version.
C. How to connect to Ubuntu 16.04 from Windows?
To install SQL Server vNext on Ubuntu 16.04, I need to connect remotely to the Linux server on which Ubuntu is installed. I'll cover two ways to connect remotely to a Linux server from a Windows PC:
C.1 Using PuTTY
To connect with Putty we simply need to download and run the executable file available from the PuTTY website (http://www.putty.org).
Figure 3: Connecting Server with Putty
Enter the IP address of the Linux server and click Open. Follow the prompts to log into the Linux server. You will need to use the root or other privileged account that
Figure 4: Entering credentials to connect with Server
C.2 Using mstsc (Microsoft Terminal Services Client)
If we want to remotely connect to the Linux server using mstsc from a 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). [http://www.xrdp.org/]
Since I am using Ubuntu 16.04 version, I will use xfce Desktop instead, because Ubuntu 12.04LTS Xrdp or Genome desktop is not supported.
Installing xfce on Ubuntu
Step 1: Open Putty, connect linux server and execute below command to install xfce:
Step 2: Execute below command to enable xfce:
Step 3: Edit the config file /etc/xrdp/startwm.sh:
Step 4: Add xfce session information
Step 5: Exit and Save:
Step 6: Restart xrdp service to apply the changes:
Step 7: Connect to Linux machine via RDP
Once connected you should see a login as seen below:
Figure 5: Connecting Server with Xrdp/Xcfe
Step 8: Login to the Linux Desktop:
Figure 6: Server connecting is in progress
Below is a sample screenshot of the Ubuntu Desktop:
Figure 7: First desktop on connecting with Ubuntu
D. Performing some pre-checks which are given in section A of prerequisites:
D.1 How to open a terminal from the Linux Desktop
Right click on Ubuntu desktop and click on Open Terminal Here or you can open terminal with Putty also.
Figure 8: Opening Terminal
D.2 Checking whether Ubuntu is 32 bit or 64 bit
Use the "uname" command with the -i switch as shown below
Figure 9: Checking for 32 bit or 64 bit
x86_64 : It means it is 64-bit architecture. For more info click here: https://askubuntu.com/questions/201412/is-x86-64-a-x86-or-x64/questions/201412/is-x86-64-a-x86-or-x64/
D.3 Checking the version of Ubuntu
Use the "lsb_release" command with the -a switch to determine the version installed (as shown below)
Figure 10: Checking version of Ubuntu
As you can see it is showing version 16.04 which is one of the requirements for installing SQL Server vNext.
D.4 Checking RAM in Ubuntu
Use the following command to check the available memory
grep MemTotal /proc/meminfo
Figure 11: Checking Total Memory
The total memory shown is 8166672 KB which is around 7.78 GB and yes I have 8 GB RAM on this Server.
D.5 Check the disk space on the Linux server
Use the df command to determine the space available.
Figure 12: Checking Total Space on Disk
Showing that it has approximate 131.0 GB space in total.
D.6 Checking internet access in Ubuntu
Use "ping" to check if the server has internet access
The best way to check internet access is to use ping command as above. If in output of command it shows some transmitted and received packets then it means internet is working fine. If it shows only transmitted packets and 0 received packets with 100% packet loss then it is the problem with firewall which we have to resolved with the help of network administrator. [ More Info.. ]
Note: Sometimes internet works fine but we are unable to ping external sites via ping command. [ Click Here For More Info ]
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.