Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button...

38
Introduction This topic provides a walkthrough of how to install SQL Server vNext CTP1 on Ubuntu 16.04. System Requirement 1. Ubuntu 16.04 64 bits desktop edition. Downlod the ISO file using this link https://www.ubuntu.com/download/desktop and click Download button. 2. Oracle VirtualBox 5.1.8 or latest version (free edition) Download exe file (windows) using this link https://www.virtualbox.org/wiki/Downloads and click ther link

Transcript of Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button...

Page 1: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Introduction This topic provides a walkthrough of how to install SQL Server vNext CTP1 on Ubuntu 16.04.

System Requirement1. Ubuntu 16.04 64 bits desktop edition.

Downlod the ISO file using this link https://www.ubuntu.com/download/desktop and click Download button.

2. Oracle VirtualBox 5.1.8 or latest version (free edition) Download exe file (windows) using this link https://www.virtualbox.org/wiki/Downloads and click ther link

Creating Ubuntu Virtual Machine

Page 2: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

1. Open Oracle Virtual Manager and click New from menubar.

2. This will open a new windows and fill the following information.Name: SQLLinuxType: Select Linux from drop down box.Version: Ubuntu (64-bit) from drop down box.Click Next button

3. Memory size selection extend the memory at least 4 GB (4096 MB) and click Next

Page 3: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

4. Hard disk selection choose “Create a virtual hard disk now” and click Create

5. Hard disk file type selection chooses “VDI (Virtual Disk Image)” and click Next.

Page 4: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

6. Storage on physical hard disk section choose Fixed size and click Next.

7. File Location and size section make sure size should at least 20 GB and click Create.

Page 5: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

At this point the virtual machine storage will be created and this step may take 2-3 minutes. we will see disk initializing progress with below screenshot.

Page 6: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Once the step is completed, the virtual machine created successfully and this new virtual machine will be shown to the left side of the VirtualBox console.

8. Click the virtual machine from VirtualBox console and click the setting in menu-bar. This will open a new window has every possible setting of virtual machine.

Page 7: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

9. Choose Storage option and on the right side Click Controller: IDE and click Empty (CD Icon).

10. Click the browse (CD icon) to browse the Ubuntu ISO file.

Page 8: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

11. Find the “Ubuntu-16.04.1-desktop-amd64.iso” file and click Open.

Page 9: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

12. Confirm the location label is point to correct “Ubuntu iso” file. Click OK

This will close the setting page and bring to summary page. Verify “iso file” location, memory and storage are correct and accurate.

Page 10: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

13. Select the virtual machine from virtual machine console and click Start

This will boot up the virtual machine with I selected SO file and it will show welcome sign.

14. Click “Ubuntu install” button.

Page 11: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

14. Don’t select any option to “Preparing to install Ubuntu” page. keep it default and click Continue.

15. Chose “Erase disk and install Ubuntu” option and click “Install Now”.

Page 12: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Pop up window will prompt with “write the changes to disk” for conformation. Click Continue.

16. Choose the time zone and click Continue

Page 13: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

17. Choose “Keyboard layout” and keep default to English (US) and click Continue

18. Enter the super user name and password.

Page 14: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

User name: dbas

Password: xxxxxxx

Choose “Log in automatically” and click Continue

This will start installing Ubuntu and this step may take 10 minutes. During this time several screen will change.

19. Once the installation is completed “Restart Now” message will be appeared and click “Restart Now”

Page 15: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

20. When virtual machine startup again installation medium remove message will appear and press Enter in where the virtual machine.

Continue to startup…

Page 16: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

YES virtual machine is created and Ubuntu desktop will be seen to virtual machine. (Definitely looks better than Windows 10)

21. Click the search icon and type terminal. Terminal icon will show in search panel and click Terminal.

Page 17: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0
Page 18: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Install curl utility1. Open terminal window (shown how to get Terminal in previous step) and run following command.

sudo apt-get install –y curl

Ask for dbas user password. Enter dbas user password (created during installing Ubuntu) and press enter.

Once curl utility is installed and following messages will be seen in terminal window.

Page 19: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Install SQL Server

1. Change user context to super user and run following command to terminal window and press entersudo su

This will switch current use to super-user mode and root@dbas will be seen to user context in terminal console.

2. Run the following command to terminal window to Import the public repository GPG keys

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

If command run successfully, check “OK” message to terminal window.

Page 20: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

3. Run following command in terminal window to register the Microsoft SQL Server Ubuntu repository.

curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list > /etc/apt/sources.list.d/mssql-server.list

If command run successfully, following output will be seen to terminal window.

4. Exit the super-user model by typingexit

root context will be disappeared and only dbas will see to console.

5. Update apt repository by running following command.sudo apt-get update

Page 21: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

If update is successful, terminal window will display “Reading package lists … Done”

6. Run following command to download as well as Install mssql server repository and press enter sudo apt-get install -y mssql-server

Following messages will display to terminal window once the download and install is completed.

Page 22: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Also “please run the SQL Server setup” will show at the end of message.

7. Run sqlserver setup file with following command and press enter

sudo /opt/mssql/bin/sqlservr-setup

8. Type YES to accept the terms license.

Page 23: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

9. Enter sa password. (xxxxxxx)

10. Re-confirm sa password Also confirm SQL Server startup and select [y]

Page 24: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

11. Confirm “Do you wish to enable SQL Server to start on boot?” select [y] and press enter.

Installation may take 2-3 minutes to complete. If no error during installation “Setup completed successfully” message will be end in terminal window.

Page 25: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

12. Check the sql services status. using the following command.

systemctl status mssql-server

All SQL services run status will be seen in terminal window and confirm following message is displaying.

Active: active (running)

Page 26: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Install tools on Ubuntu

1. Switch to super-user mode with following command.sudo su

2. Run following command in terminal window to Import the public repository GPG keys.

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

If command run successfully OK message will be shown in terminal window.

3. Run the following command to register the Microsoft Ubuntu repository

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/msprod.list

Page 27: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Once the registration is successful similar output will be seen.

4. Exit super-user mode with following command exit

5. Update SQL tools to Ubuntu repository by running the following command.

sudo apt-get update

Once the update is completed in terminal window, “Reading package list .. Done” messages will be shown.

Page 28: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

6. Install mssql-tools by run the following command.

sudo apt-get install mssql-tools

During installation process there will be few conformations.

“Do you want to continue?” type [y] and press enter.

Page 29: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

7. Select YES in the “Configuring mssql-tools” license term and press enter.

8. Select “YES” to “Configuring msodbcsql” license term.

Page 30: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

The following messages will be shown in the terminal window once the successful installation is completed.

9. Open port 1433 in firewall by run the following commandsudo ufw allow 1433/tcp

output will show Roles updated

SQL INSTALLATION IN UBUNTU IS COMPLETED ... CONGRATUALATIONS

Page 31: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

Login to SQL server1. Run the following command to login SQL Server in sqlcmd utility.

sqlcmd -S localhost -U SA -P '<YourPassword>'

2. Change database context to master later query to all databases name in the server. At very beginning ONLY system databases (master, model, msdb, tempdb) will return from the statement.

Page 32: Web viewLinux. from drop down box. Version: Ubuntu (64-bit) from drop down box. Click . Next. button . Memory size selection extend the memory at least 4 GB (4 0

3. Run few SQL Statements like create a new database, table and later add few rows to table. Query the table to return the rows that are inserted.

WE ARE GOOD NOW

SQL IS INSTALLED AND WE CAN EXTRACT DATA

THANK YOU FOR READING THIS.