Manual:Installation/pt

From MediaWiki.org

Jump to: navigation, search
Installation guides
on FreeBSD
on GNU/Linux
- Damnsmalllinux
- Debian
- Fedora Core
- Gentoo
- Mandrake
- Red Hat Enterprise Linux
- Slackware
- SuSE 9.3
- Ubuntu
on Mac OS X
on NetWare
on Solaris
- on Solaris 10
- on Solaris 9
on Windows
- Windows XP
- Windows Vista
- Windows Server 2000
- Windows Server 2003
- Newcomers guide
- Streamlined Guide
- Simple Windows/Apache Guide
- on a stick
- on WOS Portable
- on Uniform Server
- on Sourceforge.net

Este guia fornece instruções para o MediaWiki. Para uma breve introdução, por favor consulte o Manual:Guia de instalação. Para ajuda sobre sistemas operacionais específicos, consulte o menu à direita.

O MediaWiki pode ser difícil de instalar para muitos dos usuários de computador que não tenham experiência com Apache, PHP and MySQL. Usuários comuns que desejam utilizar software wiki podem utilizar hospedagem wiki gratuita (veja uma lista de hospedagem wiki nos Wikilivros).

Contents


[edit] Pré-requisitos

Installation Guide | About MediaWiki
Features | Installation requirements
Downloading | Installing | Configuring


Além do próprio software, uma instalação padrão do MediaWiki tem os seguintes pré-requisitos:

Além disso, há várias dependências opcionais que são exigidas se você quiser utilizar certos recursos avançados (veja abaixo).

Lembre-se de ler a documentação para cada componente individual antes da instalação. Se seu website é hospedado por terceiros (isto é, se você não tem controle direto sobre ele), entre em contato com os administradores do servidor ou da empresa de hospedagem para certificar-se de que esses componentes estão instalados.

Note que, embora o MediaWiki venha com um script de instalação, que fornece uma maneira de configurar seus módulos mais importantes pela web, é necessário conhecimento em PHP para personalizações mais detalhadas.

PHP

PHP é a linguagem de programação a qual o MediaWiki foi escrito, e o componente PHP é exigido para o software funcionar.

Se você precisar compilar o PHP do código-fonte, então veja a seção PHP configuration para opções de compilação que afetam o MediaWiki.

Atenção:
  • Alguns servidores podem também exigir a instalação de módulos para conexão a banco de dados e administração de sessões. Veja instruções detalhadas para cada sistema operacional para mais informações.
  • Quando instalado no Windows, usando o Instalador da Microsoft, adicione a extensão para o MySQL ou Postgres nos recursos a serem instalados.

Servidor de banco-de-dados

O MediaWiki guarda todos os textos e dados (artigos, informações sobre o usuário, mensagens do sistema, etc.) num banco-de-dados, que pode ser compartilhado com outras aplicações web, como o phpBB. A última versão do MediaWiki suporta os seguintes servidores de banco-de-dados (você só precisa de apenas um destes):

Alguns usuários acham interessante instalar pacotes adicionais de software, como o phpMyAdmin (MySQL) ou o phpPgAdmin (Postgres) para ajudar a administrar o servidor de banco-de-dados.

*Atenção: O suporte ao MySQL 4 é exigido desde o MediaWiki 1.6. Se você estiver utilizando uma versão mais antiga do MySQL e não puder atualizá-lo, você deve usar o MediaWiki 1.5.8. Note que não há mais suporte técnico para esta versão.

Servidor web

Para gerar as páginas que serão mostradas no seu navegador, o MediaWiki exige algum servidor web. Se seu website for hospedado por terceiros, provavelmente você não poderá escolher qual servidor web usar - ele já foi instalado pelo seu provedor de hospedagem.

Requerimentos de hardware

Os requerimentos mínimos são 256 megabytes de memória RAM para um site hospedado em um computador simples e 40MB de armazenamento, embora isso não seja suficiente para um site com um grande público, ou que permita upload de arquivos. Alguns usuários têm informado que conseguem executar o MediaWiki em computadores com 48MB de memória RAM.

Dependências opcionais

  • ImageMagick ou GD são exigidos para geração de miniaturas de imagens.
  • TeX é exigido para mostrar fórmulas matemáticas.
  • Sendmail é exigido para permitir que o sistema envie e-mails.

Para mais informações sobre os itens acima, consulte Manual:Installing third-party tools.



[edit] Instalação

MediaWiki installs itself using an interactive, web-based installation script. Before you can run this script, you need to do a couple of things. First, ensure that you have installed prerequisites (Apache/IIS, MySQL4 or later and PHP5). Then you must acquire the MediaWiki software package and upload the MediaWiki software to your server. You may also have to create a new database for your wiki. If necessary, create an account on your web server by following the instructions at Manual:Installation/Creating system accounts.

MediaWiki can be difficult to install for the average computer user who does not have experience with Apache, PHP and MySQL. Most users who wish to use wiki software may benefit from using a free wiki host (see a list of wiki hosts on Wikibooks).

Note Note: For troubleshooting information, see Manual:Errors and Symptoms#Installation Errors.

Download MediaWiki Software

Download MediaWiki from the official download page or from subversion.

Uncompress the files locally or on your server. This is usually done with software such as 7-Zip (free), WinZip, WinRAR or IZArc (free) on Windows. On Linux and Mac OS X, you can untar the file using this command:

tar xvzf mediawiki-*.tar.gz

If you have not already uploaded the files to your web server, do so now. Upload the files to your web server's web directory either by directly copying the unzipped folder or by using an FTP client such as FileZilla (Open Source Software, Windows) or Cyberduck (OSX). If you installed Apache, the correct directory is specified in your httpd.conf file (its typically <apache-folder>/htdocs). If you are using a Linux or Unix you can instead copy the files to any directory on your server and then make a symbolic link to that folder from your web server's web directory.

Rename the uploaded folder to whatever you would like to have in the URL. If your web server is running as http://localhost for example, uploading MediaWiki to /testwiki/ directory would mean you would access your wiki at http://localhost/testwiki/index.php.

This (renamed) folder will now be referred as <MediaWiki-folder>.

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.

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.

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';
 flush privileges;
 \q

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';

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

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.

su - postgres
psql -d wikidb -c "grant select on pg_ts_cfg to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_cfgmap 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';"

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

Run the installation script

Once all of the above steps are complete, you can complete the installation through web browser by following instructions mentioned there on Manual:Config script page.

[edit] See also



[edit] Configuração

Basic configuration

When you first install MediaWiki, you should run the supplied configuration script via your web browser. This will perform the basic configuration required to get the wiki up and running. See Manual:Config script for full details running the script.

Further configuration

Once the wiki has been installed and configured using the above configuration script, any further customisations need to be made by configuring LocalSettings.php

For help with more advanced technical configuration, see Manual:System administration, m:Help:Configuration, and m:Help:Administration.

For a brief overview that addresses the empty help pages and text and layout modification, see m:Help:Installation-Software_Configuration.

[edit] See also


[edit] Desinstalação

A remoção completa do MediaWiki pode ser cumprida em apenas dois passos: remover o diretório onde o MediaWiki está instalado, e apagar o banco de dados MediaWiki do MySQL ou Postgres.

Por exemplo, se você instalou o MediaWiki em /var/www/mediawiki-xyz, você deve:

rm -rf /var/www/mediawiki-xyz

[edit] MySQL

Para remover o banco de dados MySQL, use o utilitário mysql para conectar-se interativamente ao MySQL como um usuário com permissões adequadas, e então execute o seguinte comando após o prompt mysql>:

DROP DATABASE wikidb;

[edit] Postgres

Para remover o banco de dados do Postgres, execute o comando seguinte:

 dropdb wikidb

ou conecte-se ao banco de dados como um usuário com as permissões corretas e execute o seguinte comando:

 DROP DATABASE wikidb;

[edit] Instalação para acesso offline

See:

[edit] Veja também

[edit] Links

  • Lopez, Daniel Sams ensina a si mesmo Apache 2 em 24 horas. Um livro excelente e intuitivo: o 3º capítulo explica como instalar o Apache. Você pode ver o livro no site Amazon.com (você deverá se registrar primeiro no Amazon para ver as páginas)
  • Uma explicação desatualizada de como instalar, configurar e fazer o Apache 1.3, MySQL 3, PHP 4 funcionar no Windows XP em menos de meia hora. (Este documento está um tanto desatualizado, porque data de 5 de Outubro de 2003, porém, é um artigo muito bem escrito!) Por exemplo, como em 1º de Janeiro de 2006:
  • Ele referencia o Apache 1.3 quando já havia o Apache 2.2. A sintaxe sugerida pelo artigo para o httpd.conf evita o reinício do Apache.
    1. Ele referencia o PHP 4 quando já há o PHP 5.1.
    2. Ele referencia o MySQL 3.23 quando já há o MySQL 5.x.

Instalando o MediaWiki em um servidor web Sun Java System 7.0

Para Windows XP, você pode querer apontar usuários para um site similar ao XAMPP para Windows. Ele parece cobrir os requsitos mínimos do Apache, PHP e MySQL.

[edit] Referências

Personal tools