1. CentOS 7.3 must be recommended for RHEL 7.3 or 7.4
2. Input Su in terminal enter root password as prompted
3. Download the Microsoft SQL Server Red Hat repository configuration file:
sudo curl-o/etc/yum.repos.d/mssql-server.repo Https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
4. Install SQL Server by running the following command:
sudo yum install-y mssql-server
5. After running the package installation, MSSQL conf install and follow the prompts to set the SA password and select your version.
sudo/opt/mssql/bin/mssql-conf Setup
6. The Fifth Step command execution will prompt an error: the following
Sqlservr:this program requires a and at least 3250 megabytes of memory.
7. Execute the command (change 3.25G to 512M)
cd/opt/mssql/bin/# mv sqlservr sqlservr.old# Pythona = open ("Sqlservr.old", "RB"). Read () b = A.replace ("\x80\x10\xb7\xc1 "," \x00\x80\x84\x1e ") Open (" sqlservr "," WB "). Write (b) (after completion ctrl+d) # chmod +x sqlservr
8. Re-execute the Fifth Step command (the first tip is to choose what version 2 is for the board, the second tip is to select the language 10 is Chinese, the third prompt for the input sa password waits to complete)
sudo/opt/mssql/bin/mssql-conf Setup
9. After the configuration is complete, verify that the service is running:
Systemctl Status Mssql-server
10. See this picture congratulations on your success.
11.Linux Open port 1433 is not remotely connected.
sudo firewall-cmd--zone=public--add-port=1433/tcp--permanentsudo firewall-cmd--reload
Next, you can follow the Microsoft documentation to install the SQL command-line tool that has been tested locally.
Microsoft: Https://docs.microsoft.com/zh-cn/sql/linux/quickstart-install-connect-red-hat
Linux environment installs SQL Server (cracked 3.25G memory limit)