Good day, how we can run continuously the XIBO automatically on our server? We are using digitalocean Ubuntu 16.04.4 x64 and XIBO 1.8.2 at the moment we run the XMR manually. Any idea or any solution aside on updating its Xibo core to its latest version.
Hi TUISTERa, Thanks for your swift responds, we followed your procedure and entered the correct path. However I just got this error. Please see attached screenshot. Thanks for your great help.
I think its works now! I just set the permission of xmr.service to 644 and then on the ExecStart = /home/display/bin/xmrrun.sh , I change and added a /bin/bash
Here’s an easier way to run XMR as a systemd service on Ubuntu (18.04).
Copy the whole block into your terminal and it will create the xibo-xmr service. You might want to adjust some values before doing that. In the [Service] section, adjust User and Group the whatever your web server / php is also running as. Usually it’s the www-data user. ExecStart requires the correct paths to your php binaries and the xmr.phar file included in Xibo.
You can check the status if the xmr service is properly running. Set debug to false in your config.json for detailed output. Output example to verify that xmr is running and php is listening to the internal cms and public display port set in config.json.
A few extra notes about setting up XMR: in Ubuntu 18.04 you can install ZeroMQ from the default repos using the package name libzmq3-dev. PHP bindings can be build using PECL. Don’t forget to enable the modules afterwards. It’s quite easy actually, just run a few apt install and pecl install commands, and use your favorite text editor to edit the configurations (config.json and php.ini). See my previous post to run XMR as a service.
I suppose you’re not running the docker package of the Xibo CMS, and you have a manual installation running on your servers. That’s why you’re in this thread, to set up XMR running because in the docker package that’s already set up for you.
Along XMR you also need to set up XTR. See the docs about XTR. The maintenance script is run with XTR. Documentation about XTR is 100% usable with Ubuntu 18.04 and it includes all the instructions you need. But I’ll type it out for you here.
Notice that my XMR script is not only easier to set up, it also enables you to run it as a specific user. My webserver (nginx) and php-fpm are running as the www-data user (default). And so should XMR and XTR. This is the correct way to handle ownership and permissions. You don’t need to chmod anything to your Xibo CMS installation. If you need to, the ownership of the CMS files are not set up correctly or your services (web, php, XMR or XTR) are running as the wrong user.
So to continue, you can set up an crontab for the right user. XTR is nothing more than a scheduled task that executes a php script. In my case, php has to execute the script as the user www-data. Create a scheduled task for the user www-data. One way of doing this is to use the crontab command.
crontab -u www-data -e
Select your favorite editor to edit the crontab for user www-data and append the following line.
* * * * * /usr/bin/php /var/www/xibo/bin/xtr.php
XTR is now set up and your maintenance script will run automatically.