SQL Server on Linux Mint

2019-09-18 08:15发布

I'm trying to install SQL Server vNext on Linux Mint. when i run setup, I get the following error. any help would be highly appreciated.

Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' 
on object at path /org/freedesktop/systemd1/unit/mssql_2dserver_2eservice

1条回答
别忘想泡老子
2楼-- · 2019-09-18 08:22

Installing SQL Server on Linux Ubuntu 16.04 or Linux mint 18:

You should install Microsoft odbc driver on your Linux, when you want to remote to a SQL server on any other operation system or work with sqlcmd (that it's support SQL server instructions).

Microsoft ODBC Driver 13.1

First of all, you need to be super user:

sudo su

Then, add Microsoft packages repository to your own Linux.

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list >/etc/apt/sources.list.d/mssql-release.list

After that, exit from super user login.

exit

Update your aptitude package list cache.

sudo apt-get update

Install msodbcsql package. This is your Microsoft odbc driver.

# sudo ACCEPT_EULA=Y apt-get install msodbcsql

sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.0.1.0-1 #mssql-tools-14.0.2.0-1

sudo apt-get install unixodbc-dev-utf16 #this step is optional but recommended*

If you want to remotely connect to a SQL server on any other operating system (like windows), you can use only odbc driver. But, if you want to install sql server on your own Linux and using it, you should type this following commands:

# optional: for bcp and sqlcmd

sudo ACCEPT_EULA=Y apt-get install mssql-tools

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

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

source ~/.bashrc

# optional: for unixODBC development headers

sudo apt-get install unixodbc-dev

Note: Also, you can install odbc driver version 13. but, install one these driver on your Linux operating system, because your Linux probably can't handle which one should be working on SQL server.

Microsoft ODBC Driver 13 for SQL Server:

sudo su 

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

exit

sudo apt-get update

sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.0.1.0-1 mssql-tools-14.0.2.0-1

sudo apt-get install unixodbc-dev-utf16 #this step is optional but recommended*

Create symbolic links for tools

These links make you to able run easily sqlcmd and bcp:

sudo ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd 
sudo ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp

Finalization step:

Install dependencies at first:

sudo apt-get install unixodbc-dev
sudo apt-get install unixodbc 
sudo apt-get install libc6 libstdc++6 libkrb5-3 libcurl3 openssl debconf 

Offline installation

If online installation not working, do offline installation:

wget -c "http://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/msodbcsql_13.1.9.0-1_amd64.deb"

sudo apt-get install libc6 libstdc++6 libkrb5-3 libcurl3 openssl debconf 

sudo dpkg -i msodbcsql_13.1.9.0-1_amd64.deb

Changing config files:

Change "/etc/odbc.ini":

sudo nano /etc/odbc.ini

Paste these lines into above file.

[dbserverdsn]

Driver=/usr/local/easysoft/oracle/InstantClient112/libsqora.so.11.1

Server = 192.168.100.10

Port = 1433

TDS_Version = 4.2

Change "/etc/odbcinst.ini":

sudo nano /etc/odbcinst.ini

Paste these lines into above file.

[ODBC]

Trace = Yes

TraceFile = /dev/stdout

For more information or other distribution, go to Reference site on Microsoft.

Reference:

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server

查看更多
登录 后发表回答