A few days back I was reading about SQL Server 2017 installation on Ubuntu. I tried it by installing and configuring the SQL Server 2017 on the Ubuntu virtual machine. It worked well and the main surprise was it ran with 2GB of RAM given to Ubuntu virtual machine.
After that, I engaged in installing Sitecore 9.0 update 2, and while installing SQL Server, a thought came to try SQL Server 2017 on Ubuntu with Sitecore 9.0 update 2. I ran through a couple of installation failure and thought to share the installation steps with precise information so any other Sitecore guy should not waste his time.
Let’s make it work.
- Prepare Windows Server 2016 / Windows 10 with following installed (Refer installation guide for Sitecore 9.0 update 2):
– IIS 10.0 / IIS 8.5
– .NET Framework 4.6.2 or later
– Microsoft Visual C++ 2015 Redistributable Requirements
– Solr 6.6.2 (HTTPS enabled)
– Apply for file system permissions
– Microsoft PowerShell version 5.1 or later
– Web Platform Installer 5.0 – See the next step to see what to install
- Install only the following components using Web Platform Installer
– Web Deploy 3.6 Hosting Servers
– URL Rewrite 2.1
- Install the Sitecore Installation Framework using the following commands:
# Add PowerShell gallery Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2 # Install SIF module Install-Module SitecoreInstallFramework #If you need to update it later use the following command: Update-Module SitecoreInstallFramework
- Install SQL Server Management Studio for 2017. Download it from here.
- Now, according to the KB article, https://kb.sitecore.net/articles/019579, we need to work out for some registry entries.
- Locate the installation folder of SSMS version that you installed and browse to the bin directory. In my case, it is ‘C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin’.
- Create a new string key named ‘DacFxPath‘, under the registry key ‘\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3‘, and set the path to point to the SSMS bin directory path.
- Create another new string key named ‘DacFxDependenciesPath‘, under the registry key ‘\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3′, and set the path to point to the SSMS bin directory path.
- Install Ubuntu 16.04 and use following commands to setup MS SQL 2017 on it.
# import the public repository GPG Key: wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - # Register the Microsoft SQL Server Ubuntu repository: sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)" # Run the following commands to install SQL Server: sudo apt-get update sudo apt-get install -y mssql-server # Configure the SQL Server (Use 2 to install Developer edition which is free): sudo /opt/mssql/bin/mssql-conf setup # verify the server is running: systemctl status mssql-server
- (Optional) To install SQL Server command-line tools follow the steps given at https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017#tools
- Try to connect the SQL Server 2017 installed on Ubuntu 16.04 from SSMS. If you see any connectivity issue, fix that. You may need to setup firewall to allow the connection on 1433 port in Ubuntu 16.04. I leave these steps for you to find and configure. 🙂
- Enable the contained database authentication using following query:
sp_configure 'contained database authentication', 1; GO RECONFIGURE; GO
- Now we are done with the setup and you can use the PowerShell script provided in Installation guide for Sitecore 9.0 Update 2. MAKE SURE THAT YOU SET IP ADDRESS OF YOUR UBUNTU MACHINE FOR THE $SqlServer parameter value to connect.
Write me at firstname.lastname@example.org if you have any queries.