Afegir WikiMedia a un VHost

De WikiMar
Dreceres ràpides: navegació, cerca

Mireu també MediaWiki


Mes info: http://gentoo-wiki.com/HOWTO_Wiki

1: Crear un Vhost (carpeta dins de /var/www/nomvhost i fitxer de configuracio a /etc/apache2/vhost/nomvhost.conf)

2:

sudo webapp-config -I -h wiki.dafyn.com -d mediawiki mediawiki 1.11.2

Actualitzat:

sudo webapp-config -I -h wiki.dafyn.com mediawiki 1.18.1


3: Crear base de dades MySQL (Actualitzat: Ja no cal, es pot fer posant root account a la web de configuracio):

mysql -u root -p mysql

I aleshores executar les següents commandes mysql:

create database wikidb;
grant create, select, insert, update, delete, alter, lock tables on wikidb.*
to 'wikiuser'@'localhost' identified by 'password';
flush privileges;
set password for 'wikiuser'@'localhost'=password('yourpassword');
\q



POST-INSTALL INSTRUCTIONS
=================================================================

1. Completing setup:

To complete installation cd into the MediaWiki install location, but
make sure to start mysql first.

$ /etc/init.d/mysql start
$ cd /var/www/wiki.dafyn.com/htdocs/mediawiki

Then temporarily make the MediaWiki /config directory writable
to the user the web server is running as. The quickest way is
to make the directory world writable. For example:

$ chmod a+w config

Then access it via a web browser, for example:

lynx http://wiki.dafyn.commediawiki/config/

2. After setup move the newly created LocalSettings.php from the config/
directory to the main mediawiki directory, for example:

$ mv config/LocalSettings.php .

Remember to restore safe permissions to the MediaWiki config/ and
LocalSettings.php (which contains clear-text passwords).

$ chmod a-w config
$ chmod ug=r,o=  LocalSettings.php
$ chown root:apache LocalSettings.php

After these steps MediaWiki should be accesable at
http://wiki.dafyn.commediawiki/

3. Enabling Optional Features:

If you wish to enable image uploads then you must manually edit the
LocalSettings.php file to uncomment the $wgEnableUploads line.
If MediaWiki was built with the imagemagick USE-flag the directory
permissions are correct, otherwise you must install ImageMagick and
also adjust permissions on the images directory to allow the server
to write. For example:

$ chown apache:apache /var/www/wiki.dafyn.com/htdocs/mediawiki/images

Math Support:

If you wish to enable the math support then you must manually edit"
the LocalSettings.php file to uncomment the $wgUseTeX line.
MediaWiki must have been built with the math USE-flag enabled or the
necessary support executable will not be present.
You may also have to execute

$ texconfig dvips printcmd -

if you have not configured tetex before.


4. Things you need to have on the server:

- SQL database of your choice and support for that database compiled in PHP
We check for required PHP features for mysql and postgres use flags in the
ebuild;
you are on your own if you are using a different kind of DB backend.
- dev-php/PEAR-Mail is needed for using external smtp server.

These are not installed as dependencies since it is possible to run the
database
and other services on other machines.

It is very important that you follow all the major versions upgrade
instructions
from the mediawiki.org web page -
http://www.mediawiki.org/wiki/Manual:Upgrading

Do not, I repeat, do not assume that we can upgrade from version to version
just
like this. Make backups before upgrading.


MySQL

Borrar base de dades:

DROP DATABASE wikidb;