yum install app-php-engines subversion git
- Package app-php-engines will provide PHP version 7.1 needed by Tiki Manager
- Package subversion will install the subversion client, needed by default to checkout the different tiki versions
- Package git will be used to checkout the Tiki Manager code
Additionally, you will need at least MariaDB and Apache if you want to run any Tiki in that ClearOS instance.
yum install app-mariadb
Also, below we will use ClearOS functionalities to setup the Virtual Host for the Tiki Manager web interface, you will need to install/enable the "Web Server" app to easily create and manage websites.
yum install app-web-server
The recommended layout, to keep things generic across Linux distributions, is to setup Tiki Manager under the folder /opt/tiki-manager/app, since ClearOS has its own system to manage virtual hosts, we will use a ClearOS managed virtualhost instead of setting up the web interface in /opt/tiki-manager/webroot.
mkdir -p /opt/tiki-manager/app echo 71 > /opt/tiki-manager/.phpenv git clone https://gitlab.com/tikiwiki/tiki-manager.git /opt/tiki-manager/app
cd /opt/tiki-manager/app curl https://getcomposer.org/composer.phar > composer.phar php composer.phar install --no-dev
Execute the first time to generate the keys:
Should generate an output similar to the one below, where the suggested approach is to leave the password empty.
[root@server app]# php tiki-manager If you enter a passphrase, you will need to enter it every time you run Tiki Manager, and thus, automatic, unattended operations (like backups, file integrity checks, etc.) will not be possible. Enter passphrase (empty for no passphrase): [...]
To make sure that, you can use Tiki Manager
- from the command line, as root,
- from the web interface
- and maybe have some backups copied offsite using Syncthing
you will need to adjust some of the permissions.
Enable Apache to always have write access to some of the folders.
cd /opt/tiki-manager/app chown apache:apache -R backup cache data logs tmp setfacl -R -m u:apache:rwX,d:u:apache:rwX backup cache data logs tmp
And to make sure the (default) temp directory can also be shared:
mkdir -p /tmp/trim_temp/ chown apache:apache /tmp/trim_temp/ setfacl -R -m u:apache:rwX,d:u:apache:rwX /tmp/trim_temp/
If you are using Syncthing, you will need also to enable the user running these processes to read from the backup folders, you can enable that by doing:
setfacl -R -m u:backupuser:rwX,d:u:backupuser:rwX /opt/tiki-manager/app/backup
Note: replace backupuser with the user running Syncthing
Create a new virtual host using ClearOS admin interface, as an example we will call it tikimanager.example.org.
Use the folder layout "sandbox" (which is the default) and that you select "PHP 7.1" or above as the PHP Engine.
In that case, and for the remainder of this setup, we will consider:
php tiki-manager webmanager:enable
Follow the instructions on screen, when prompted enter the path above, and select the username and password to be used to authenticate you in the tiki manager web interface.
The interface / questions presented in the screen should look like the ones below:
[root@server app]# php tiki-manager webmanager:enable Tiki Manager web administration files are located in the Tiki Manager directory. In order to make the interface available externally, the files will be copied to a web accessible location. Permissions on the data folder will be changed to allow the web server to access the files. For example, if your web root is /var/www/virtual/webtikimanager.example.org * Files will be copied to /var/www/virtual/webtikimanager.example.org/html * Tiki Manager web administration will be accessible from: http://webtikimanager.example.org * You must have write access in /var/www/virtual Simple authentication will be used. However, it is possible to restrict access to the administration panel to local users (safer). This will enable the Tiki Manager administration web panel. Continue with this action (y,n)? y WWW Tiki Manager directory (ex: /var/www/virtual/webtikimanager.example.org/html): /var/www/virtual/tikimanager.example.org/html Desired username: tiki Desired password: password Restrict use to localhost [no]: no Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 3 installs, 0 updates, 0 removals - Installing components/jquery (3.3.1): Loading from cache - Installing fortawesome/font-awesome (v4.7.0): Loading from cache - Installing twitter/bootstrap (v4.1.3): Loading from cache Generating autoload files WWW Tiki Manager is now enabled. Enjoy!
There are some operations that you may want Tiki Manager to perform automatically for you in regular intervals like backups, updates, etc. for these you can setup cron to execute Tiki Manager, below are some examples.
For most of the examples, you may need to check the instance id, you can list the instances and check the ids by executing:
php tiki-manager instance:list
In the example below, all instances will be backed up at midnight every day, except the instance with id 11.
# ensure /usr/clearos/bin/php is in the path (so multiple versions of PHP work as expected) PATH=/usr/clearos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 0 0 * * * cd /opt/tiki-manager/app && /usr/clearos/bin/php -d memory_limit=256M tiki-manager instance:backup all --exclude=11 --no-interaction
In the example below, the instance with id 6 will be updated.
# ensure /usr/clearos/bin/php is in the path (so multiple versions of PHP work as expected) PATH=/usr/clearos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 0 1 * * * cd /opt/tiki-manager/app && /usr/clearos/bin/php -d memory_limit=256M tiki-manager instance:update --instances=6 --no-interaction
In the example below, instance 10 will be cloned to instance 11 and will be, after, upgraded to the branch 'trunk'
# ensure /usr/clearos/bin/php is in the path (so multiple versions of PHP work as expected) PATH=/usr/clearos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 0 2 * * * cd /opt/tiki-manager/app ; php tiki-manager instance:cloneandupgrade --source=10 --target=11 --branch=trunk --no-interaction