Installation von Mediawiki unter Ubuntu: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 68: Zeile 68:
 
  php rebuildall.php
 
  php rebuildall.php
 
Quelle: http://www.mediawiki.org/wiki/Manual:Rebuildall.php
 
Quelle: http://www.mediawiki.org/wiki/Manual:Rebuildall.php
 +
 +
 +
== Kurzform ==
 +
 +
sudo apt-get install mediawiki imagemagick mediawiki-math mysql-server
 +
 +
remove the '#' from the third line so that it reads 'Alias /wiki /var/lib/mediawiki':
 +
vi /etc/apache2/conf.d/mediawiki.conf
 +
 +
sudo /etc/init.d/apache2 restart
 +
 +
"DEINEIP"/mediawiki in der URL-Leiste eingeben und konfigurieren
 +
 +
Konfigurieren
 +
 +
sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
 +
 +
sudo chmod 600 /etc/mediawiki/LocalSettings.php
 +
 +
sudo rm -Rf /var/lib/mediawiki/config
 +
 +
cp my_new_logo /var/lib/mediawiki/skins/common/images/wiki.png
 +
 +
Port 80 löschen
 +
vi /etc/apache2/ports.conf
 +
 +
cd /etc/apache2/mods-enabled
 +
ln -s ../mods-available/ssl.* .
 +
 +
cd /etc/apache2/sites-enabled/
 +
rm 000-default
 +
ln -s ../sites-available/default-ssl 000-default-ssl
 +
 +
mkdir /etc/apache2/ssl
 +
ssh ezri
 +
makekpi cert "name"
 +
scp "name".* root@"serverip":/etc/apache2/ssl/
 +
 +
servername ändern
 +
vi /etc/apache2/apache2.conf
 +
 +
htpasswd -c /etc/apache2/password xinux
 +
-> *PASSWORD*
 +
 +
"wgEnableUploads = true" setzen
 +
vi /var/lib/mediawiki/Localsettings.php

Version vom 30. Januar 2013, 09:40 Uhr

Installation

Install To install on your Ubuntu server (with Apache and MySQL - ApacheMySQLPHP or another web server already installed):

sudo apt-get install mediawiki imagemagick mediawiki-math mysql-server

To enable MediaWiki edit the following file and remove the '#' from the third line so that it reads 'Alias /wiki /var/lib/mediawiki':

gksu gedit /etc/apache2/conf.d/mediawiki.conf

Then restart apache:

sudo /etc/init.d/apache2 restart

The next step is to visit the website. Since you will be entering passwords, you don't want to make an unsecured connection. Either set up a ssl server] ( see forum/server/apache2/SSL) and connect with https://your.site.net/mediawiki, or visit from the server itself (using [lynx] or [links], two excellent text-based web browsers):

lynx localhost/mediawiki

Fill out the forms, noting that the final form is NOT your root or user password, but the password for the root mysql account (blank by default)

Lastly, move the config files as requested to prevent anyone else from changing these settings:

NOTE: Check the output in your web browser if its instructions differ from below follow them.

sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
sudo chmod 600 /etc/mediawiki/LocalSettings.php
sudo rm -Rf /var/lib/mediawiki/config

You are done! you should see a wiki page at: http://your.site.net/mediawiki

Customize

The Apache config files reside at /etc/apache2/conf.d/mediawiki.conf

You might want to customize the look of your wiki.

To change the icon make a 135x135 pixel logo in PNG format and move it to the right place:

sudo cp my_new_logo.png /var/lib/mediawiki/skins/common/images/wiki.png

To get rid of the Mac-like sunburst in the background, edit /var/lib/mediawiki/skins/monobook/main.css and change:

background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat; to

background: #f9f9f9; see http://prevolution.org/mediawikifarm for running multiple wikis on a server


Dump and Restore with MySQL

An example command on how to dump the database on a Debian GNU/Linux machine using mysqldump:

root@zero:~# mysqldump --user=USERNAME --password=PASSWORD --single-transaction --all-databases > BACKUPFILE.sql


dump database named "wikidb"

root@zero:~# mysqldump -u root -psysadm  wikidb > wikidb.sql

restore database named "wikidb"

root@lydia:~# mysql -u root -p -B wikidb < wikidb.sql

save all pictures

root@lydia:/var/lib/mediawiki/images# rsync  -avz zero:/var/lib/mediawiki/images/*

Suchindex Wiederherstellen

im maintenance/-Verzeichnis der MediaWiki Installation wechseln

php rebuildall.php

Quelle: http://www.mediawiki.org/wiki/Manual:Rebuildall.php


Kurzform

sudo apt-get install mediawiki imagemagick mediawiki-math mysql-server

remove the '#' from the third line so that it reads 'Alias /wiki /var/lib/mediawiki':

vi /etc/apache2/conf.d/mediawiki.conf
	
sudo /etc/init.d/apache2 restart

"DEINEIP"/mediawiki in der URL-Leiste eingeben und konfigurieren

Konfigurieren

sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
sudo chmod 600 /etc/mediawiki/LocalSettings.php
sudo rm -Rf /var/lib/mediawiki/config
cp my_new_logo /var/lib/mediawiki/skins/common/images/wiki.png

Port 80 löschen

vi /etc/apache2/ports.conf
cd /etc/apache2/mods-enabled
ln -s ../mods-available/ssl.* .
cd /etc/apache2/sites-enabled/
rm 000-default
ln -s ../sites-available/default-ssl 000-default-ssl
mkdir /etc/apache2/ssl
ssh ezri
makekpi cert "name"
scp "name".* root@"serverip":/etc/apache2/ssl/

servername ändern

vi /etc/apache2/apache2.conf
htpasswd -c /etc/apache2/password xinux 
-> *PASSWORD*

"wgEnableUploads = true" setzen

vi /var/lib/mediawiki/Localsettings.php