-
-
Notifications
You must be signed in to change notification settings - Fork 20
CLI setup
IMPORTANT! This installation method is meant for expert users only.
You can install Akeeba Panopticon using the command-line, e.g. as part of a deployment using Ansible, Puppet, etc. It can also come in handy if the person installing Panopticon does not have access to the web interface itself, e.g. a contractor deploying Panopticon to an Intranet over a tunnelled SSH connection.
Below, you can find the discrete installation steps and the relevant commands.
Before you start installing Akeeba Panopticon you need to create a MySQL database, and a user which can access it. The database user needs to have the following privileges on this database: ALTER, CREATE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, UPDATE.
Then, you need to run the following command:
php cli/panopticon.php config:create --driver mysqli --host localhost --user USER --password PASS --name DBNAME \
--prefix "ak_"
The driver
can be one of mysqli
(using the PHP mysqli
/ mysqlnd
extension) or pdomysql
(using the PHP pdo
extension).
The rest of the parameters are your database connection parameters.
The prefix
must be one to five lowercase alphanumeric characters (a-z, 0-9) followed by an underscore. It does not have any special meaning. It's used to allow Panopticon to be installed alongside other software sharing the same database.
Upon successful execution of this command the config.php
file will be created in Panopticon's installation root.
Run the command
php cli/panopticon.php database:update
This will automatically connect to the database and create the necessary database tables.
Tip: You can use the same command after updating Panopticon to update the database tables, if necessary. The database:update
command is idempotent.
You need to create a user to access Akeeba Panopticon's web interface. For example:
php cli/panopticon.php user:create --username=admin --password="MyP@s5w0rD" --name "Super Administrator" --email="foo@example.com"
Tip: If you omit the --password
parameter you will be asked to type in your password. If you are using an automation script you can feed the password and a newline character to STDIN (standard input) in this case. This is a more secure alternative to having your password logged in the deployment log.
Assuming that you will be running the Panopticon CRON jobs from a CLI context, run the following command:
php cli/panopticon.php config:maxtime:test
You will then need to run:
php cli/panopticon.php config:set max_execution 180
php cli/panopticon.php config:set finished_setup true
the number (180 in the example) being the maximum number of seconds reported by the previous command.
Finally, set up a CRON job which runs every minute. For example, add the following to your crontab file:
* * * * * /path/to/php /path/to/panopticon/cli/panopticon.php task:run
where /path/to/php
is the absolute path to the PHP-CLI executable and /path/to/panopticon
is the absolute path to where Panopticon has been installed.
Tip: You can automate the creation of the CRON job using the following shell code:
crontab -u myuser -l > mycron
echo "* * * * * /path/to/php /path/to/panopticon/cli/panopticon.php task:run" >> mycron
crontab -u myuser mycron
rm mycron
where myuser
is the username under which you want the CRON job to run, /path/to/php
is the absolute path to the PHP-CLI executable, and /path/to/panopticon
is the absolute path to where Panopticon has been installed.
Documentation Copyright ©2023–2024 Akeeba Ltd.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
You can also obtain a copy of the GNU Free Documentation License from the Free Software Foundation
- Overview pages
- Working with sites
- Site Overview
- Backup Management with Akeeba Backup Pro
- Security Management with Admin Tools Pro
- Scheduled Update Summary
- Scheduled Action Summary
- Backup Tasks
- Scanner Tasks
- System Configuration
- Managing Sites
- Mail templates
- Users and Groups
- Tasks
- Log files
- Update Panopticon
- Database Backups
- Fixing your session save path
- The .htaccess file
- Advanced Customisation (user code)
- Plugins
- Custom CSS
- Custom Templates
- Advanced Permissions
- .env For Configuration