Manual:Maintenance scripts/hu

A karbantartószkriptek számos adminisztratív, importálási, karbantartási, lekérdezési és frissítési feladatot ellátnak. A szkriptek PHP nyelvűek és a maintenance könyvtárban találhatóak

Sok, különböző funkcionalitású szkript létezik. Mindig figyelmesen olvasd el a dokumentációt használat előtt; ha nincs ilyen, akkor futtatáskor légy még körültekintőbb.

Beállítás
The  and   configuration variables must be set in order to run maintenance scripts that need to alter the structure of the database (like ) if the user configured in  doesn't have enough permissions. Alternatively, you can pass the --dbuser and --dbpass parameters to the script. The values for these variables differ based on the database engine that is being used to power your installation of MediaWiki. If not configured, it will use the user configured in.

MySQL
Some of the maintenance scripts require database permissions that, for security reasons, the main MediaWiki database account should not have. A separate database account with 'superuser' privileges for just the MediaWiki database should be created (if it does not already exist.) If the database that you use for MediaWiki is called , then the following SQL would create such a user who can exercise superuser privileges on localhost.:

Once the account exists, the account name should be set in the  configuration variable. Like other configuration variables,  should be set in LocalSettings.php. A password for  must be set in the   configuration variable.

PostgreSQL
PostgreSQL uses a different security model than MySQL and the same PostgreSQL server account used for day-to-day operation of the MediaWiki installation must also be used for running the maintenance scripts. This is necessary to ensure that the owner for new tables created by the maintenance scripts is set correctly. You don't need to set  or   at all.

A szkriptek futtatása
A szkripteket a parancssorból kell futtatni.

Szükséges program: PuTTY vagy hasonló emulátor


 * 1. lépés: töltsd le és futtasd a PuTTY-t.
 * 2. lépés: a Host Name (or IP address) mezőben add meg a webszerver IP-címét (kérdés esetén keresd fel a szolgáltatód), majd kattints az Openre.


 * 3. lépés: egy parancssori ablak jelenik meg. A login as: sorban add meg az FTP felhasználónevet.


 * 4. lépés: add meg a jelszót.


 * 5. lépés: navigálj a „maintenance” mappába. Az aktuális könyvtárat a  paranccsal kérdezheted le. A mappa a telepítés főkönyvtárában található.


 * Step 6: Execute the maintenance script that needs to be run:


 * If you get an error (for example: php.exe is no valid Win32 application), try the following:


 * In Windows, the command is:

''If your script fails to run, and spews out a lot of error messages, the first thing to try is to set the  environment variable to point to the root of your MediaWiki installation. This will help scripts to find the necessary files, and is particularly relevant when running maintenance scripts provided by third-party extensions.''

Standard command-line options
Almost every PHP script in /maintenance supports several standard options:
 * --help : Displays help message
 * --conf &lt;path&gt; : Location of LocalSettings.php, if not default (at parent directory of the script)
 * --dbuser &lt;username&gt; : Database account to use instead of the one specified in LocalSettings.php, not used for scripts that don't require a database connection or when SQLite database backend is used
 * --dbpass &lt;password&gt; : Database password to use instead of the one specified in LocalSettings.php, not used for scripts that don't require a database connection or when SQLite database backend is used
 * --globals : Output globals at the end of processing for debugging
 * --memory-limit &lt;value&gt; : Set memory limit for the script. Accepts ordinary numbers, standard php.ini abbreviations (1024K, 20M, 1G), max for no limit (will be used by default if omitted) and default for no change. Available only since MediaWiki 1.17.
 * --quiet : Suppress non-error output
 * --wiki &lt;id&gt; : Wiki ID for wiki farms. This may be of the form  or  . LocalSettings.php will be run with the   and   constants defined accordingly.

MediaWiki installs that use symlinks
In cases where the MediaWiki php files are symlinked to a central installation you will need to specify to the maintenance script the path of the LocalSettings.php file. For example:

php maintenance/importImages.php --conf /var/wwwdata/website.org/wiki/LocalSettings.php /tmp/wikiimages .jpg .png .svg Otherwise you will get this error: A copy of your installation's LocalSettings.php must exist and be readable in the source directory.

No shell access
On many shared hosts, you won't have shell access. The following extensions may be useful to run maintenance scripts via the web: Extension:Maintenance and Extension:MaintenanceShell.

List of maintenance scripts
Instead of this probably-outdated list,


 * View its generated documentation summary.
 * View its generated documentation summary.

Here is the list of files included in the maintenance subdirectory located at the root of a MediaWiki installation. You can contribute to this manual by keeping this list up to date, adding a description of these files' specific purpose and of how an administrator should use them (command line examples, etc.).