Installing SQL Server under Linux

Source: Internet
Author: User
Tags mssql

Take the CentOS 7 system as an example:

[Email protected]C7 ~]# cat/etc/redhat-release #系统版本

CentOS Linux release 7.1.1503 (Core)

[Email protected] ~]# firewall-cmd--state #查看firewall状态, close firewall

Running

[Email protected] ~]# systemctl stop firewalld.service #关闭

[Email protected] ~]# systemctl disable Firewalld.service #开机不启动

RM '/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service '

RM '/etc/systemd/system/basic.target.wants/firewalld.service '

[Email protected] ~]# systemctl disable Firewalld.service #开机不启动

[Email protected] ~]# firewall-cmd--state #已关闭firewall

Not running

[[email protected] yum.repos.d]# pwd #进入/etc/yum.repos.d download two yum source files

/etc/yum.repos.d

[Email protected] yum.repos.d]# wget https://packages.microsoft.com/config/rhel/7/mssql-server.repo

[Email protected] yum.repos.d]# wget https://packages.microsoft.com/config/rhel/7/prod.repo

[email protected] yum.repos.d]# Yum search MSSQL #查看源信息, there are already package information

Mssql-server.x86_64:microsoft (r) SQL Server (r) relational Database Engine

Mssql-server-ha.x86_64:microsoft (r) SQL Server (r) relational Database Engine

Mssql-tools.x86_64:tools for Microsoft (r) SQL Server (R)

.... Slightly

[Email protected] yum.repos.d]# yum install-y mssql-server mssql-tools #安装服务和工具

... Slightly

has been installed:

Mssql-server.x86_64 0:14.0.1.246-6

has been installed:

Mssql-tools.x86_64 0:14.0.1.246-1

[Email protected] ~]# cd/opt/mssql/bin/ #进入sql目录

[email protected] bin]# ls #下面有启动的文件

compress-dump.sh generate-core.sh mssql-conf sqlpackage sqlservr sqlservr-setup sqlservr-telemetry

[[email protected] bin]# ./sqlservr-setup #执行此文件, follow the prompts to set the password and other information

Microsoft (r) SQL Server (r) Setup


You can abort setup at anytime by pressing CTRL-C. Start this program

With the--HELP option for information on running it in unattended

Mode.


Please enter a password for the system administrator (SA) account: Set Password

Confirm the password for the system administrator (SA) account: Confirm password


Setting system Administrator (SA) account password ...


Does wish to start the SQL Server service now? [y/n]: Y Open service

Do I wish to enable SQL Server to start on boot? [y/n]: Y boot start service

Ln-s '/usr/lib/systemd/system/mssql-server.service '/etc/systemd/system/multi-user.target.wants/ Mssql-server.service '

Ln-s '/usr/lib/systemd/system/mssql-server-telemetry.service '/etc/systemd/system/multi-user.target.wants/ Mssql-server-telemetry.service '


Setup completed successfully.

[[email protected] bin]# systemctl status MSSQL

Mssql.service

Loaded:not-found (reason:no such file or directory)

Active:inactive (Dead)


[Email protected]C7 ~]# sqlcmd-s localhost-u SA

Password:

1> select Db_name ();

2> Go

--------------------------------------------------------------------------------------------------------------- -----------------

Master

View processes with high CPU and memory

# Ps-eo PID,PPID,CMD,%MEM,%CPU--sort=-%mem | Head

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/8A/FE/wKioL1hBF7exJXTKAACseqfCR4A730.jpg "title=" q1.jpg "alt=" Wkiol1hbf7exjxtkaacseqfcr4a730.jpg "/>


Reference from:

Https://docs.microsoft.com/zh-cn/sql/linux/sql-server-linux-setup-red-hat

Http://www.cnblogs.com/hengwei/p/6076199.html


This article is from the "Zhao Dongwei blog" blog, make sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1878802

Installing SQL Server under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.