suse安装sqlserver2017
1、下载 Microsoft SQL Server 2017 SLES 存储库配置文件:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/mssql-server-2017.repo
2、刷新您的存储库。
sudo zypper --gpg-auto-import-keys refresh
3、安装(需要放入安装盘)
sudo zypper install -y mssql-server
Additional rpm output:
/var/tmp/rpm-tmp.fOdq0D: line 5: /etc/security/limits.d/99-mssql-server.conf: No such file or directory
touch: cannot touch ‘/var/lib/rpm-state/mssql-sqlagent-disable’: No such file or directory
4、设置密码选择版本
sudo /opt/mssql/bin/mssql-conf setup
systemctl status mssql-server
安装 SQL Server 命令行工具
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/prod.repo
sudo zypper --gpg-auto-import-keys refresh
先安装unixODBC
sudo zypper install -y mssql-tools unixODBC
echo ‘export PATH=“
P
A
T
H
:
/
o
p
t
/
m
s
s
q
l
−
t
o
o
l
s
/
b
i
n
"
′
>
>
/
.
b
a
s
h
p
r
o
f
i
l
e
e
c
h
o
′
e
x
p
o
r
t
P
A
T
H
=
"
PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile echo 'export PATH="
PATH:/opt/mssql−tools/bin"′>> /.bashprofileecho′exportPATH="PATH:/opt/mssql-tools/bin”’ >> ~/.bashrc
source ~/.bashrc
chmod -R 777 /home/sqlserver2017
sqlcmd -S localhost -U sa -P Oraps123
CREATE DATABASE test ON ( NAME = test_data, FILENAME = ‘/home/sqlserver2017/test.mdf’, SIZE = 3, MAXSIZE = 5, FILEGROWTH = 1 ) LOG ON ( NAME = test_log, FILENAME = ‘/home/sqlserver2017/test.ldf’, SIZE = 3, MAXSIZE = 5, FILEGROWTH = 1 )
go