Installation ved hjælp af en kommandolinjegrænseflade (CLI)
From LimeSurvey Manual
Introduktion
Når vi laver automatiserede installationer (f.eks. i en virtuel maskine opsætning), kan vi bruge LimeSurveys (v2.x refereret til her) CLI (kommandolinjegrænseflade) med god effekt. Filerne brugt til dette formål (og til at nulstille adgangskoder også) er i WEBROOT/application/commands mappen, den af interesse her er console.php.
Forudsætninger
- PHP CLI bør være tilgængelig
- WEBROOT/application/config/config.php bør være tilgængelig og udfyldt med de parametre, der leveres af den automatiserede installationsproces.
- Tilgængeligheden af PHP-modulernes tilladelser bør matche behovene i LimeSurvey.
- Der skal oprettes en tom MySQL-database, og brugeren skal have de rigtige privilegier for at kunne bruge den.
Brug
Til illustrationsformål antager vi i vores eksempel, at WEBROOT er /var/www/limesurvey.
cd /var/www/limesurvey/application/commands
php console.php
Dette vil vise:
Yii kommandoløber (baseret på Yii v1.1.14) Brug: console.php<command-name> [parametre...] Følgende kommandoer er tilgængelige: - installer - besked - migrere - plugin - nulstil adgangskode - skal - webapp For at se den individuelle kommandohjælp, brug følgende: console.php hjælp<command-name>
Syntax
php console.php <Admin User Name> <Admin User Password> <Full Name> <EMail ID>
- The Full Name and Password are enclosed in double quotes if they contain spaces or other special characters.
- All the other parameters like DB Name, DB Type, DB User, DB Password etc. are to be populated in the config.php file before script execution.
- The script should be executed from and in the WEBROOT/application/commands folder only.
Example
cd /var/www/limesurvey/application/commands
php console.php install limeadmin pwd123 Admin admin@mydomain.com
outputs the following text:
/var/www/limesurvey/installer/sql/create-mysql.sql
and the database should be properly installed at the moment.