-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummit2020_demo_003.txt
More file actions
42 lines (32 loc) · 2.02 KB
/
summit2020_demo_003.txt
File metadata and controls
42 lines (32 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#######################################################################################
# PASS Virtual Summit 2020 - SQL Server on Linux from A to Z (Randolph West) #
# Pre-conference session (2020-11-10) #
#######################################################################################
# The scripts in this document are procured from several sources, including Microsoft #
# Docs, Wikipedia, genuinecoder.com, linuxhint.com, howtogeek.com, linux.org, #
# ss64.com, and tecmint.com. #
# No copyright is claimed or intended from these code samples #
#######################################################################################
#######################################################################################
### Part 1: Installing SQL Server 2019 on Ubuntu Linux 18.04 LTS
#######################################################################################
# Download the Microsoft repository GPG keys:
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys and remove the file:
sudo dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
# Add the SQL Server 2019 repository:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"
# Update the list of packages:
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe # this may already be configured
# Install SQL Server, command-line tools, and PowerShell
sudo apt-get install -y mssql-server mssql-tools unixodbc-dev mssql-cli powershell
# Upgrade all outdated packages and clean up old files:
sudo apt-get upgrade && sudo apt-get autoremove
# Set up the firewall
sudo ufw enable
sudo ufw allow 22 # This adds the SSH port to the firewall
sudo ufw allow 1433 # Only do this in a secure environment
# Restart the VM
sudo shutdown -r now