Manual installation
Linux

Alma/Rocky/CentOS

44min

Installing Passwork on following OS:

  • CentOS 8 Stream, Alma Linux 8, Rocky Linux 8.
  • CentOS 9 Stream, Alma Linux 9, Rocky Linux 9.

On this page you can switch between blocks of code to view the commands applicable to your version of the OS

1. Minimum system requirements

Passwork is not resource-heavy. How much disk space, RAM and CPU power you will need depends on the number of active users, the amount of stored data, and your requirements for fault-tolerance.

If your server has 2-4 GB of RAM, we recommend enabling the SWAP file for libraries to compile properly.

2. Steps before installation

First, gain root access and update the local packages:

shell


Then, install the Git version control package, Apache2 web-server and curl data transfer tool:

bash


Run httpd.service:

shell


And enable autostart:

shell


2.1 Installing and setting up Firewalld

Install the dynamically managed firewall Firewalld:

shell


Run firewalld.service:

shell


Enable autostart:

shell


Allow HTTP services in firewalld:

shell


Allow HTTPS services in firewalld:

shell


And apply the changes to firewalld:

shell


2.2 Disabling SELinux and restarting ОС

Edit the /etc/selinux/config configuration file:

shell


Change theSELINUX parameter from enforcing to disabled:

shell


Save the changes (Ctrl+O) and exit the terminal (Ctrl+X). Then, restart your system to apply the changes to SELinux:

shell


3. Installing PHP

Install the EPEL package and YUM package management tool:

Shell


Download and install the latest EPEL repository:

OS 8
OS 9


Download and install the repository for access to PHP versions:

OS 8
OS 9


Enable the PHP 8.2 modile from REMI repository:

Shell


Install PHP and its extensions:

Shell


3.1 Installing a PHP MongoDB driver

Install a PHP MongoDB driver:

Shell


Create configuration files for PHP MongoDB startup and activation:

Shell


3.2 Installing the PHP Phalcon extension

Install the PHP Phalcon extension:

Shell


4. Installing MongoDB database

Create a file to add MongoDB into YUM package manager

Shell


Add the following lines into the file:

OS 8
OS 9


Install MongoDB:

Shell


Run mongod.service:

shell


And enable autostart:

shell


5. Managing and downloading the latest Passwork via Git

Go to /var/www/:

shell


Add a global Git configuration pointing to the safe directory:

shell


Initialize a Git repository at /var/www/:

shell


Add the remote Passwork repository:

shell


Get the remote repository for your local sever:

shell


The system will ask for your credentials, which are listed on your customer portal page. If you can't access the customer portal, let us know.

Switch to the v6 branch with the latest Passwork version:

shell


Give apache owner privileges for the files and directories:

shell


6. Setting up Apache2 for HTTP access to Passwork

Open the virtual host configuration file for HTTP:

shell


Edit the file so it looks as follows:

shell


Restart the web server (httpd.service):

shell


You can open http://passwork.local or http://127.0.0.1 to test your Passwork connection

7. Passwork parameter checklist

When you connect to Passwork for the first time, you will need to go over the checklist that includes:

  • Automatic parameter checking
  • Checking connection to MongoDB database
  • Generating an encryption key for MongoDB
  • License verification

After finishing the checklist, you will be offered to create the first Passwork user and set their login, password and email address for notifications.

Note. This user is always local and "Owner" of Passwork by default, in case of assigning — "Owner" LDAP/SSO user, it will automatically become local and you will not be able to authorise in Passwork

8. Setting up HTTPS connection

8.1 Generating a self-signed SSL certificate

Install a SSL module for Apache2:

shell


Create a new directory to store the private key and the certificate in:

shell


Use OpenSSL to generate a self-signed X.509 certificate for Apache2:

shell

  • Common Name (CN) — Specify the IP of your server or host. This field is important, as the certificate should match the domain or IP of your website;
  • subjectAltName (SAN) — Альтернативное имя домена или IP-адрес.

Generate Diffie-Hellman parameters with the key length of 2048:

shell


Add Diffie-Hellman parameters to the self-signed certificate:

shell


Give root access to the user to secure the private key and the certificate:

shell


8.2 Configuring a virtual host to access Passwork via HTTPS

Open the virtual host configuration file for HTTPS connection:

shell


Find the section that starts with <VirtualHost _default_:443> and edit it as follows:

  • Uncomment the DocumentRoot line and change the path to Passwork's root folder /var/www/public
  • Uncomment the ServerName line and change www.example.com to the IP or the domain of the server (it should match the Common Name of the certificate):
Shell

  • Add the <Directory> directive after ServerName:
Shell

  • Comment the SSLProtocol and SSLCipherSuite lines:
Shell

  • Update the paths to certificate files, which were generated earlier:
shell

  • After editing the file, check if the virtual host configuration file matches the example:
shell


Restart the web server (httpd.service):

bash


Check the HTTPS connection to Passwork using https://passwork.local

8.3 Setting up Passwork for work over HTTPS

When using a secure SSL connection (HTTPS), client browsers require certain flags to process Passwork data. These flags are called session.cookie_secure and disableSameSiteCookie. If these flags are not set, browsers will not be able to establish connections and the connection will be rejected, which can lead to authorisation errors — "The session of this browser tab is out of date".

Enable the ;session.cookie_secure parameter in /etc/php.ini:

bash


Set the disableSameSiteCookie parameter in /var/www/app/config/config.ini to Off:

bash


Do not set these parameters or reset them to their original value if you change your mind about using SSL and work over the HTTP protocol.

9. Configure background tasks

Background tasks are tasks that are executed by the scheduler in the background. For example, LDAP synchronisation, loading favicons, and other tasks that are time-consuming, persistent, or resource-allocating.

See a guide on setting up background tasks.

10. Set up security

Before performing actions to modify and configure security settings, we strongly recommend that you make sure that Passwork is stable and working correctly, and that you back up the files to which you are making changes.

Server security is an important part of ensuring the protection of valuable company data and resources. It is a process that requires planning and execution to ensure maximum protection against various threats.

Look through the overview of Passwork security settings.