Sigue los siguientes pasos para instalar Microsoft SQL Server en un servidor de Ubuntu Linux. Es realmente sencillo.
1. Conectarse al servidor Ubuntu con el usuario que tengas configurado.
login as: capacitacion
capacitacion@192.168.0.15's password:
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-28-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
222 packages can be updated.
163 updates are security updates.
Your Hardware Enablement Stack (HWE) is supported until April 2023.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
2. Ejecutar el siguiente comando
root@capacitacion-VirtualBox:~# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
OK
3. Actualizar el repositorio con los paquetes de la última versión de SQL SERVER disponible
root@capacitacion-VirtualBox:~# sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"
Hit:1 http://cr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://cr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://cr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:5 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic InRelease [10,5 kB]
Get:6 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic/main amd64 Packages [6?808 B]
Get:7 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic/main armhf Packages [1?521 B]
Get:8 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic/main arm64 Packages [1?521 B]
Fetched 20,3 kB in 1s (19,5 kB/s)
Reading package lists... Done
root@capacitacion-VirtualBox:~# apt-get updte
E: Invalid operation updte
root@capacitacion-VirtualBox:~# apt-get update
Hit:1 http://cr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://cr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://cr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
4. Instalar la paquetería de SQL SERVER
root@capacitacion-VirtualBox:~# apt-get install -y mssql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
gawk libc++1 libc++abi1 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libsasl2-modules-gssapi-mit libsigsegv2
libsss-nss-idmap0 python python-minimal python2.7 python2.7-minimal
Suggested packages:
gawk-doc clang python-doc python-tk python2.7-doc binfmt-support
The following NEW packages will be installed:
gawk libc++1 libc++abi1 libpython-stdlib libsasl2-modules-gssapi-mit libsigsegv2 libsss-nss-idmap0 mssql-server python python-minimal python2.7
python2.7-minimal
The following packages will be upgraded:
libpython2.7 libpython2.7-minimal libpython2.7-stdlib
3 upgraded, 12 newly installed, 0 to remove and 214 not upgraded.
Need to get 232 MB of archives.
After this operation, 1?077 MB of additional disk space will be used.
Get:1 http://cr.archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14,7 kB]
Get:2 http://cr.archive.ubuntu.com/ubuntu bionic/main amd64 gawk amd64 1:4.1.4+dfsg-1build1 [401 kB]
Get:3 https://packages.microsoft.com/ubuntu/18.04/mssql-server-2019 bionic/main amd64 mssql-server amd64 15.0.4033.1-2 [227 MB]
Get:4 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7 amd64 2.7.17-1~18.04ubuntu1 [1?053 kB]
Get:5 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04ubuntu1 [1?915 kB]
Get:6 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04ubuntu1 [335 kB]
Get:7 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7-minimal amd64 2.7.17-1~18.04ubuntu1 [1?294 kB]
Get:8 http://cr.archive.ubuntu.com/ubuntu bionic/main amd64 python-minimal amd64 2.7.15~rc1-1 [28,1 kB]
Get:9 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7 amd64 2.7.17-1~18.04ubuntu1 [248 kB]
Get:10 http://cr.archive.ubuntu.com/ubuntu bionic/main amd64 libpython-stdlib amd64 2.7.15~rc1-1 [7?620 B]
Get:11 http://cr.archive.ubuntu.com/ubuntu bionic/main amd64 python amd64 2.7.15~rc1-1 [140 kB]
Get:12 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsasl2-modules-gssapi-mit amd64 2.1.27~101-g0780600+dfsg-3ubuntu2.1 [35,5 kB]
Get:13 http://cr.archive.ubuntu.com/ubuntu bionic/universe amd64 libc++abi1 amd64 6.0-2 [56,7 kB]
Get:14 http://cr.archive.ubuntu.com/ubuntu bionic/universe amd64 libc++1 amd64 6.0-2 [183 kB]
Get:15 http://cr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsss-nss-idmap0 amd64 1.16.1-1ubuntu1.6 [20,1 kB]
Fetched 232 MB in 23s (10,1 MB/s)
Preconfiguring packages ...
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 129918 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.12-1_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.12-1) ...
Setting up libsigsegv2:amd64 (2.12-1) ...
Selecting previously unselected package gawk.
(Reading database ... 129925 files and directories currently installed.)
Preparing to unpack .../0-gawk_1%3a4.1.4+dfsg-1build1_amd64.deb ...
Unpacking gawk (1:4.1.4+dfsg-1build1) ...
Preparing to unpack .../1-libpython2.7_2.7.17-1~18.04ubuntu1_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.17-1~18.04ubuntu1) over (2.7.17-1~18.04) ...
Preparing to unpack .../2-libpython2.7-stdlib_2.7.17-1~18.04ubuntu1_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.17-1~18.04ubuntu1) over (2.7.17-1~18.04) ...
Preparing to unpack .../3-libpython2.7-minimal_2.7.17-1~18.04ubuntu1_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.17-1~18.04ubuntu1) over (2.7.17-1~18.04) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../4-python2.7-minimal_2.7.17-1~18.04ubuntu1_amd64.deb ...
Unpacking python2.7-minimal (2.7.17-1~18.04ubuntu1) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../5-python-minimal_2.7.15~rc1-1_amd64.deb ...
Unpacking python-minimal (2.7.15~rc1-1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../6-python2.7_2.7.17-1~18.04ubuntu1_amd64.deb ...
Unpacking python2.7 (2.7.17-1~18.04ubuntu1) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../7-libpython-stdlib_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.15~rc1-1) ...
Setting up libpython2.7-minimal:amd64 (2.7.17-1~18.04ubuntu1) ...
Setting up python2.7-minimal (2.7.17-1~18.04ubuntu1) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.15~rc1-1) ...
Selecting previously unselected package python.
(Reading database ... 130129 files and directories currently installed.)
Preparing to unpack .../0-python_2.7.15~rc1-1_amd64.deb ...
Unpacking python (2.7.15~rc1-1) ...
Selecting previously unselected package libsasl2-modules-gssapi-mit:amd64.
Preparing to unpack .../1-libsasl2-modules-gssapi-mit_2.1.27~101-g0780600+dfsg-3ubuntu2.1_amd64.deb ...
Unpacking libsasl2-modules-gssapi-mit:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2.1) ...
Selecting previously unselected package libc++abi1:amd64.
Preparing to unpack .../2-libc++abi1_6.0-2_amd64.deb ...
Unpacking libc++abi1:amd64 (6.0-2) ...
Selecting previously unselected package libc++1:amd64.
Preparing to unpack .../3-libc++1_6.0-2_amd64.deb ...
Unpacking libc++1:amd64 (6.0-2) ...
Selecting previously unselected package libsss-nss-idmap0.
Preparing to unpack .../4-libsss-nss-idmap0_1.16.1-1ubuntu1.6_amd64.deb ...
Unpacking libsss-nss-idmap0 (1.16.1-1ubuntu1.6) ...
Selecting previously unselected package mssql-server.
Preparing to unpack .../5-mssql-server_15.0.4033.1-2_amd64.deb ...
Unpacking mssql-server (15.0.4033.1-2) ...
Setting up libc++abi1:amd64 (6.0-2) ...
Setting up libsss-nss-idmap0 (1.16.1-1ubuntu1.6) ...
Setting up gawk (1:4.1.4+dfsg-1build1) ...
Setting up libsasl2-modules-gssapi-mit:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2.1) ...
Setting up libpython2.7-stdlib:amd64 (2.7.17-1~18.04ubuntu1) ...
Setting up libc++1:amd64 (6.0-2) ...
Setting up python2.7 (2.7.17-1~18.04ubuntu1) ...
Setting up libpython-stdlib:amd64 (2.7.15~rc1-1) ...
Setting up libpython2.7:amd64 (2.7.17-1~18.04ubuntu1) ...
Setting up python (2.7.15~rc1-1) ...
Setting up mssql-server (15.0.4033.1-2) ...
+--------------------------------------------------------------+
Please run 'sudo /opt/mssql/bin/mssql-conf setup'
to complete the setup of Microsoft SQL Server
+--------------------------------------------------------------+
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
5. Configuración versión del SQL SERVER, habilitación del servicio y definición password para usuario SA.
root@capacitacion-VirtualBox:~# /opt/mssql/bin/mssql-conf setup
usermod: no changes
Choose an edition of SQL Server:
1) Evaluation (free, no production use rights, 180-day limit)
2) Developer (free, no production use rights)
3) Express (free)
4) Web (PAID)
5) Standard (PAID)
6) Enterprise (PAID) - CPU Core utilization restricted to 20 physical/40 hyperthreaded
7) Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum
8) I bought a license through a retail sales channel and have a product key to enter.
Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409
Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.
Enter your edition(1-8): 3
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=2104294&clcid=0x409
The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409
Do you accept the license terms? [Yes/No]:yes
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...
The licensing PID was successfully processed. The new edition is [Express Edition].
ForceFlush is enabled for this instance.
ForceFlush feature is enabled for log durability.
Created symlink /etc/systemd/system/multi-user.target.wants/mssql-server.service ? /lib/systemd/system/mssql-server.service.
Setup has completed successfully. SQL Server is now starting.
6. Validar que el servicio este corriendo
root@capacitacion-VirtualBox:~# systemctl status mssql-server --no-pager
? mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-06-12 09:26:06 CST; 47s ago
Docs: https://docs.microsoft.com/en-us/sql/linux
Main PID: 6082 (sqlservr)
Tasks: 119
CGroup: /system.slice/mssql-server.service
+-6082 /opt/mssql/bin/sqlservr
+-6104 /opt/mssql/bin/sqlservr
jun 12 09:26:10 capacitacion-VirtualBox sqlservr[6082]: [318B blob data]
jun 12 09:26:10 capacitacion-VirtualBox sqlservr[6082]: [78B blob data]
jun 12 09:26:10 capacitacion-VirtualBox sqlservr[6082]: [84B blob data]
jun 12 09:26:10 capacitacion-VirtualBox sqlservr[6082]: [145B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [96B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [66B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [96B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [100B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [71B blob data]
jun 12 09:26:11 capacitacion-VirtualBox sqlservr[6082]: [124B blob data]
Ahora puedes instalar el Microsoft SQL Management Studio 18 en tu ambiente de sistema operativo Windows y logear en la dirección del servidor con la autenticación de servidor.