Update sqlserver2022-install.sh
Some checks are pending
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions

This commit is contained in:
CanbiZ 2025-01-22 08:57:51 +01:00 committed by GitHub
parent eefbbdf4df
commit 8303f61647
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,19 +22,26 @@ $STD apt install -y \
coreutils
msg_ok "Installed Dependencies"
msg_info "Installing SQL Server 2022"
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
msg_info "Get SQL Server 2022 Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg
echo "deb [signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list main" >/etc/apt/sources.list.d/mssql-server-2022.list
$STD apt-get clean *
$STD apt-get update -y
$STD apt-get install -y mssql-server
/opt/mssql/bin/mssql-conf setup
msg_ok "Installed SQL Server 2022"
msg_ok "Get SQL Server 2022 Repository"
read -r -p "Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
/opt/mssql/bin/mssql-conf setup
else
msg_ok "Skipping SQL Server setup. You can run it later with '/opt/mssql/bin/mssql-conf setup'."
fi
msg_info "Installing SQL Server Tools"
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg
echo "deb [signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/config/ubuntu/22.04/prod.list main" \
> /etc/apt/sources.list.d/mssql-release.list
$STD apt-get update
$STD apt-get install -y \
mssql-tools18 \