Manual:Installing MediaWiki/pt-br

From MediaWiki.org
Jump to: navigation, search
Mediawiki-logo.png Guia de instalação | Sobre o MediaWiki
Help-browser.svg Destaques | Requerimentos para a instalação
Preferences-system.svg Carregando | Instalando | Configurando


O MediaWiki é instalado usando um manuscrito de instalação interativo, web-baseado. Antes de você poder rodar este manuscrito, você necessita fazer duas coisas. Primeiro, assegure-se de que você instalou os programas necessários (Apache/IIS, MySQL4 ou mais recente e PHP5). Então você tem que adquirir o pacote do software MediaWiki e tem que transferir o software do MediaWiki para seu servidor. Você também terá que criar um banco de dados novo para seu wiki. Se necessário, crie uma conta em seu servidor de web seguindo as instruções em Manual:Installation/Criando um Sistema de Contas.

O MediaWiki pode ser difícil de instalar para o usuário de computador comum que não tenha experiência com o Apache, o PHP e o MySQL. A maioria dos usuários que desejarem usar o software wiki podem se beneficiar de usar um anfitrião wiki gratuito (veja emlist of wiki hosts on Wikibooks) ou via um software appliance.

Nota Nota:

Para informação de troubleshooting, veja Manual:Errors and Symptoms#Installation Errors.

Contents

[edit] Download do software MediaWiki

Faça Download do MediaWiki de official download page ou from subversion.

Os arquivos para download estão nos formatos .tar.gz, assim será necessário descompactá-los antes de continuar. Isto pode ser feito localmente (e então transferido por FTP) ou diretamente em seu servidor. Isto é normalmente efetuado com software como 7-Zip (free), WinZip, WinRAR ou IZArc (free) em Windows. Em Linux e Mac OS X, você pode descompactar o arquivo usando este comando:

tar xvzf mediawiki-*.tar.gz

Se você ainda não carregou os arquivos no seu servidor web, faça isso agora. Faça o upload dos arquivos para o diretório do seu servidor web ou copie diretamente a pasta descompactada, usando um cliente FTP como FileZilla (Open Source Software, Windows) ou http:// [cyberduck.ch / Cyberduck] (OSX). Se você instalou o Apache, o diretório correto está especificado em seu httpd.conf (a pasta do Apache normalmente é /htdocs). Se você estiver usando um servidor Linux ou Unix, você pode copiar os arquivos para qualquer pasta no seu servidor e depois fazer um link simbólico para a pasta do diretório do seu servidor web.

Renomeie a pasta de upload como gostaria de ter no endereço URL. Se o servidor estiver executando http://localhost por exemplo, renomeando para /w/ significa que seu acesso à wiki será em http://localhost/w/index.php. Não use /wiki/ se quiser usar um endereço URL curto.

Esta pasta renomeada será referida como <MediaWiki-folder>.

[edit] Prepare the Directories

MediaWiki needs to be able to write to the <MediaWiki-folder>/config directory when it runs its installation script. If you haven't done so already, you need to change the permission settings for the config subdirectory so that it is writable by the webserver. If you are using FileZilla, right-click on the config directory, select "attributes...", and check "Write" under "Owner". If it prompts you for a number instead or if you are using a command-line interface, use 755 (Use 777 on Linux except for RedHat Linux). Alternately, you may be able to change permissions using a "control panel" provided by your web host.

Depending on the server configuration, in some cases you have to check all boxes (777) in FileZilla, to be able to run the install-script of MediaWiki.

On Unix or Linux, if you have admin rights, you can run the command chmod 755 config in your wiki directory.

Nota Nota:

MediaWiki should be installed into a subdirectory of your document root, not in the document root itself. That is, if your domain my.domain.org is for instance mapped to the document root /home/mysqld/public_html, then mediawiki should be installed into /home/mysqld/public_html/w or similar. MediaWiki will then become available under http://my.domain.org/w. This is particularly important if you are going to use short URLs.

[edit] Create a database

If you know the root password on your database, the MediaWiki installation script can create a new database for you. If this is the case, you can skip to the Run the installation script section below. If you don't know the root password, for example if you are on a hosted server, you will have to create a new database now. Currently, you must use either MySQL or Postgres to store the actual contents of your wiki.

