The hostnames referenced throughout this documentation will be elentra.med.university.edu and staging.med.university.edu, which must be replaced by your actual DNS hostnames.
This documentation can be used as a reference to create both your Production Application Server and/or Staging Application Server on a Enterprise Linux 8 virtual machine.
SSH into server and sudo to root:
Change the SELINUX variable in /etc/selinux/config to permissive to prevent unforeseen and difficult to diagnose issues:
Add the following lines to /etc/hosts file:
Edit the hostname of the virtual machine in the /etc/hostname file:
Install screen, update RHEL, and reboot:
SSH back into server, and install the Inline with Upstream Stable (IUS Community) package.
Install Snapd and htmldoc:
Note: You may have to wait a couple of minutes before running the snap install command, so that the snap database can initialize.
Install wkhtmltopdf from the binary package because the yum package provided by EPEL is broken:
Start Apache and Supervisor, and set to start on system startup:
Create a new file called /etc/php.d/elentra.ini and add the following:
Create an Elentra system user called production, which is used for production deployments:
Create and permission the SSH authorized_keys file for the production user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your production environment to the new authorized_keys file.
Create an Elentra system user called staging, which is used for staging deployments:
Create and permission the SSH authorized_keys file for the staging user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your staging environment to the new authorized_keys file.
Create and appropriately permission the Apache document root and Elentra storage directories for production.
Create and appropriately permission the Apache document root and Elentra storage directories for staging.
Generate the SSL private keys required for each of your hostnames:
Generate the SSL certificate signing requests (CSRs) for your certificate authority for each of your hostnames.
You will be asked a number of questions, answer accordingly, but do not answer enter anything for "Email Address", "A challenge password", or "An optional company name:
If you have a valid Certificate Authority certificate, you should create a .crt file foreach hostname and paste in the certificate text:
You will also likely have a certificate authority root chain certificate. Also paste this into a file called ca-certificate.crt
If you are only creating self-signed certificates, you should do this for each hostname:
Install the certificates in the Apache virtual host directory:
Create the Apache VirtualHosts by creating a file named 000-elentra.conf and placing it /etc/httpd/conf.d/.
For configurations where the web server is directly accessible from the internet, the file should contain the following:
For configurations where a load balancer sits in front of the web server and the load balancer communicates with the web server over http, the file should look like this:
Do a deployment to the new server.
Point the app.json in the storage folder to the corresponding file in the code
Create a new file in the /etc/supervisord.d directory called elentra.ini, and use the following template snippet as a reference to create your own file.
Please make sure that you have the correct path in command and stdout_logfile, and that user is the correct system account that your existing cron jobs are run as.\
Test your new Apache configuration, then restart Apache and Supervisor.
This documentation can be used as a reference to create both your Production Application Server and/or Staging Application Server on a Enterprise Linux 7 virtual machine.
SSH into server and sudo to root:
Change the SELINUX variable in /etc/selinux/config to permissive to prevent unforeseen and difficult to diagnose issues:
Add the following lines to /etc/hosts file:
Edit the hostname of the virtual machine in the /etc/hostname file:
Install screen, update RHEL, and reboot:
SSH back into server, and install the Inline with Upstream Stable (IUS Community) package.
Install wkhtmltopdf from the binary package because the yum package provided by EPEL is broken:
curl -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | tar -xJC /root && cp /root/wkhtmltox/bin/* /usr/bin
Start Apache and Supervisor, and set to start on system startup:
Create a new file called /etc/php.d/elentra.ini and add the following:
Create an Elentra system user called production, which is used for production deployments:
Create and permission the SSH authorized_keys file for the production user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your production environment to the new authorized_keys file.
Create an Elentra system user called staging, which is used for staging deployments:
Create and permission the SSH authorized_keys file for the staging user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your staging environment to the new authorized_keys file.
Create and appropriately permission the Apache document root and Elentra storage directories for production.
Create and appropriately permission the Apache document root and Elentra storage directories for staging.
Point the app.json in the storage folder to the corresponding file in the code
Generate the SSL private keys required for each of your hostnames:
Generate the SSL certificate signing requests (CSRs) for your certificate authority for each of your hostnames:
You will be asked a number of questions, answer accordingly, but do not answer enter anything for "Email Address", "A challenge password", or "An optional company name":
If you have a valid Certificate Authority certificate, you should create a .crt file foreach hostname and paste in the certificate text:
You will also likely have a certificate authority root chain certificate. Also paste this into a file called ca-certificate.crt.\
If you are only creating self-signed certificates, you should do this for each hostname:
Install the certificates in the Apache virtual host directory:
Create the Apache VirtualHosts by creating a file named 000-elentra.conf and placing it /etc/httpd/conf.d/.
This file should contain the following:
Create a new file in the /etc/supervisord.d directory called elentra.ini, and use the following template snippet as a reference to create your own file.\
Please make sure that you have the correct path in command and stdout_logfile, and that user is the correct system account that your existing cron jobs are run as.
Test your new Apache configuration, then restart Apache and Supervisor.
This documentation can be used as a reference to create both your Production Application Server and/or Staging Application Server on a Ubuntu 22.04 virtual machine.
SSH into server and sudo to root:
Add the following lines to /etc/hosts file:
Edit the hostname of the virtual machine in the /etc/hostname file:
Install screen, update RHEL, and reboot:
SSH back into server, and install the Ondrej PHP repository.
Install wkhtmltopdf from the binary package, as the apt package installs way too many dependencies:
curl -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | tar -xJC /root && cp /root/wkhtmltox/bin/* /usr/bin
Start Apache and Supervisor, and set to start on system startup:
Create a new file called /etc/php/8.0/mods-available/elentra.ini and add the following:
Enable this new module by typing:
Create an Elentra system user called production, which is used for production deployments:
Create and permission the SSH authorized_keys file for the production user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your production environment to the new authorized_keys file.
Create an Elentra system user called staging, which is used for staging deployments:
Create and permission the SSH authorized_keys file for the staging user.
Add all developers' SSH public keys (i.e. cat ~/.ssh/id_rsa.pub) that are allowed to deploy Elentra to your staging environment to the new authorized_keys file.
Create and appropriately permission the Apache document root and Elentra storage directories for production.
Create and appropriately permission the Apache document root and Elentra storage directories for staging.
Generate the SSL private keys required for each of your hostnames:
Generate the SSL certificate signing requests (CSRs) for your certificate authority for each of your hostnames:
You will be asked a number of questions, answer accordingly, but do not answer enter anything for "Email Address", "A challenge password", or "An optional company name":
If you have a valid Certificate Authority certificate, you should create a .crt file foreach hostname and paste in the certificate text:
You will also likely have a certificate authority root chain certificate. Also paste this into a file called ca-certificate.crt.\
If you are only creating self-signed certificates, you should do this for each hostname:
Install the certificates in the Apache virtual host directory:
Create the Apache VirtualHosts by creating a file named 000-elentra.conf and placing it /etc/apache2/sites-available/.
This file should contain the following:
Enable this new site by typing:
Create a new file in the /etc/supervisor/conf.d directory called elentra.conf, and use the following template snippet as a reference to create your own file.\
Please make sure that you have the correct path in command and stdout_logfile, and that user is the correct system account that your existing cron jobs are run as.
Test your new Apache configuration, then restart Apache and Supervisor.