Replikasi Database dan Image MediaWiki

From OnnoWiki
Revision as of 09:46, 12 February 2008 by Onnowpurbo (talk | contribs) (New page: Ambil Image dan isi database [http://opensource.telkomspeedy.com/wiki SpeedyWiki] dari http://opensource.telkomspeedy.com/speedyorari/ di folder datawiki Copykan ke sebuah folder, misalny...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ambil Image dan isi database SpeedyWiki dari http://opensource.telkomspeedy.com/speedyorari/ di folder datawiki

Copykan ke sebuah folder, misalnya, /usr/local/src

# cp images.tar.gz /usr/local/src/
# cp wikidb.sql.gz /usr/local/src/

Bukan dan extract seluruh data

# cd /usr/local/src
# tar zxvf images.tar.gz
# gunzip wikidb.sql.gz

Copy Image ke folder image di MediaWiki

# cd /usr/local/src
# cp -Rf /usr/local/src/var/www/html/wiki/images /var/www/wiki/

Lihat konfigurasi MediaWiki, dari file

# vi /var/www/wiki/LocalSettings.php

Lihat isi parameter berikut

$wgDBtype           = "mysql";
$wgDBname           = "wikidb";
$wgDBuser           = "wikiuser";
$wgDBpassword       = "wikipassword";


Beri akses wikiuser ke tabel archive


# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant ALL on wikidb.* to wikiuser@localhost;
Query OK, 0 rows affected (0.21 sec)
mysql> grant ALL on archive.* to wikiuser@localhost;
Query OK, 0 rows affected (0.09 sec)
mysql> quit

Masukan isi database dari SpeedyWiki ke MySQL

# mysql -u wikiuser -pwikipassword wikidb < /usr/local/src/wikidb.sql

Restart Database MySQL

# /etc/init.d/mysql restart