Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the MSSQL Server on Linux preview

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "MSSQL Server on Linux preview version how to install", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "MSSQL Server on Linux preview version how to install" this article.

Text

First, let's take a look at the system versions currently supported by MSSQL Server on Linux:

Red Hat Enterprise Linux7.2Get RHEL 7.2Ubuntu16.04Get Ubuntu 16.04Docker Engine1.8+Get Docker

I mainly used Ubuntu16.10 and Ubuntu14.04 (installation failed, later on the reason) to install.

Let's talk about the installation steps:

1. Enter the following command to get root permissions:

Sudo su

two。 Then import the common library GPG key:

Curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add-

An error may be reported here (passed omission), as follows:

We need to install curl first with the following command:

Apt install curl

After the installation, continue to execute the above statement, and the successful result is shown in the figure:

3. The command to register the Microsoft SQL Server Ubuntu repository is as follows:

Curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list > / etc/apt/sources.list.d/mssql-server.list

The successful results are as follows:

4. Exit root user mode (whether you want to quit or not).

Exit

5. Download and install SQL Server with the following command:

Sudo apt-get updatesudo apt-get install-y mssql-server

The installation is complete when you see the following image:

6. After the installation is complete, run the configuration script and follow the prompts to configure the sa account with the following command:

Sudo / opt/mssql/bin/sqlservr-setup

7. Enter the password for your sa account, as shown in the figure:

The error message means: the password entered does not comply with the security policy, to put it bluntly.. Set your own complexity.. Some English, some symbols, some numbers.. It's all right.

Then you will be asked to enter your password a second time to confirm that it is consistent with the first time.

After success, the following figure appears:

Ask if you start SQL Servcie.. now Of course, so... Input: y

Then the following picture appears:

Ask if you turn it on (why does it feel like a family bucket.. .. Be poisoned. -- | |,)..

Of course it is also Y.

8. Verify that the server is up and running properly, as follows:

Systemctl status mssql-server

The following figure will appear for success:

Well, if all goes well, then our installation is complete. Let's talk about the pit I encountered. It's kind of FAQ?...

FAQ (sort of)

Can 1.Ubuntu14.04 be installed?

A: I failed to install anyway, because SQL SERVER needs Openssl version 1.0.2 or above to install, but Ubuntu14.04 can only install version 0.9.8. I have tried a mandatory upgrade and can only say.. But with eggs..

two。 An error was prompted during installation:

ERROR: This machine must have at least 3.25gigabytes of memory to install Microsoft (R) SQL Server (R).

Dpkg: error processing archive / tmp/apt-dpkg-install-wEgZAd/13-mssql-server_14.0.1.246-6_amd64.deb (--unpack):

Subprocess new pre-installation script returned error exit status 1

Errors were encountered while processing:

/ tmp/apt-dpkg-install-wEgZAd/13-mssql-server_14.0.1.246-6_amd64.deb

E: Sub-process / usr/bin/dpkg returned an error code (1)

A: SQL Server needs the memory of 3.25GB to install, so Sunian. Upgrade your configuration.

3. How do I connect my installed SQL Server?

Answer: very simple, the official provides the operation tool, actually is our commonly used SQL Server Management Studio (SSMS), free, powerful, easy to use, graphical interface, the size is about 1G

Click on me to jump to the official address to download SQL Server Management Studio

4. I want to be tall and cool. How about doing it yourself without a graphical interface?

A: yes, please click me to enter the official tutorial.

5. After I create a table, what if there is garbled code in the inserted data?!

Answer: right-click your library with the SSMS tool-> Properties-> options-> collation-> Select Chinese-PRC-BIN

6. How do I change the default collation?

A: on your linux server, enter the command:

Sudo / opt/mssql/bin/mssql-conf set-collation

Enter YES

Enter Chinese_PRC_BIN

Wait for the modification to be completed

Enter the restart instruction, as follows:

Sudo systemctl restart mssql-server

You can do it.

7. Does the current ORM support it? can ADO.NET connect?.

A: I tried it with EF6.0. In the case of DBFirst, the entity cannot be mapped, but it can be accessed by executing the SQL statement directly, so we can confirm that there is no problem with 2: 00. CodeFirst and ADO.NET.

As shown in the figure:

The above is all the contents of the article "how to install the preview version of MSSQL Server on Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report