J4.x

Installation de Joomla CLI

From Joomla! Documentation

This page is a translated version of the page J4.x:Joomla CLI Installation and the translation is 58% complete.
Other languages:
Deutsch • ‎English • ‎français

Introduction

A partir de Joomla! 4.3, l'installation de Joomla CLI est disponible. Elle permet de configurer le Content Management System (CMS) directement sur la console du serveur sans avoir besoin d'un navigateur web. Cela permet des déploiements automatisés, par exemple pour les autoinstallateurs d'un FAI. En éliminant l'interface HTML, le processus d'installation est considérablement accéléré.

Les utilisateurs expérimentés et les développeurs peuvent facilement déployer plusieurs instances de Joomla de cette manière.

L'installateur CLI fait partie du paquetage standard de Joomla.

Configuration requise

Joomla nécessite PHP, une base de données et un serveur web. Pour obtenir les dernières informations sur les logiciels pris en charge et les versions minimales et recommandées, veuillez consulter le site https://downloads.joomla.org/technical-requirements.

L'installation d'une extension

En principe, l'installation de l'interface de programmation peut être effectuée de deux manières :

  1. Installation manuelle
  2. Installation automatique par script

Installation manuelle ==

Une installation manuelle offre le plus haut niveau de contrôle possible pendant le processus d'installation. Chaque étape est visible dans le terminal et peut être interrompue avec Ctrl+C en cas de saisie incorrecte.

Étapes à suivre

  1. Téléchargement du paquet d'installation dans la racine du document du serveur web (resp. de l'hôte virtuel)
  2. Move to corresponding document root
  3. Décompression du fichier zip (ou tarball)
  4. Exécuter la commande PHP : php installation/joomla.php install.Progressivement, les paramètres les plus importants pour l'installation et le fonctionnement du nouveau site web seront indiqués (voir section suivante).
    Note: Faites bien attention à ce que vous saisissez. Il n'est pas possible de revenir en arrière dans le script. Si la saisie est incorrecte, le script doit être interrompu.
    Plusieurs paramètres peuvent être ajoutés à la commande (voir tableau ci-dessous).
  5. Une fois le script terminé avec succès, le nouveau site web est accessible.


Cli installer success.png
Demande d'information sur l'installation de Joomla
  • Données de connexion:
    • Entrez le nom de votre site Joomla.: Saisissez ici le nom d'hôte du nouveau site web. Si le nouveau site Joomla est installé sur un serveur public, il doit s'agir d'un nom de domaine entièrement qualifié (FQDN).
    • Saisissez le nom réel de votre super utilisateur. : La demande est évidente.
    • Définissez le nom d'utilisateur de votre compte Super Utilisateur.. : cc
    • Saisissez l'adresse électronique du super utilisateur du site web.. : La demande est évidente.
  • Database Configuration:
    • Database type. Supported: mysql, mysqli, pgsql [mysqli]: Default is mysqli. Supported database types are MySQL (mysql) and PostgreSQL (pgsql) databases and compatible types (e.g. MariaDB). mysqli stands for the advanced variant on MySQL.
    • Database host [localhost]: Default is localhost. An IP address or a host name should be entered here only if the responsible database server is installed on another host. However, the terminal user has to have write permissions on the selected host. You will get get this information from your internet provider (ISP).
    • Database username: The login name of the database user, it is usually different from the name of the SuperUsers. You will get get this information from your ISP.
    • Database password: The password for the Joomla database. You will get get this information from your ISP.
    • Database name [joomla_db]: The value joomla_db is predefined, but another name is used regularly. You will get get this information from your ISP.
    • Prefix for the database tables [s61vo_]: The prefix for the Joomla database tables. This value is used to separate the Joomla tables from other tables contained in the database, if the database is used by other applications as well. The value is randomly generated every time you call the script and should be changed only in exceptional cases.
      Info non-talk.png
      Important!

      Do not use an existing table prefix to write to an existing database - it may lead to unexpected results.

    • Encryption for the database connection. Values: 0=None, 1=One way, 2=Two way [0]: Select the type of database encryption here. You will get this information from your ISP.

Script-driven automatic installation

The complete Joomla installation is controlled by the joomla.php file, which is located in the /installation subfolder after unpacking the cli installation package.

Any programming language that allows calling and executing PHP files allows you to create a script that automates the necessary preparations and the actual installation using custom variables.

With this script, steps 1-3 from the manual installation (see above) should be completed before the joomla.php file is called up. The process of this file can be controlled exactly with the help of several parameters. It has to be started from the root directory of the new Joomla website. The call is done with:

php installation/joomla.php install [options]

In the terminal screen, the contents of the lower table may be retrieved with the following command: php installation/joomla.php help install

joomla.php Options
Options Description
--site-name=SITE_NAME Name of the website
--admin-user=ADMIN_USER Real name of the Super User account
--admin-username=ADMIN_USERNAME Username of your Super User account
--admin-password=ADMIN_PASSWORD Password of your Super User account
--admin-email=ADMIN_EMAIL

Email address of the website's Super User account

--db-type=DB_TYPE Database type. Supported by Joomla: mysql (=MySQL (PDO)), mysqli (=MySQLi), pgsql (=PostgreSQL (PDO)) [default: "mysqli"]
--db-host=DB_HOST Database host [default: "localhost"]
--db-user=DB_USER Database username
--db-pass=DB_PASS Database password
--db-name=DB_NAME

Database name [default: "joomla_db"]

--db-prefix=DB_PREFIX Prefix for the database tables [default: "vlqhe_"]. The default value is randomly generated every time you call the script.
--db-encryption=DB_ENCRYPTION Connection Encryption [default: "0"]
--db-sslkey[=DB_SSLKEY] SSL key for the database connection. Requires encryption to be set to 2
--db-sslcert[=DB_SSLCERT] Path to the SSL certificate for the database connection. Requires encryption to be set to 2
--db-sslverifyservercert[=DB_SSLVERIFYSERVERCERT]

Verify SSL certificate for database connection. Values: 0=No, 1=Yes. Requires encryption to be set to 1 or 2 [default: "0"]

--db-sslca[=DB_SSLCA] Path to CA file to verify encryption against
--db-sslcipher[=DB_SSLCIPHER] Supported Cipher Suite (optional)
-h, --help Display the help information
-q, --quiet Flag indicating that all output should be silenced
-V, --version

Displays the application version

--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Flag to disable interacting with the user
-v,-vv,-vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Informations connexes