Migrirajte na Innovate Summit:
Saznajte kako migracija i modernizacija na Azure može povećati performanse, otpornost i sigurnost poslovanja, omogućavajući vam da u potpunosti prihvatite umjetnu inteligenciju.Registrirajte se
Ovaj preglednik više nije podržan.
Nadogradite na Microsoft Edge da iskoristite najnovije osobine, sigurnosna ažuriranja i tehničku podršku.
In the search box, type SQL Server 2019, and select Enter to start the search.
Limit the search results by selecting Operating system > Red Hat.
Select a SQL Server 2019 Linux image from the search results. This tutorial uses SQL Server 2019 on RHEL74.
Savjet
The Developer edition lets you test or develop with the features of the Enterprise edition but no SQL Server licensing costs. You only pay for the cost of running the Linux VM.
Select Create.
Set up your Linux VM
In the Basics tab, select your Subscription and Resource Group.
In Virtual machine name, enter a name for your new Linux VM.
Then, type or select the following values:
Region: Select the Azure region that's right for you.
Availability options: Choose the availability and redundancy option that's best for your apps and data.
Change size: Select this option to pick a machine size and when done, choose Select. For more information about VM machine sizes, see VM sizes.
Savjet
For development and functional testing, use a VM size of DS2 or higher. For performance testing, use DS13 or higher.
Username: Enter the Administrator name for the VM.
SSH public key: Enter your RSA public key.
Public inbound ports: Choose Allow selected ports and pick the SSH (22) port in the Select public inbound ports list. In this quickstart, this step is necessary to connect and complete the SQL Server configuration. If you want to remotely connect to SQL Server, you will need to manually allow traffic to the default port (1433) used by Microsoft SQL Server for connections over the Internet after the virtual machine is created.
Make any changes you want to the settings in the following additional tabs or keep the default settings.
Disks
Networking
Management
Guest config
Tags
Select Review + create.
In the Review + create pane, select Create.
Connect to the Linux VM
If you already use a BASH shell, connect to the Azure VM using the ssh command. In the following command, replace the VM user name and IP address to connect to your Linux VM.
Bash
ssh azureadmin@40.55.55.555
You can find the IP address of your VM in the Azure portal.
If you're running on Windows and don't have a BASH shell, install an SSH client, such as PuTTY.
If you see a PuTTY security alert about the server's host key not being cached in the registry, choose from the following options. If you trust this host, select Yes to add the key to PuTTy's cache and continue connecting. If you want to carry on connecting just once, without adding the key to the cache, select No. If you don't trust this host, select Cancel to abandon the connection.
Change the SA password
The new virtual machine installs SQL Server with a random SA password. Reset this password before you connect to SQL Server with the SA login.
After connecting to your Linux VM, open a new command terminal.
Change the SA password with the following commands:
Enter a new SA password and password confirmation when prompted.
Restart the SQL Server service.
Bash
sudo systemctl start mssql-server
Add the tools to your path (optional)
Several SQL Server packages are installed by default, including the SQL Server command-line Tools package. The tools package contains the sqlcmd and bcp tools. For convenience, you can optionally add the tools path, /opt/mssql-tools/bin/, to your PATH environment variable.
Run the following commands to modify the PATH for both login sessions and interactive/non-login sessions:
If you need to remotely connect to SQL Server on the Azure VM, you must configure an inbound rule on the network security group. The rule allows traffic on the port on which SQL Server listens (default of 1433). The following steps show how to use the Azure portal for this step.
Savjet
If you selected the inbound port MS SQL (1433) in the settings during provisioning, these changes have been made for you. You can go to the next section on how to configure the firewall.
In the portal, select Virtual machines, and then select your SQL Server VM.
In the left navigation pane, under Settings, select Networking.
In the Networking window, select Add inbound port under Inbound Port Rules.
In the Service list, select MS SQL.
Click OK to save the rule for your VM.
Open the firewall on RHEL
This tutorial directed you to create a Red Hat Enterprise Linux (RHEL) VM. If you want to connect remotely to RHEL VMs, you also have to open up port 1433 on the Linux firewall.
This learning path provides an overview for deploying common Linux server functions on Azure virtual machines. Learn how to deploy a SQL Server, a web application server using the MEAN stack, perform a database migration, and manage your IT operations with Azure Automanage.
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Learn about how to run full SQL Server editions on Azure Virtual Machines for Linux. Get direct links to all Linux SQL Server VM images and related content.