Installation & déploiement
Prerequisites
- Debian 10, 11 or 12 / Ubuntu 18.04 or 20.04 server
- PHP 7.4+ with extensions: mysqli, curl, json, mbstring, xml, ssh2
- MariaDB 10.3+ or MySQL 5.7+ (for the PmaControl internal database)
- Apache2 or Nginx with mod_rewrite
- Git, nmap (optional for autodiscovery)
- Graphviz (for Dot3 topology generation)
Quick installation
# Cloner le dépôt
git clone https://github.com/PmaControl/PmaControl.git /srv/www/pmacontrol
# Créer la base de données
mysql -e "CREATE DATABASE pmacontrol CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
mysql -e "CREATE USER 'pmacontrol'@'localhost' IDENTIFIED BY 'votre_mot_de_passe';"
mysql -e "GRANT ALL ON pmacontrol.* TO 'pmacontrol'@'localhost';"
# Configurer la connexion
cp /srv/www/pmacontrol/configuration/db.config.ini.php.example /srv/www/pmacontrol/configuration/db.config.ini.php
# Éditez le fichier avec vos identifiants
# Lancer le wizard d'installation
php /srv/www/pmacontrol/glial install init
The
Install::init() wizard creates all necessary tables, configures default settings and deploys the complete SQL schema (162 tables).Database configuration
The configuration/db.config.ini.php file contains the connections:
[pmacontrol]
driver=mysql
hostname=127.0.0.1
port=3306
user=pmacontrol
password=votre_mot_de_passe
database=pmacontrol
ssl=0
timeout=1
To regenerate this file:
php /srv/www/pmacontrol/glial mysql refreshConfig SSH key deployment
PmaControl uses ED25519 SSH keys to connect to remote servers (hardware collection, disk space, etc.).
# Générer une clef SSH
php /srv/www/pmacontrol/glial deployRsaKey generate
# Déployer sur un serveur
php /srv/www/pmacontrol/glial deployRsaKey deploy [id_serveur]
# Tester la connexion
php /srv/www/pmacontrol/glial deployRsaKey test [id_serveur]
SSH keys are stored in the
ssh_key table. ED25519 type is recommended for its security and compactness.Update
# Mettre à jour le code
cd /srv/www/pmacontrol && git pull
# Appliquer les patches SQL
php /srv/www/pmacontrol/glial upgrade needUpgrade
php /srv/www/pmacontrol/glial upgrade executePatch
The update system (Upgrade.php) automatically detects SQL patches to apply by comparing the current version with available patches in sql/patch/.
Apache configuration
<VirtualHost *:80>
ServerName pmacontrol.votre-domaine.com
DocumentRoot /srv/www/pmacontrol/App/Webroot
<Directory /srv/www/pmacontrol/App/Webroot>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/pmacontrol_error.log
CustomLog ${APACHE_LOG_DIR}/pmacontrol_access.log combined
</VirtualHost>
Enable mod_rewrite: a2enmod rewrite && systemctl restart apache2