mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-03-10 07:30:28 +00:00
Fix: SQL Server 2022 | GPG & Install (#2476)
This commit is contained in:
parent
fa01cfd840
commit
031aefe05a
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: Kristian Skov
|
# Author: Kristian Skov
|
||||||
# License: MIT
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
catch_errors
|
||||||
@ -15,33 +14,30 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
curl \
|
curl \
|
||||||
mc \
|
mc \
|
||||||
sudo \
|
sudo \
|
||||||
gpg \
|
gpg \
|
||||||
coreutils
|
coreutils
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setup SQL Server 2022"
|
msg_info "Setup SQL Server 2022"
|
||||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
|
curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null
|
||||||
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | sudo tee /etc/apt/sources.list.d/mssql-server-2022.list
|
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list > /dev/null
|
||||||
#$STD curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
|
||||||
#$STD curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
|
|
||||||
$STD apt-get clean *
|
|
||||||
$STD apt-get update -y
|
$STD apt-get update -y
|
||||||
apt-get install -y mssql-server
|
$STD apt-get install -y mssql-server
|
||||||
msg_ok "Setup Server 2022"
|
msg_ok "Setup Server 2022"
|
||||||
|
|
||||||
msg_info "Installing SQL Server Tools"
|
msg_info "Installing SQL Server Tools"
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
export ACCEPT_EULA=Y
|
export ACCEPT_EULA=Y
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
curl -s https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null
|
||||||
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/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list > /dev/null
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y -qq \
|
$STD apt-get install -y -qq \
|
||||||
mssql-tools18 \
|
mssql-tools18 \
|
||||||
unixodbc-dev
|
unixodbc-dev
|
||||||
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
|
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
msg_ok "Installed SQL Server Tools"
|
msg_ok "Installed SQL Server Tools"
|
||||||
|
|
||||||
@ -53,7 +49,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Start Service"
|
msg_info "Start Service"
|
||||||
systemctl enable -q --now mssql-server
|
systemctl enable -q --now mssql-server
|
||||||
msg_ok "Service started"
|
msg_ok "Service started"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
Reference in New Issue
Block a user