Para quem usa o Debian existe uma facilidade para implementação de um wiki
pois podemos usar o apt-get para baixar de uma só vez todos os pacotes necessários.
para poder baixar o mediawiki leia
este link:
No site acima você acha tudo mas mesmo assim vou reproduzir aqui o principal
Editando o
/etc/apt/sources.list adicione estas duas linhas (como root)
deb http://www.cti.ecp.fr/~beauxir5/debian binary/
deb-src http://www.cti.ecp.fr/~beauxir5/debian source/
Não esqueça de salvar!
Rode o apt-get update para sincronizar
Para quem usa o apache simples
You can use either Apache 1.3 or the newer Apache 2. If you are using Apache 1.3, make sure you have the following packages installed
- apache
- php4
- libapache-mod-php4
- php4-gd
- php4-imagick
- php4-mysql
- mysql-server
apt-get install apache php4 libapache-mod-php4
php4-gd php4-imagick php4-mysql mysql-server
Para quem quer usar o apache 2
If you are using Apache 2, you need the following packages instead
- apache2-mpm-prefork
- libapache2-mod-php4
- php4-gd
- php4-imagick
- php4-mysql
- mysql-server
apt-get install apache2-mpm-prefork libapache2-mod-php4
php4-gd php4-imagick php4-mysql mysql-server
The older specific version of apache2 2.0.53-3 is said to not work with MediaWiki, current 2.0.53-5 from stable (sarge) works.
It is possible to use Caudium instead of apache. However, you must use caudium's "PHP support" module; the "Universal script support" does not work with MediaWiki.
If you use Caudium, you must install the caudium-php4 package.
Configurando Apache
Mediawiki uses the ServerName variable defined in your httpd.conf file. Make sure it is set to your website's name. If this isn't done you'll get an error that complains about not being able to connect to localhost or some other website.
Configurando o MySQL
Recomendo usar o phpmyadmin para gerenciar o mysqlse não lembrar da senha tem como zerar, veja
aquiMost of all you need to apply mysql root password. Remember not to use same password for system root and mysql root
mysqladmin -u root password xxxx
Now check if the password works:
mysql -u root
If you see:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
Then mysql root account is now on password protected.
Configuando o PHP
Make sure your php configuration file (/etc/php4/apache/php.ini or /etc/php4/apache2/php.ini) has this line:
memory_limit = 20M
No meu caso coloquei 60M - Queria melhor desempenho
and the following lines uncommented:
extension=mysql.so
extension=gd.so
restart apache / apache2
apachectl restart
apache2ctl restart
Baixando o MediaWiki
Get the latest MediaWiki from MediaWiki SourceForge page example:
dê wget
neste link Copie e extraia para o diretório raiz do apache:
cp mediawiki-1.4.5.tar.gz /var/www cd /var/www tar vxfz mediawiki-1.4.5.tar.gzrenomeie o diretório extraido para wiki
mv mediawiki-1.4.5 wiki In order to configure the wiki you have to make the config subdirectory writable by the web server.
To make the directory writable on a Unix/Linux system:
cd /var/www/wiki chmod a+w config
Navigate your browser to http://localhost/wiki and continue with installation.
Pay good attention for "Checking environment..." in MediaWiki installation script. This can solve a lot of problems for your MediaWiki successful installation. Fill out the configuration form and continue.
Once configuration is done you'll need to move the created LocalSettings.php to the parent directory.
cd /var/www/wiki/config/ chmod 640 LocalSettings.php mv LocalSettings.php ..
For added safety you can then remove the config subdirectory entirely.
rm index.php cd .. rmdir config
And navigate your browser to http://localhost/wiki to see your new wiki. Done!
(no meu caso usei http://localhost.localdomai/wiki)
O wizard de criação Inicial
If you want to setup a master Source of wiki, and multi-slave for different wiki sites. You can ...
get a auto. generate wiki slave script from create_slave_wiki
run the wiki init. install on web, then create the LocalSettings.php.
create a user, then change him to sysop.
TeX Support
You need these packages installed:
- ocaml
- imagemagick
- gs
- cjk-latex
- tetex-extra
- php4-imagick
apt-get install ocaml imagemagick gs cjk-latex tetex-extra php4-imagick
After installation, enable inline LaTeX equations by uncommenting:
$wgUseTeX = true;
in LocalSettings.php file.
Make sure your php.ini contains the following row:
extension=imagick.so
Next compile texvc in your math directory:
cd /var/www/wiki/math make
You may have to manually create the directories for math temp and output directories:
cd /var/www/wiki/images mkdir -m777 math tmp
read math/README for further detailed instructions.
Ocaml-fix
(Added 18/05/05)
Using make I got some errors using Debian stable (Sarge) (unfortunately they are not in my console any more, so i cant show them) but installing additional packages worked. The Error Messages are similar to those (reproduced on ubuntu) :
ocamlopt -c util.ml ocamlc -c render_info.mli ocamlc -c tex.mli ocamlyacc parser.mly ocamlc -c parser.mli ocamlopt -c parser.ml ocamlc -c html.mli ocamlopt -c html.ml ocamlc -c mathml.mli ocamlopt -c mathml.ml ocamlc -c texutil.mli ocamlopt -c texutil.ml ocamlopt -c render.ml ocamllex lexer.mll 188 states, 3222 transitions, table size 14016 bytes ocamlopt -c lexer.ml ocamlopt -c texvc.ml ocamlopt -o texvc unix.cmxa util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx render.cmx lexer.cmx texvc.cmx sh: gcc: command not found Error during linking make: *** [texvc] Error 2 rm parser.ml lexer.ml
In order to fix the problems do the following install:
apt-get install ocaml-core gcc
NOTE: If you have run ocaml -i thinking this would help (as I did) the script may have removed some files. If you can, copy the contents of a backup /images/math directory to your new one after having deleted the old files and run make again.
Note that you have to change the LaTeX code to see if it works (purge the page.)
See also
Bom pessoal é isso!