First, register, pay, and issue a license at ru.totum.online/pro
If you have multiple installations on your server, this guide assumes that they are all being upgraded to the new version.
When transitioning from V4, it is impossible to verify the license's correctness, so be careful when specifying the host and schema! The schema is indicated in the technical panel at the top right of your system (to the left of the version, default is totum).
Also, ensure that the license contains a sufficient number of users.
V6 uses web-sockets, so if you use intermediate proxies, you need to configure them in advance. To ensure WebSocket requests are not lost when passing through an intermediate proxy server before Nginx, make sure that this proxy correctly processes and forwards the Upgrade and Connection headers used to establish WebSocket connections.
Log in to the server and update the repositories:
apt update
Install PHP 8.3
:
apt -y install php8.3 php8.3-bcmath php8.3-cli php8.3-curl php8.3-fpm php8.3-gd php8.3-mbstring php8.3-opcache php8.3-pgsql php8.3-xml php8.3-zip php8.3-soap php8.3-ldap
Transfer the fpm pool settings to version 8.3:
rm /etc/php/8.3/fpm/pool.d/www.conf && mv /etc/php/8.0/fpm/pool.d/totum.conf /etc/php/8.3/fpm/pool.d/totum.conf && sed -i "s:php8.0:php8.3:g" /etc/php/8.3/fpm/pool.d/totum.conf && sed -i "s:php8.0:php8.3:g" /etc/nginx/sites-available/totum.online.conf && sed -i "/jit_buffer_size/d" /etc/php/8.3/fpm/pool.d/totum.conf && sed -i '/php_admin_value\[opcache.enable_cli\] = 1/d' /etc/php/8.3/fpm/pool.d/totum.conf && service php8.3-fpm restart
Add web-socket proxying to nginx settings:
nano /etc/nginx/sites-available/totum.online.conf
Insert the section before location ~* \.php$ {
:
# functionality for web sockets
location /PRONotify {
proxy_pass http://localhost:8181/PRONotify;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 600s;
}
# ...
Save the file Ctrl + S
and restart nginx
:
service nginx restart
Remove PHP 8.0:
service php8.0-fpm stop && apt -y purge php8.0 php8.0-bcmath php8.0-cli php8.0-curl php8.0-fpm php8.0-gd php8.0-mbstring php8.0-opcache php8.0-pgsql php8.0-xml php8.0-zip php8.0-soap php8.0-ldap
Remove residuals:
apt autoremove
Answer Y
apt clean
Check PHP version:
php -v
Set permission to restart gomodule
by user totum
:
echo 'totum ALL=(ALL) NOPASSWD: /usr/sbin/service totum-gom restart' | sudo tee /etc/sudoers.d/restart-totum-gom && sudo chmod 440 /etc/sudoers.d/restart-totum-gom
Check server timezone:
cat /etc/php/8.3/fpm/pool.d/totum.conf
Copy the timezone from the line php_admin_value[date.timezone] = Europe/Madid
(copy the Europe/Madrid
part).
Update scripts:
su totum
cd /home/totum/totum-mit
Create the file CLI.totum.php.ini
(replace Europe/London
with the timezone you copied in the previous step):
nano /home/totum/totum-mit/CLI.totum.php.ini
opcache.enable_cli = 1
opcache.memory_consumption = 256M
date.timezone = Europe/London
git pull
Create GOM-service:
exit
ln -s /home/totum/totum-mit/totum-gom.service /etc/systemd/system/totum-gom.service && systemctl daemon-reload && systemctl enable totum-gom && service totum-gom start && service totum-gom status
Return to totum:
su totum
cd /home/totum/totum-mit && bin/totum git-update --force
Be sure to obtain a valid license. Carefully check the host and database schemas when issuing the license!
Create a license file:
nano /home/totum/totum-mit/PRO.license
Enter the license obtained on the license server: license.totum-online.ru
Enter the license through the server console or its emulator! Do not use third-party file editors in your desktop operating system, or those provided by the hoster in the browser — they may add extra unreadable characters (such as line breaks) that will make the license file unreadable.
The license is read by the system at the start of totum-gom (the Totum module on GO).
After saving the license file, you need to restart totum-gom:
sudo service totum-gom restart
You also need to check the number of active users in your system and ensure that the license has enough slots.
You can check the users with the command (see the TOTAL parameter at the bottom of the list) (change the totum
schema to yours if it differs from the standard one):
cd /home/totum/totum-mit && bin/totum schema-users --schema totum --list=on
If you have multiple schemas on one server, they all must be covered by the license.
For more details about licenses and information on how to disable users from their console, refer to the installation documentation of the PRO version.
That's all!
We also recommend updating all packages on the server to the latest versions from root
:
apt upgrade
If asked about local configurations, choose to keep them as they are configured for your host
If the system gives a license verification error when trying to log in:
Check the file /etc/php/8.3/fpm/pool.d/totum.conf
for the following lines:
nano /etc/php/8.3/fpm/pool.d/totum.conf
php_admin_value[session.gc_maxlifetime] = 3600
php_admin_value[session.save_path] = /var/lib/php/sessions_totum
If they are missing, add them from root
and save.
Create the folder:
mkdir /var/lib/php/sessions_totum && chmod 1733 /var/lib/php/sessions_totum
Restart FPM:
service php8.3-fpm restart
Obtain a test license on the server and check if you have correctly specified the hosts via gomodule-test
Switch to the totum
user:
su totum
cd /home/totum/totum-mit
Create a file PRO.license-test
and write the test license obtained from the license server into it:
nano PRO.license-test
Run the check:
bin/gomodule-test
Run totum-gom in license debugging mode:
Stop totum-gom from root
service totum-gom stop
Switch to the totum
user:
su totum
cd /home/totum/totum-mit
Run totum-gom in debug mode:
/home/totum/totum-mit/bin/gomodule -php-sessions-directory /var/lib/php/sessions_totum -totum-directory /home/totum/totum-mit/ -log=ln
After debugging, stop and start totum-gom as a service:
sudo service totum-gom restart
totum
userIf you have many users working simultaneously, cron jobs, actively working remotes, and you are working with the standard postgresql configuration, the standard database connection pool (default 100) may be exhausted, as totum-gom uses its own connection pool in addition to PHP-FPM.
If you see errors like:
SQLSTATE[08006] [7] FATAL: remaining connection slots are reserved for non-replication superuser connections
You need to increase them. From root
, check the path to the configuration file:
su - postgres -c "psql -c 'SHOW config_file;'"
Open it (for example):
nano /etc/postgresql/12/main/postgresql.conf
Find the max_connections
parameter, change 100
> 300
, save.
Stop totum-gom:
service totum-gom restart
Restart the database:
service postgresql restart
Start totum-gom:
service totum-gom start
Also, ensure that your average server load does not exceed 20-25%. If it is higher and you are not a professional system administrator, increase the server plan to fit within the 25% average load limit.