[edit] MySQL

  • You need to create a MySQL database and a user before installing MediaWiki. You can do this using various control panels such as PhpMyAdmin, which are often available from shared hosts, or you may be able to use ssh to login to your host and type the commands into a MySQL prompt. See the corresponding documentation. Alternatively, contact your host provider to have them create an account for you
    1. Download and install MySQL 5.0. It should put itself in /usr/local/mysql
    2. Check and see if the database server is running ("/usr/local/mysql/bin/mysqladmin status"), If not, sudo /usr/local/mysql/bin/safe_mysqld &.
      (For Fedora Core 5, use /usr/bin/mysqld_safe)
      1. Another way to start initially the MySQL server is to run the configure script available at the root of the installation. It creates the initial tables and automatically starts the mysql daemon
    3. Set a password for the "root" account on your database server. /usr/local/mysql/bin/mysqladmin -u root password yourpassword
    4. Set up a user in MySQL for your Wiki--do this in your terminal: /usr/local/mysql/bin/mysql -u root -p mysql
    5. This starts up the MySQL command line client. Now, do this in the client:
 create database wikidb;
 grant create, select, insert, update, delete, alter, lock tables on wikidb.* to 'wikiuser'@'localhost' identified by 'password';

If your database is not running on the same server as your web server, you need to give the appropriate web server hostname -- mediawiki.example.com in my example -- as follows:

 grant create, select, insert, update, delete, alter, lock tables on wikidb.* to
 'wikiuser'@'mediawiki.example.com' identified by 'password';

[edit] Postgres

If you are using Postgres, you will need to either have a database and user created for you, or simply supply the name of a Postgres user with "superuser" privileges to the configuration form. Often, this is the database user named postgres.

The database that MediaWiki will use needs to have both plpgsql and tsearch2 installed. The installer script will try to install plpgsql, but you may need to install tsearch2 yourself. (tsearch2 is used for searching the text of your wiki). Here's one way to do most of the setup. This is for a Unix-like system, and assumes that you have already installed the plpgsql and tsearch2 modules. In this example, we'll create a database named wikidb, owned by a user named wikiuser. From the command-line, as the postgres user, perform the following steps.

 createuser -S -D -R -P -E wikiuser (then enter the password)
 createdb -O wikiuser wikidb
 createlang plpgsql wikidb

NOTE If you're using PostgreSQL 8.3.x, you don't need to perform the following steps to install tsearch2 since it has been integrated into the core.

Adding tsearch2 to the database is not a simple step, but hopefully it will already be done for you by whatever packaging process installed the tsearch2 module. In any case, the installer will let you know right away if it cannot find tsearch2.

The above steps are not all necessary, as the installer will try and do some of them for you if supplied with a superuser name and password.

For installing tsearch2 to the wikidb database under Windows, do the following steps:

  1. find tsearch2.sql (probably under .\PostgreSQL\8.x\share\contrib) and copy it to the postgresql\8.x\bin directory;
  2. from a command prompt at the postgresql\8.x\bin directory, type "psql wikidb < tsearch2.sql -U wikiuser";
  3. it will prompt you for the password for wikiuser;

That's it!

Point (2) seems only to work on windows, cause on debian linux 4.0 (etch) only user postgres is allowed to use language c. so there it must be called by:

su - postgres -c psql wikidb < tsearch2.sql

Afterwards you must grant select rights to wikiuser to the tsearch tables and insert the correct locale.

Warning If you use PostgreSQL 8.2 or early, you must replace “pg_ts_config” to “pg_ts_cfg” and "pg_ts_config_map" to "pg_ts_cfgmap" in the next commands.

su - postgres
psql -d wikidb -c "grant select on pg_ts_config to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_config_map to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_dict to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_parser to wikiuser;"
psql -d wikidb -c "update pg_ts_cfg set locale = current_setting('lc_collate') where ts_name = 'default' and prs_name='default';"

Warning Last command does not work in PostgreSQL 8.3.

If you receive an error similar to "ERROR: relation "pg_ts_cfg" does not exist" when executing the above statements, try installing tsearch2 to the wikidb database again, but instead use these two separate steps (and then try the grant statements again):

1) su - postgres
2) psql wikidb -f tsearch2.sql

[edit] Rodando o Script de Instalação

Uma vez que todos os passos anteriores foram completados, você pode completar a instalação pelo navegador de web seguindo instruções mencionadas lá na Manual:Config script página.

[edit] Mantenha atualizado!

Subscreva em nossa lista de clientes de anúncios de liberação

Uma vez instalado, tenha certeza de você permanecer atualizado com novas liberações, e mantenha seu servidor seguro!

[edit] Assistente de Instalação

[edit] Veja também


Língua: English  • Català • Deutsch • Français • Bahasa Indonesia • Italiano • 日本語 • 한국어 • Português do Brasil • Русский • 粵語 • 中文
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox