Installing Service Virtualization on Linux

There are two options of installing Service Virtualization on Linux: RPM or TAR. The RPM is for systems supporting RPM such as Red Hat, CentOS or Oracle Linux. The TAR option is for situations when RPM cannot be used.

Prerequisites

Before installing Service Virtualization on Linux, you must have the following installed on your machine:

The most ideal way to install these packages, is to use the package manager provided by your Linux distribution. Installing .NET Core may require additional steps.

Installation on Linux

  • For RPM: Install the server using the yum command yum install sv-server-*.rpm. This will install Service Virtualization to directory /opt/microfocus/sv-server.
  • For TAR: Go to directory where Service Virtualization should be installed and expand the archive there using tar zxf sv-server-*.tar.gz. It will create a directory sv-server-VERSION.

Back to top

Post-installation steps on Linux

In the following section, we use relative names for the folders. For example:

For RPM: bin refers to /opt/microfocus/sv-server/bin.

For TAR: bin refers to user/directory/sv-server-VERSION/bin. the user/directory is the directory to which you extracted the TAR file. sv-server-VERSION is created by tar itself. For example, VERSION will be 5.00.3826.52046 when the package is sv-server-5.00.3826.52046.tar.gz.

Configurations

Perform the following configurations:

  1. For TAR: Run the setup.sh script from installation directory. It will create working directories, generate password encryption seed and also generate self-signed certificates for SSL (You can replace these with your own later).

  2. If you plan to use SAP, you need to install the SAP Java Connector libraries, sapjco3.jar and libsapjco3.so, into the bin directory. You will also need to update /etc/services as required by SAP client libraries.
  3. Configure database using the sv-ConfigTool. Run:

    sv-ConfigTool db-setProperties server <dbType> <datasource> <properties> <dbName> SqlAuth <username> <password>.

    Alternatively you can edit the bin/HP.SV.StandaloneServer.database.config file.

  4. Configure the license server in bin/HP.SV.StandaloneServer.dll.config. Search for licenseServer, uncomment the XML tag, and enter your license server URL.
  5. To replace the automatically generated self-signed certificates with your own, do so in work/certificates. You need to provide a private key and certificate in PEM and P12 formats, and also the private key password in a text file.
  6. If you are using Red Hat-based Linux, you may need to disable SELinux (enabled by default in Enforcing mode) and the firewall, as these features prevent Service Virtualization from starting and working properly. Possible options include:

    To permanently set Permissive mode for SELinux:
    1. In /etc/selinux/config, set SELINUX=permissive.

    2. Save and reboot the machine.

    To temporarily set Permissive mode for SELinux:

    1. Run: setenforce 0

    2. Verify the change by running: getenforce

    Note: To restore Enforcing mode, run setenforce 1 or reboot the machine.

    To temporarily turn off the firewall:

    Run: systemctl stop firewalld

    To disable the firewall:
    (prevents automatic start)

    Run: systemctl disable firewalld

  7. Set up authentication.

    Simple authentication

    Add all users to the work/users.txt file.

    (Default)

    LDAP authentication

    Configure SV Server and SVM to use LDAP authentication. For details, see Basic or LDAP Authentication.

    It is recommended that you use LDAP.

Systemd services

For TAR: To install SV server and SVM as systemd services, perform the following additional steps:

  1. Create a user under which the services will run. Using the default name in the service files, sv-server, the command would be:

    /usr/sbin/useradd -c "SV Server" -s /sbin/nologin -r -d /path/to/sv-server sv-server

  2. Give the new user ownership to the work directory:

    chown -R sv-server.sv-server work

  3. (Optional) Set work permissions for user only so that no other user can see the private files, such as certificates:

    chmod -R go-rwx work

  4. Copy sv-server.service and sv-svm.service to the /usr/lib/systemd/system directory.

Note: If you installed the server or SVM to run under a specific user, do not run it as root or a different user. This will cause conflicts with file permissions and will prevent the server from starting properly in the future.

Back to top

Starting and stopping Service Virtualization on Linux

This section describes how to start the various services of Service Virtualization on a Linux machine.

Note: Integration with Linux is part of the Early access features.

Service Virtualization Server service

To start and stop the Service Virtualization Server service:

To: Installed as a service Run from command line
Start the service:

systemctl start sv-server

sv-StandaloneServer

Stop the service:

systemctl stop sv-server

Press Enter or Ctrl-C

Service Virtualization Management service

To start and stop the Service Virtualization Management service:

To: Installed as a service Run from command line
Start the service:

systemctl start sv-svm

sv-ServiceVirtualizationManager

Stop the service:

systemctl stop sv-svm

Press Enter or Ctrl-C

Back to top

Directories on Linux

During installation, files are installed in the following directories. They are relative to installation directory (/opt/microfocus/sv-server for RPM and /user/custom/directory/sv-server-VERSION for TAR).

Directory Description

bin

Contains executable files and app config files (the Service Virtualization Server's configuration file), Spring configuration files, etc.

bin/SvmRoot

Contains executable files and app config files for Service Virtualization Manager.

work

Contains various configuration and temporary files.

work/certificates

Contains certificates.

work/logs

Contains Service Virtualization Server and Service Virtualization Manager logs.

Note: When RPM is removed, the configuration files in the bin and work directories will remain in the system. They are kept in case you re-install the product later or install a newer version. If you do not plan to reinstall the product, you may delete these directories.

Back to top

Uninstalling Service Virtualization from Linux

This section described how to uninstall the Service Virtualization server from a Linux machine.

For RPM: Run the rpm command: rpm -e sv-server. Manually remove the /opt/microfocus/sv-server directory.

For TAR: Delete the directory to which the Service Virtualization was installed. If you also installed it as service, you should:

  • Disable the service: systemctl disable sv-server sv-svm
  • Manually delete /usr/lib/systemd/system/sv-server.service and /usr/lib/systemd/system/sv-svm.service

Back to top

See also: