Before proceeding with the DACPAC file installation steps, unzip the 3CX Competitive Wallboard build and verify whether the DACPAC file exists in the following path.
   /opt/voiptools/3cx_competitive_wallboard/
   
- Verify that Database.dacpac file exists:
  ls -l /opt/voiptools/3cx_competitive_wallboard/*.dacpac   

Step 1: Go to root directory
   cd /opt
   
Step 2: Check if sqlpackage already exists
  /opt/sqlpackage/sqlpackage -?
  
- If you see usage/help text, then sqlpackage is already installed, skip to Step 8.
- If you see "No such file or directory", then continue with Step 3.
   
Step 3: If file not exist then Download latest sqlpackage for Linux
   wget https://aka.ms/sqlpackage-linux -O sqlpackage.zip
   
Step 4: Create a folder for sqlpackage
   mkdir sqlpackage
   
Step 5: Unzip the sqlpackage.zip to sqlpackage folder
   unzip sqlpackage.zip -d sqlpackage
    
Step 6: Give execute permissions
   chmod +x /opt/sqlpackage/sqlpackage
   
Step 7: Install required dependencies one after one
  apt-get update
  
  sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libunwind8

Step 8: Replace the placeholder values with your actual Your_SQL_Server_IP_or_Hostname, Your_Database_Name, Your_SQL_DB_Username and Your_SQL_DB_Password,
then execute the command below to install the DACPAC file.

   /opt/sqlpackage/sqlpackage \
    /Action:Publish \
    /SourceFile:"/opt/voiptools/3cx_competitive_wallboard/Database.dacpac" \
    /TargetServerName:"Your_SQL_Server_IP_or_Hostname" \
    /TargetDatabaseName:"Your_Database_Name" \
    /TargetUser:"Your_SQL_DB_Username" \
    /TargetPassword:"Your_SQL_DB_Password" \
    /p:AllowIncompatiblePlatform=true \
  /TargetTrustServerCertificate:true   

  
  
  Sample command:
 /opt/sqlpackage/sqlpackage /Action:Publish /SourceFile:"/opt/voiptools/3cx_competitive_wallboard/Database.dacpac" /TargetServerName:"Your_SQL_Server_IP_or_Hostname" /TargetDatabaseName:"3CX Competitive Wallboard" /TargetUser:"Your_SQL_User" /TargetPassword:"Your_SQL_Password" /p:AllowIncompatiblePlatform=true /TargetTrustServerCertificate:true


 -Execute the command single line in terminal.


Step 9: Verify Deployment
- If successful, you should see output like:
  Successfully published database.  

  - You can also verify by connecting to your SQL Server instance and checking if the database "Your_Database_Name" exists along with its tables and objects.
