Installing Squore

Linux

Before installing Squore on a Linux platform, verify that all prerequisites are met, as described in Software Requirements.

The latest version of Squore installation package can be downloaded from Vector website’s Download Center.

Then proceed with the following:

  1. Extract the installation package into the location where you want to install Squore server. For example:

    tar -xf ~/Downloads/squore-26.0.0-linux-x86_64.tar.xz -C /opt/squore
  2. Install Squore by executing command:

    <SQUORE_HOME>/bin/install <SQUORE_DATA>

    See install(1) manpage for the full list of options.

Do not run the installation script as root, as this causes the installation of PostgreSQL to fail. And make sure that the user installing and running Squore has read and write access to the necessary locations.

Where <SQUORE_HOME> is the folder containing the application files, usually squore-server. And <SQUORE_DATA> is the folder containing data files, usually squore-data.

If you use all the default settings, the installer will deploy Squore components in the following locations:

  • The application files in <SQUORE_HOME> folder.

  • The data files in <SQUORE_DATA> folder, where:

    • <SQUORE_DATA>/archive is the default archives directory.

    • <SQUORE_DATA>/backup is the default backup directory.

    • <SQUORE_DATA>/cluster is the database cluster directory.

    • <SQUORE_DATA>/file-repository is the project file repository directory.

    • <SQUORE_DATA>/projects is the project data directory.

    • <SQUORE_DATA>/workspace is the configuration workspace directory.

  • The temporary files in /tmp/squore by default.

The installation script will allocate a certain amount of memory for the database to run properly on your system. If this is outside the limits of your system, you will get an error message suggesting to, either tune your system (kernel.shmall or kernel.shmax settings) or use the appropriate options to reduce memory requirement.

Docker

To successfully use the Squore image, make sure you have a container engine like Docker or Podman.

To pull the image and get the setup instructions, you can go to the official Vector’s Docker hub.

To set a license server or use a remote database, use the environment variables listed in Auto configuration via environment variable.

All the dependencies required to run both the Squore server and the PostgreSQL database are included in the container.

Windows

Before installing Squore on a Windows platform, verify that all prerequisites are met, as described in Software Requirements.

The latest version of Squore installation package can be downloaded from Vector website’s Download Center.

Then proceed with the following:

  1. Extract the installation package into the location where you want to install Squore server. For example:

    tar -xf %USERPROFILE%\Downloads\squore-26.0.0-windows-x86_64.zip -C C:\Vector\SQUORE
  2. Install Squore by executing command:

    <SQUORE_HOME>\bin\start.bat <SQUORE_DATA>

Where <SQUORE_HOME> is the folder containing the application files, usually squore-server. And <SQUORE_DATA> is the folder containing data files, usually squore-data.

If you use all the default settings, the installer will deploy Squore components in the following locations:

  • The application files in <SQUORE_HOME> folder.

  • The data files in <SQUORE_DATA> folder, where:

    • <SQUORE_DATA>\archive is the default archives directory.

    • <SQUORE_DATA>\backup is the default backup directory.

    • <SQUORE_DATA>\cluster is the database cluster directory.

    • <SQUORE_DATA>\file-repository is the project file repository directory.

    • <SQUORE_DATA>\projects is the project data directory.

    • <SQUORE_DATA>\workspace is the configuration workspace directory.

  • The temporary files in <SQUORE_DATA>\temp by default.

Setting Squore as a Windows service

Apache Procrun can be used to wrap Squore as a Windows service and integrate it with the Windows Service Control Manager.

Since Squore is started via scripts and not as a single executable, the service is configured to launch the start.bat and stop.bat scripts using the Windows command interpreter (cmd.exe).

To create a Squore Windows service do as follows:

  1. Make sure that:

    • Squore is installed from a ZIP package.

    • prunsrv.exe, start.bat and stop.bat are available in the <SQUORE_HOME>\bin directory.

    • You have administrator privileges.

  2. Open Command Prompt as Administrator.

  3. Install the service by executing the command:

    <SQUORE_HOME>\bin\prunsrv.exe //IS//squore --DisplayName="Squore" --Classpath="<SQUORE_HOME>\lib\squore-control.jar" --Jvm="<JAVA_HOME>\bin\server\jvm.dll" --Startup=auto ++JvmOptions=-Xrs#-Dsquore.home.dir="<SQUORE_HOME>" --StartMode=jvm --StartClass=com.squoring.squore.control.SquoreControl ++StartParams=-W#start --StopMode=jvm --StopClass=com.squoring.squore.control.SquoreControl ++StopParams=stop

    Where:

    • //IS//, is the command used to create the service, it has to be followed by the name of the service.

    • --DisplayName, is the name that will be displayed in Windows Service Manager.

      The Windows service uses Apache Commons Daemon. Consult Apache Commons Daemon’s website for more information about the framework or the installation options.

  4. In the <SQUORE_HOME>\bin\start.bat script, add the service name from step 3 to the following variable:

    set SERVICE_NAME=squore
  5. In the <SQUORE_HOME>\bin\stop.bat script, add the service name from step 3 to the following variable:

    set SERVICE_NAME=squore

    Steps 4 and 5 guarantee that Squore server is started and stopped in the same manner, whether it is via the scripts or through the Windows Service Manager

Once Squore service has been set, you can manage it from the Service Manager as any other Windows service.

For advanced configuration of the Squore Windows service see Configuring Squore Service

Third-Party Plugins and Applications

End users can run third-party static code analysers or rule checkers that are not shipped with the Squore installer for licencing reasons. In this case, it is necessary to download the extra binaries and deploy them on the server.

The list of third party plugins to be downloaded separately is as follows:

  • Checkstyle

  • FindBugs

  • Cppcheck

  • PMD

  • Stylecop

Here is a full example of how to deploy Checkstyle into Squore

  1. Download the Checkstyle binary.

  2. Extract the contents of the zip file onto Squore server.

  3. Copy the bin folder of the extracted content into <SQUORE_HOME>/addons/tools/CheckStyle_auto.

If you have deployed some third-party tools on Squore server, they will automatically be downloaded to your client when you run the Squore agent command line.

For more information, refer to the Command Line Guide, which contains the full details about special installation procedures for Data Providers and Repository Connectors.