3. Run the following commands to install SQL Server:
Bash
4. After the package installation finishes, run mssql-conf setup and follow the
prompts to set the SA password and choose your edition. As a reminder, the
following SQL Server editions are freely licensed: Evaluation, Developer, and
Express.
Bash
Remember to specify a strong password for the SA account. You need a
minimum length 8 characters, including uppercase and lowercase letters,
base-10 digits and/or non-alphanumeric symbols.
5. Once the configuration is done, verify that the service is running:
Bash
6. If you plan to connect remotely, you might also need to open the SQL Server
TCP port (default 1433) on your firewall.
At this point, SQL Server is running on your Ubuntu machine and is ready to use!
When you connect to your SQL Server instance using the sa account for the first time
after installation, it's important for you to follow these steps, and then immediately
disable the sa login as a security best practice.
1. Create a new login, and make it a member of the sysadmin server role.
Depending on whether you have a container or non-container deployment,
enable Windows authentication, and create a new Windows-based login and
add it to the sysadmin server role.