Install Swarm on CentOS/RHEL 7

Important
Note
  • Swarm can be connected to Helix Core Servers (P4D) and commit servers.
  • To configure Swarm to connect to more than one Helix Core Server (P4D), see Multiple Helix Core Server instances.

    To configure Swarm to connect to a Helix Core Server configured to use commit-edge architecture, see Commit-edge deployment.

  • Swarm must not be connected to Helix Broker, Helix Proxy, Helix Edge, forwarding replica, or read-only replica servers.

Installation

Important
  1. Configure the Perforce package repository, on the server to host Swarm and on the server hosting your Helix Core Server.

    Important

    If the server hosting your Helix Core Server cannot use packages, for example when it is running Windows, skip this step on that server.

    As root, create the file /etc/yum.repos.d/perforce.repo with the following content:

    [Perforce]
    name=Perforce
    baseurl=http://package.perforce.com/yum/rhel/7/x86_64/
    enabled=1
    gpgcheck=1
  2. Import the Perforce package signing key, on the server to host Swarm and the server hosting your Helix Core Server.

    Important

    If the server hosting your Helix Core Server cannot use packages, for example when it is running Windows, skip this step on that server.

    Run the following command as root:

    rpm --import https://package.perforce.com/perforce.pubkey

    For information about how to verify the authenticity of the signing key, see: https://www.perforce.com/perforce-packages

  3. Install the main Swarm package on the server to host Swarm (run these commands as root):

    1. Deploy the epel-release-latest-7.noarch.rpm repository configuration package to give Swarm access to EPEL packages:
    2. yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    3. Deploy the Remi repository configuration package to give Swarm access to PHP 7.x (only required the first time you upgrade to PHP 7.x):
    4. yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

      Tip

      If you don't deploy the Remi repository, you will see dependency errors when you do the next steps.

    5. Install the yum-utils package to give access to the yum-config-manager command:
    6. yum install yum-utils

    7. RHEL only: Enable the optional channel for some dependencies:
    8. subscription-manager repos --enable=rhel-7-server-optional-rpms

    9. Install the Default/Single version of PHP:
      1. Disable remi-php*:
      2. yum-config-manager --disable 'remi-php*'

      3. Enable PHP 7.4:
      4. yum-config-manager --enable remi-php74

      5. Run an upgrade for PHP:
      6. yum update

    10. Install Swarm and accept the prompts to import the GPG keys for Remi and EPEL when requested:
    11. yum install helix-swarm

      Important

      When the Swarm installation has completed, you are prompted to run the configure-swarm.sh post-installation script.

      Do not run this script until you have completed the rest of these Installation instructions. Instructions for running the configure-swarm.sh post-installation script are in the Post-Installation configuration section referenced in the final step of the Installation instructions.

      Note

      The firewall configuration may need to be adjusted to allow access to the web server.

      sudo firewall-cmd --permanent --add-service=http
      sudo systemctl reload firewalld

      If you subsequently wish to enable HTTPS, run (as root):

      sudo firewall-cmd --permanent --add-service=https
      sudo systemctl reload firewalld

  4. Swarm needs to know about some Helix Core Server events to operate correctly. Use Helix Core Server Extensions (recommended) or Helix Core Server Triggers to notify Swarm about these events. The Swarm Helix Core Server extension can be installed automatically by the Swarm configure-swarm.sh post-installation script, but Triggers must be manually installed. To use Helix Core Server Extensions, ignore this step and skip to the next step.

    Trigger installation only (not recommended): Install the Swarm triggers package on the server hosting your Helix Core Server. This might be the server hosting Swarm or elsewhere on your network.

    Important
    • If the server hosting your Helix Core Server cannot use packages, for example when it is running Windows, you need to copy the appropriate Swarm trigger script from /opt/perforce/swarm/p4-bin/scripts to the server hosting your Helix Core Server. The swarm-trigger.pl is for both Linux and Windows systems. Once copied, the trigger script needs to be configured. See Installing Triggers for details.

    • The package installs a config file at /opt/perforce/etc/swarm-trigger.conf that you will need to modify. See Installing Triggers for more details on configuring that file.

    Install the Swarm triggers package on the server hosting your Helix Core Server (run this command as root):

    yum install helix-swarm-triggers

  5. Optional: Install the Swarm optional package, on the server hosting Swarm.

    While not required, installing this package installs the dependencies required to use the ImageMagick and LibreOffice Swarm modules. These modules provide previews of a variety of image and office documents. Run this command as root:

    yum install helix-swarm-optional

  6. Complete the Post-installation configuration steps.