2020-04-28 17:29:52 +02:00
|
|
|
---
|
|
|
|
title: "Installing mssql on centos 7"
|
|
|
|
date: 2019-07-09
|
2021-03-12 18:12:41 +01:00
|
|
|
description: How to install mssql on centos 7
|
|
|
|
tags:
|
|
|
|
- Centos
|
|
|
|
- rhel
|
|
|
|
- toolbox
|
2020-04-28 17:29:52 +02:00
|
|
|
---
|
|
|
|
|
2021-03-12 18:12:41 +01:00
|
|
|
## Disclaimer
|
|
|
|
|
|
|
|
I had to do this in order to help a friend, I do not think I would ever willingly put mssql in production unless I went crazy.
|
|
|
|
|
|
|
|
## Procedure
|
|
|
|
|
|
|
|
Here is how to setup mssql on a fresh centos 7
|
2023-04-23 22:33:49 +02:00
|
|
|
```sh
|
2020-04-28 17:29:52 +02:00
|
|
|
vi /etc/sysconfig/network-scripts/ifcfg-eth0
|
|
|
|
vi /etc/resolv.conf
|
|
|
|
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
|
|
|
|
curl -o /etc/yum.repos.d/mssql-prod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
|
|
|
|
yum update
|
|
|
|
yum install -y mssql-server mssql-tools
|
|
|
|
yum install -y sudo
|
|
|
|
localectl set-locale LANG=en_US.utf8
|
|
|
|
echo "export LANG=en_US.UTF-8" >> /etc/profile.d/locale.sh
|
|
|
|
echo "export LANGUAGE=en_US.UTF-8" >> /etc/profile.d/locale.sh
|
|
|
|
yum install -y openssh-server
|
|
|
|
systemctl enable sshd
|
|
|
|
systemctl start sshd
|
|
|
|
passwd
|
|
|
|
/opt/mssql/bin/mssql-conf setup
|
|
|
|
rm -f /etc/localtime
|
|
|
|
ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
|
|
|
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -p
|
2023-04-23 22:33:49 +02:00
|
|
|
```
|