1.설치
wget -P "/tmp" --no-check-certificate "https://packages.microsoft.com/config/rhel/8/mssql-server-2017.repo"
mv -f /tmp/mssql-server-2017.repo /etc/yum.repos.d/
wget -P "/tmp" --no-check-certificate "https://packages.microsoft.com/config/rhel/8/prod.repo"
mv -f /tmp/prod.repo /etc/yum.repos.d/msprod.repo
dnf -y install mssql-server
dnf -y install mssql-tools
dnf -y install unixODBC-devel
/opt/mssql/bin/mssql-conf setup
...
2) Developer (무료, 프로덕션 사용권 없음)
...
Developer로 선택하여 설치 진행.
2.profile에 환경변수 추가
vi ~/.bash_profile
---------------------------------------
# for Microsoft SQL
export MSSQL_HOME=/opt/mssql-tools
export PATH=$MSSQL_HOME/bin:$PATH
---------------------------------------
source ~/.bash_profile
데이터 디렉토리: /var/opt/mssql/data
chown -R mssql:mssql /var/opt
chown -R mssql:mssql /opt/mssql
chown -R mssql:mssql /opt/microsoft
3.테스트
sqlcmd -S localhost -U sa
Password:
1> SELECT 1;
2> GO
3> exit
4.systemd 설정
systemctl enable mssql-server.service