This repository contains a Bash script that automates the installation of MSSQL Server and Azure Data Studio on Ubuntu 22.04 and Kali Linux.
The script will:
- Install MSSQL Server (Developer edition).
- Install MSSQL Tools (command-line tools).
- Install Azure Data Studio for GUI-based database management.
- Automate MSSQL Server configuration setup with predefined values.
Before running the script, ensure that:
- You are using Ubuntu 22.04 or Kali Linux.
- You have sudo privileges on your system.
- You replace the default password (
YourStrongPassword123!
) in the script with a secure password.
Clone this repository to your local machine:
git clone https://github.com/Cyb3R0xSASA/mssql-azure-install.git
cd mssql-azure-install
Open the install_mssql_azure.sh
script and replace the following values:
MSSQL_SA_PASSWORD="YourStrongPassword123!"
: Set this to a secure password for thesa
(System Administrator) account.MSSQL_PID="Developer"
: Choose the edition of MSSQL Server you want (Developer
,Express
, orEvaluation
).
Make the script executable by running:
chmod +x install_mssql_azure.sh
Execute the script with sudo privileges:
sudo ./install_mssql_azure.sh
In terminal
sqlcmd -S localhost -U sa -C
- Enter MSSQL_SA_PASSWORD that you write it in the script
In GUI
azuredatastudio
- Chose New then New connection
- Server localhost
- User name sa
- Password MSSQL_SA_PASSWORD that you write it in the script
- Automated Installation: Installs all required packages, dependencies, and tools in a single step.
- Predefined Setup: Configures MSSQL Server with predefined values, including accepting the license and setting the
sa
password. - MSSQL Tools: Installs the MSSQL command-line tools and adds them to the system's
PATH
. - Azure Data Studio: Downloads and installs Azure Data Studio for database management.
- The script adds the Microsoft repositories to your system and installs MSSQL Server and Azure Data Studio.
- It automates the MSSQL Server setup with predefined values, making it fully hands-free.
- Installs MSSQL Tools and adds them to the system's
PATH
for easy use from the command line.
- Password Security: The
sa
password is hardcoded in the script. Be sure to change it before running the script to ensure your database server is secure. - Manual Interactions: The script has been fully automated except for the
mssql-conf setup
step, which is now handled with predefined values.
If you encounter any issues during the installation, try the following:
-
Ensure that all required dependencies are installed before running the script.
-
If you run into package installation issues, try running the following command:
sudo apt-get -f install
-
For issues with missing packages during the installation of Azure Data Studio or MSSQL Server, run:
sudo apt-get update sudo apt-get install -f
Feel free to fork this repository, open issues, and submit pull requests. Contributions are welcome!
For any questions or feedback, feel free to reach out via the following channels:
- GitHub: https://github.com/Cyb3R0xSASA
- LinkedIn: s-a-s--a-