Lập Trình Linux

How to Install SQL Server on Linux CentOS 7 – SQL Server on Linux Tutorial




In this video we are going to learn how to install SQL Server on Linux Step by Step.
You will learn below items in this video
How to Configure SQL Server Repository
Download SQL Server Red Hat Repository configuration File
Install SQL Server using yum Command
Configure SQL Server and setup SA Password
Restart SQL Server services
Open Firewall port to allow remote connection to SQL Server
Enable and start SQL Server Agent Services
Download and Install SQL server Tools to connect to SQL Server
Connecting to SQL Server using SSMS 2017 with SQL Server Authentication

Scripts used in this video:

# Let’s check if mssql-server repository already exists?

sudo ls /etc/yum.repos.d | grep mssql-server.repo

# If it does, we need to check contents of this repository and remove that, otherwise we will face issues during the install

sudo cat/etc/yum.repos.d/mssql-server.repo

sudo rm -rf /etc/yum.repos.d/mssql-server.repo

# Configure and Download SQL Server Repository

sudo curl -o /etc/yum.repos.d/mssql-server.repo

# Install SQL Server using below commands

sudo yum install -y mssql-server

# Configure SQL Server and Setup SA password

sudo /opt/mssql/bin/mssql-conf setup

# Restart SQL Server Services

systemctl restart mssql-server

# Configure repository and install Sqlcmd and other Tools to internally connect to newly installed SQL Server

sudo curl -o /etc/yum.repos.d/msprod.repo

sudo yum install -y mssql-tools unixODBC-devel

#Set Environment Tools to your Path Environment

# Connect to SQL Server using sqlcmd tool

sqlcmd -S localhost -U SA -P Pass@123

# Connect to SQL Server Remotely using SQL Server Authentication

SSMS – Error and Resolution

# Enable Firewall port 1433

sudo firewall-cmd –zone=public –add-port=1433/tcp –permanent
sudo firewall-cmd –reload

# Enable and start SQL Server Agent services
sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true

install sql server on centos 7
install sql server 2017 on CentOS 7
install sql server management studio on linux

Nguồn:https://ftlinuxcourse.com/

Công Nghệ
Lọc dữ liệu nhiều điều kiện trong Excel và A-Tools dễ dàng trong 2 phút
Tin HOT
Chê chỗ cách ly nóng, Vũ Khắc Tiệp bị Khắc Việt chửi là “con đàn bà”
Lập Trình Linux
Part 8 – Xây Dựng System Tấn Công Web Server, Pen-Testing, CGI & Bash Vulnerabilities,Shell Shock
  • mssql-server.service – Microsoft SQL Server Database Engine

    Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)

    Active: failed (Result: start-limit) since Mon 2019-06-17 21:46:01 +03; 3h 3min ago

    Docs: https://docs.microsoft.com/en-us/sql/linux

    Process: 4354 ExecStart=/opt/mssql/bin/sqlservr (code=killed, signal=ABRT)

    Main PID: 4354 (code=killed, signal=ABRT)


  • hi, I try this on centos7.6.1810 with sql server 2017, but I got a error, how can I fix it, thank u very much!
    The following diagnostic information is available:

    Reason: 0x00000001
    Signal: SIGABRT – Aborted (6)
    Stack:
    IP Function
    —————- ————————————–
    00005651e17064dd malloc_usable_size+0xaec3d
    00005651e17060b7 malloc_usable_size+0xae817
    00005651e1704fac malloc_usable_size+0xad70c
    00007f63a41a2280 __restore_rt+0x0
    00007f63a41a2207 gsignal+0x37
    00007f63a41a38f8 abort+0x148
    00007f63a41e4d27 __libc_message+0x3d7
    00007f63a41ed489 _int_free+0x519
    00007f6397b8dd10 ASN1_STRING_free+0x30
    00007f6397b994bd ASN1_primitive_free+0x9d
    00007f6397b997ff ASN1_template_free+0x9f
    00007f6397b996a2 asn1_item_combine_free+0x1a2
    00007f6397b997ff ASN1_template_free+0x9f
    00007f6397b996a2 asn1_item_combine_free+0x1a2
    00007f6397b997ff ASN1_template_free+0x9f
    00007f6397b996a2 asn1_item_combine_free+0x1a2
    00007f6397b99745 ASN1_item_free+0x15
    00005651e169ddfd malloc_usable_size+0x4655d
    00005651e169ca94 malloc_usable_size+0x451f4
    00005651e1689193 malloc_usable_size+0x318f3
    00005651e1688e5f malloc_usable_size+0x315bf
    Process: 26281 – sqlservr
    Thread: 26414 (application thread 0x1f8)
    Instance Id: 5d72fe18-7e53-40f3-bee1-9b9c1bdf0633
    Crash Id: 912be222-ab1a-47f4-96ac-15a275971acd
    Build stamp: e52a9af574c8708cec553d9ab7a9d76e9fc63767b949db57f564c7871cda784a
    Distribution: CentOS Linux 7 (Core)
    Processors: 16
    Total Memory: 33735180288 bytes
    Timestamp: Thu Jun 6 15:16:06 2019

    CentOS Linux 7 (Core)
    Capturing core dump and information to /var/opt/mssql/log…
    Hint: You are currently not seeing messages from other users and the system.
    Users in the 'systemd-journal' group can see all messages. Pass -q to
    turn off this notice.
    No journal files were opened due to insufficient permissions.
    Hint: You are currently not seeing messages from other users and the system.
    Users in the 'systemd-journal' group can see all messages. Pass -q to
    turn off this notice.
    No journal files were opened due to insufficient permissions.
    /usr/bin/tail: cannot open ‘/var/log/messages’ for reading: Permission denied
    Attempting to capture a dump with paldumper
    Captured a dump with paldumper
    /usr/bin/find: ‘/usr/libexec/initscripts/legacy-actions/auditd’: Permission denied
    /usr/bin/find: ‘/usr/share/polkit-1/rules.d’: Permission denied
    Core dump and information are being compressed in the background. When
    complete, they can be found in the following location:
    /var/opt/mssql/log/core.sqlservr.06_06_2019_15_16_06.26281.tbz2
    Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
    in /var/opt/mssql/log for more information.


  • I have issue in SSRS. when i do export to excel am facing performance issue. is there any way to tune this? could someone please help?


  • Great video and very informative