mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 17:51:49 +00:00
Fix: SQL Server 2022 Install (#1669)
* Fix: SQL Server 2022 Install * Update sqlserver2022.json
This commit is contained in:
parent
8303f61647
commit
c5df1bbcea
@ -23,25 +23,17 @@ $STD apt install -y \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Get SQL Server 2022 Repository"
|
msg_info "Get SQL Server 2022 Repository"
|
||||||
mkdir -p /etc/apt/keyrings
|
$STD curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
|
||||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg
|
$STD curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
||||||
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 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 clean *
|
||||||
$STD apt-get update -y
|
$STD apt-get update -y
|
||||||
$STD apt-get install -y mssql-server
|
$STD apt-get install -y mssql-server
|
||||||
msg_ok "Get SQL Server 2022 Repository"
|
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"
|
msg_info "Installing SQL Server Tools"
|
||||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg
|
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/config/ubuntu/22.04/prod.list main" \
|
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
|
||||||
> /etc/apt/sources.list.d/mssql-release.list
|
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
mssql-tools18 \
|
mssql-tools18 \
|
||||||
@ -50,6 +42,13 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
|
|||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
msg_ok "Installed SQL Server Tools"
|
msg_ok "Installed SQL Server Tools"
|
||||||
|
|
||||||
|
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 "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"
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
"password":null
|
"password":null
|
||||||
},
|
},
|
||||||
"notes":[
|
"notes":[
|
||||||
|
{
|
||||||
|
"text":"if you not choose the install setup, execute: `/opt/mssql/bin/mssql-conf setup` in LXC shell.",
|
||||||
|
"type":"info"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"text":"You can setup the admin account 'SA' during installation",
|
"text":"You can setup the admin account 'SA' during installation",
|
||||||
"type":"info"
|
"type":"info"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user