Although the MSSQL for Linux has already come out, but originally did not intend so early to try, but still have to try to use, here are a few introduction I used MSSQL for Linux encountered problems, I have to say that as the first to eat crab people always have to pay some price, Really can encounter a variety of wonderful problems, this blog only describes how to install MSSQL for Linux, I still try to install on CentOS. The official website also has the installation procedure, also does not need too many explanations, I also only put the part, the step is as follows:
There are many ways to install services under Linux, the simplest is Yum installation, if you use Yum installation, we need to specify the installation warehouse, where we need to specify the Microsoft Yum Source:
These are the various versions of each MSSQL that Microsoft publishes.
First get Yum Source, command
Curl Https://packages.microsoft.com/config/rhel/7/mssql-server.repo >/etc/yum.repos.d/mssql-server.repo
Next Install MSSQL:
Yum Install-y mssql-server
Installation Complete:
See the version of SQL Server we have installed below
Rpm-qa | grep MSSQL
To view the path of the installation:
Find/-name MSSQL
We need to configure the installation of SQL Server through the prompts of MSSQL.
Configure the/opt/mssql/bin/mssql-conf for the specific configuration
We switch to the Bin folder
Cd/opt/mssql/bin
We can see all the files under the bin, we are going to use mssql-conf to configure MSSQL,./mssql-conf-h can view Help commands:
It is known that the SQL Server command that needs to be installed using the Setup command is:
./mssql.conf Setup
Perform the following steps:
Note that after confirming the password here, I am prompted here is the installation failed, because the use of MSSQL for Linux by default added memory limit, is 3250M, that is, the server is at least 3.5G memory, and my server only 2 G, not to meet the minimum requirements, Microsoft may be due to performance considerations, of course, the formal production environment is not likely to memory only a little bit, but for the people we usually want to play, but it becomes a problem, but to believe there is always a solution, I will write in another blog How to crack this limit, you can also see here to crack SQL Server For Linux preview 3.5GB memory limit (Rhel article), someone else's blog, I also learn others, but still will write, because many people may see blindfolded. There is also a point, after the installation, the reminder remaining days, it seems this MSSQL for Linux to charge. Let's start the SQL service.
Systemctl start Mssql-serversystemctl Enable Mssql-server
After this step, we also need to open 1433 ports.
Firewall-cmd--zone=public--add-port=1433/tcp--permanent
Firewall-cmd--reload
Ok, here we can use the Windows MSSQL Client to connect our MSSQL for Linux, the default username is sa account, password is the password you set
This is perfect, great, about how to use SQL server directly in CentOS, see here: CentOS 7.3 Linux for SQL Server installation and configuration introduction, this blog from this blog, It details how to install and configure the installation and use of SQL Server tools, but I have not been able to find the answer, sorry.
Microsoft SQL Server for Linux installation and configuration