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

The installation and configuration method of SQL Server under Centos7.3

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "Centos 7.3 SQL Server installation configuration method", in daily operation, I believe many people in Centos 7.3 SQL Server installation configuration method problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "Centos 7.3 SQL Server installation configuration method" doubts help! Next, please follow the small series to learn together!

Install SQL Server to Centos 7.3

Official Document: docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat

OS Requirements:

cat /etc/redhat-release

1. Set yum installation source

curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo

2. Install Mssql server

yum install -y mssql-server

3. View version and installation path

rpm -qa | grep mssqlfind / -name mssql

4. Configure SQL Server Management Account

cd /opt/mssql/bin./ mssql.conf setup

(Mssql-server must be stopped to configure)

start the service

systemctl start mssql-serversystemctl enable mssql-server

5. Set up firewall

firewall-cmd --add-port='1433/tcp' --permanentfirewall-cmd -reload

Install Command Line Management Tools

1. Install local client command line tools

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repoyum install -y mssql-tools

2. Configure the SqlCmd environment variable

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profileecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrcsource ~/.bashrc

3. View database status

systemctl status mssql-server

If startup is unsuccessful view log information:

journalctl -u mssql-server.service -b

4. Connect to database

sqlcmd -S localhost -U SA -P ''

5. Create database and query

CREATE DATABASE DataTest;GOSELECT Name from sys.Databases;GO

General database operations (creating tables, inserting data, querying data)

At this point, about "Centos 7.3 SQL Server installation configuration method" learning is over, I hope to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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

Database

Wechat

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

12
Report