[How to] – install MSSQL Server on RHEL / CentOS 8
I already wrote about how to install MSSQL Server on RHEL 7. Today, I tried to install MSSQL on CentOS 8 following my instructions. The installation failed.
[root@scm opt]# sudo yum install -y mssql-server packages-microsoft-com-mssql-server-2017 123 kB/s | 15 kB 00:00 Last metadata expiration check: 0:00:01 ago on Sun 26 Jan 2020 07:40:10 AM CET. Error: Problem: cannot install the best candidate for the job nothing provides python needed by mssql-server-14.0.3257.3-13.x86_64 nothing provides openssl < 1:1.1.0 needed by mssql-server-14.0.3257.3-13.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
The SQL Server 2017 makes use of python2 and OpenSSL 1.0. You’ll need to install the package without resolving dependencies.
CentOS 8 does not install Python by default and OpenSSL seems also not to be available when you do a minimal install.
Here is, what I did to get MSSQL Server installed on CentOS 8.
sudo yum -y install python2 compat-openssl10 sudo alternatives --set python /usr/bin/python2 sudo yum download mssql-server sudo rpm -Uvh --nodeps mssql-server*rpm
This will install the dependencies needed. You should see the following output:
[root@scm opt]# sudo yum -y install python2 compat-openssl10 Last metadata expiration check: 0:09:33 ago on Sun 26 Jan 2020 07:41:11 AM CET. Dependencies resolved. Package Architecture Version Repository Size Installing: compat-openssl10 x86_64 1:1.0.2o-3.el8 AppStream 1.1 M python2 x86_64 2.7.16-12.module_el8.1.0+219+cf9e6ac9 AppStream 109 k Installing dependencies: python2-libs x86_64 2.7.16-12.module_el8.1.0+219+cf9e6ac9 AppStream 6.0 M python2-pip-wheel noarch 9.0.3-14.module_el8.1.0+219+cf9e6ac9 AppStream 1.2 M python2-setuptools-wheel noarch 39.0.1-11.module_el8.1.0+219+cf9e6ac9 AppStream 289 k Installing weak dependencies: python2-pip noarch 9.0.3-14.module_el8.1.0+219+cf9e6ac9 AppStream 2.0 M python2-setuptools noarch 39.0.1-11.module_el8.1.0+219+cf9e6ac9 AppStream 643 k Enabling module streams: python27 2.7 Transaction Summary Install 7 Packages Total download size: 11 M Installed size: 42 M Downloading Packages: (1/7): python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64.rpm 1.4 MB/s | 109 kB 00:00 (2/7): compat-openssl10-1.0.2o-3.el8.x86_64.rpm 5.3 MB/s | 1.1 MB 00:00 (3/7): python2-pip-wheel-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch.rpm 3.6 MB/s | 1.2 MB 00:00 (4/7): python2-setuptools-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch.rpm 3.3 MB/s | 643 kB 00:00 (5/7): python2-setuptools-wheel-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch.rpm 2.4 MB/s | 289 kB 00:00 (6/7): python2-pip-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch.rpm 2.3 MB/s | 2.0 MB 00:00 (7/7): python2-libs-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64.rpm 3.9 MB/s | 6.0 MB 00:01 Total 6.2 MB/s | 11 MB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : python2-setuptools-wheel-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch 1/7 Installing : python2-pip-wheel-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch 2/7 Installing : python2-libs-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 3/7 Installing : python2-pip-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch 4/7 Installing : python2-setuptools-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch 5/7 Installing : python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 6/7 Running scriptlet: python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 6/7 Installing : compat-openssl10-1:1.0.2o-3.el8.x86_64 7/7 Running scriptlet: compat-openssl10-1:1.0.2o-3.el8.x86_64 7/7 Verifying : compat-openssl10-1:1.0.2o-3.el8.x86_64 1/7 Verifying : python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 2/7 Verifying : python2-libs-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 3/7 Verifying : python2-pip-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch 4/7 Verifying : python2-pip-wheel-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch 5/7 Verifying : python2-setuptools-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch 6/7 Verifying : python2-setuptools-wheel-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch 7/7 Installed: compat-openssl10-1:1.0.2o-3.el8.x86_64 python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 python2-pip-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch python2-setuptools-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch python2-libs-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64 python2-pip-wheel-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch python2-setuptools-wheel-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch Complete! [root@scm opt]# sudo alternatives --set python /usr/bin/python2 [root@scm opt]# sudo yum download mssql-server Last metadata expiration check: 0:10:40 ago on Sun 26 Jan 2020 07:41:11 AM CET. mssql-server-14.0.3257.3-13.x86_64.rpm 3.9 MB/s | 183 MB 00:46 [root@scm opt]# sudo rpm -Uvh --nodeps mssql-server*rpm warning: mssql-server-14.0.3257.3-13.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY Verifying… ################################# [100%] Preparing… ################################# [100%] Updating / installing… 1:mssql-server-14.0.3257.3-13 ################################# [100%] +--------------------------------------------------------------+ Please run 'sudo /opt/mssql/bin/mssql-conf setup' to complete the setup of Microsoft SQL Server +--------------------------------------------------------------+ SQL Server needs to be restarted in order to apply this setting. Please run 'systemctl restart mssql-server.service'. [root@scm opt]# sudo /opt/mssql/bin/mssql-conf setup 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) 7) Enterprise Core (PAID) 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=852748&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=855862&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 â /usr/lib/systemd/system/mssql-server.service. Setup has completed successfully. SQL Server is now starting.