Manual:Install.php/pt

Category:MediaWiki code/pt#Install.php

Detalhes

O ficheiro install.php é um comando de manutenção com base em CLI para a instalação e configuração do MediaWiki.

Este comando cria um novo LocalSettings.php e povoa a base de dados indicada. Este irá abortar se já existir um ficheiro LocalSettings.php, e este não pode ler as definições existentes a partir desse ficheiro.

Utilização

php install.php [--conf|--confpath|--dbgroupdefault|--dbname|--dbpass|--dbpassfile|--dbpath|--dbport|--dbprefix|--dbschema|--dbserver|--dbtype|--dbuser|--env-checks|--globals|--help|--installdbpass|--installdbuser|--lang|--memory-limit|--pass|--passfile|--profiler|--quiet|--scriptpath|--server|--skins|--wiki|--with-extensions] <name> <admin>

The tables below explain the various options and arguments. The default values for the options are indicated in parentheses.

Parâmetros de manutenção genéricos:

--help (-h) Display this help message
--quiet (-q) Whether to suppress non-error output
--conf Location of LocalSettings.php, if not at the default location. This setting has no effect on this script and will be ignored. Use --confpath instead.
--wiki For specifying the wiki ID
--globals Output globals at the end of processing for debugging
--memory-limit Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it
--server The protocol and server name to use in URLs, e.g. https://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts.
--profiler Profiler output format (usually "text")

Parâmetros dependentes do comando

--dbuser The DB user to use for this script. This value appears in LocalSettings.php for $wgDBuser . If --installdbuser and --installdbpass are given, this value will be used to create a new account
--dbpass The password to use for this script. This value appears in LocalSettings.php for $wgDBpassword . If --installdbuser and --installdbpass are given, this value will be used to create a new account
--dbgroupdefault The default database group to use

Parâmetros específicos de comando

NameDescriptionDefault
--confpath Path to write LocalSettings.php to value corresponding to $IP, i.e. the path of your installation's root folder.

You can use --help to find the default value.

--dbname The database namemy_wiki
--dbpassfile An alternative way to provide dbpass option, as the contents of this file
--dbpath The path for the SQLite DB$IP/data
--dbport The database port; only for PostgreSQL5432
--dbprefix Optional database table name prefix (not for SQLite)
--dbschema The schema for the MediaWiki DB in PostgreSQL/Microsoft SQL Servermediawiki
--dbserver The database hostlocalhost
--dbtype The type of databasemysql
--env-checks Run environment checks only, don't change anything
--installdbpass The password for the DB user to install as
--installdbuser The user to use for installingroot
--lang The language to useen
--pass The password for the wiki administrator
--passfile An alternative way to provide pass option, as the contents of this file
--scriptpath The relative path of the wiki in the web server/wiki
--skins Comma-separated list of skins to installall
--with-extensions Detect and include extensions
--with-developmentsettings Load DevelopmentSettings.php in LocalSettings.php Since MediaWiki 1.42 change 977136

Argumentos

<name> O nome da wiki
<admin> O nome de utilizador do administrador da wiki

Exemplos

Configure a wiki, utilizando as permissões necessárias na base de dados para criar uma nova base de dados para a wiki chamada de "Nome da Wiki" e um utilizador chamado de "Administrador" para operar a wiki:

php maintenance/run.php install \
--dbname=wikidb \
--dbserver="localhost" \
--installdbuser=root \
--installdbpass=rootpassword \
--dbuser=dbusername \
--dbpass=dbuserpassword \
--server="http://wiki.example.com/" \
--scriptpath=/w \
--lang=en \
--pass=Adminpassword "Wiki Name" "Admin"
Category:Maintenance scripts/pt#Install.php
Category:Maintenance scripts/pt Category:MediaWiki code/pt