CentOS Linux Üzerine MSSQL Server Nasıl Kurulur?

CentOS Linux Üzerine MSSQL Server Nasıl Kurulur?

1286 Görüntülenme
0
1

CentOS Linux Üzerine MSSQL Server Nasıl Kurulur?

(How to Install Microsoft SQL Server On CentOS Linux)

 

CentOS nedir?

CentOS (Community Enterprise Operating System), Red Hat Enterprise Linux (RHELL) kaynak kodları üzerine temellendirilmiş ve bu dağıtımla uyumlu Linux dağıtımıdır. X86 Pae ve X86-64 mimarili işlemciler üzerinde çalışabilen CentOS işletim sistemini günümüz itibariyle sunucularda en çok kullanılan ve tercih edilen Linux işletim sistemlerinden biridir.

MSSQL kurulumu için ilk önce aşağıdaki komut çalıştırılarak, MSSQL reposu sistemimize indirilir.

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

curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/msprod.repo

 

Repo sistemimize indirildikten sonra aşağıdaki komutu çalıştırabiliriz. Bu komut ile MSSQL ürününü sisteminize install etmekteyiz.

yum -y install mssql-server mssql-tools unixODBC-devel

 

Kurulum tamamlandıktan sonra aşağıdaki işlemleri sırası ile yapmalıyız.

/opt/mssql/bin/mssql-conf setup 


 

Choose an edition of SQL Server:
  1) Evaluation (free, no production use rights, 180-day limit)
  2) Developer (free, no production use rights)
  3) Express (free)
  4) Web (PAID)
  5) Standard (PAID)
  6) Enterprise (PAID)
  7) Enterprise Core (PAID)
  8) I bought a license through a retail sales channel and have a product key to enter.

 
Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

 
Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

 
# select an edition you'd like to use
Enter your edition(1-8): 2
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409

 
The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

 
# agree to the license
Do you accept the license terms? [Yes/No]:y

 
# set admin password
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...

 
Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to 
  /usr/lib/systemd/system/mssql-server.service.
Setup has completed successfully. SQL Server is now starting.

 

[root@dlp ~]# 

systemctl status mssql-server 


 

*  mssql-server.service - Microsoft SQL Server Database Engine
   Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-10-05 19:24:33 JST; 50min ago
     Docs: https://docs.microsoft.com/en-us/sql/linux
 Main PID: 1472 (sqlservr)
   CGroup: /system.slice/mssql-server.service
           +--1472 /opt/mssql/bin/sqlservr
           +--1493 /opt/mssql/bin/sqlservr

 
Oct 05 19:24:38 dlp.srv.world sqlservr[1472]: 2017-10-05 19:24:38.50 spid11s....
Hint: Some lines were ellipsized, use -l to show in full.

 

[root@dlp ~]# 

echo 'export PATH=$PATH:/opt/mssql-tools/bin' > /etc/profile.d/mssql.sh 


[root@dlp ~]# 

source /etc/profile.d/mssql.sh 

 

Kurulum tamamlanmıştır.

Test işlemi için aşağıdaki komutu kullanabiliriz. Ayrıca MSSQL Server Management Studio ile de bağlantı kurabilirsiniz.

sqlcmd -S localhost -U SA 

Password:   

# admin password you set


 

 

# show system databases

1> select name,database_id from sys.databases;

2> go

name          database_id

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

master                  1

tempdb                  2

model                   3

msdb                    4

 

Faydalı olması umuduyla...

İyi çalışmalar

M.Burçin Danacı

DMS Infrastructure System Administrator

UNILEVER

Yorum Yap

Kategoriler