Tampilkan postingan dengan label mediawiki. Tampilkan semua postingan
Tampilkan postingan dengan label mediawiki. Tampilkan semua postingan

Selasa, 06 Januari 2009

Restrict Access on Mediawiki

Setelah sukses mengganti logo dan menambah favicon.ico di mediawiki, saya berlanjut mengutak-atik konfigurasi mediawiki. Saya ingin:
- Isi mediawiki hanya bisa dibaca dan disunting oleh mereka yang memiliki akun
- Tidak semua orang bisa mendaftar menjadi anggota

Untuk itu saya menambahkan baris berikut pada berkas LocalSettings.php

# 1.5 upwards
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

# 1.5 upwards
# Restrict anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# 1.5 upwards
# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;
# But allow them to read e.g., these pages:
$wgWhitelistRead = array ( "Main Page", "Special:Userlogin", "Help:Contents");


Referensi: Media Wiki Manual:Preventing Access

Rabu, 31 Desember 2008

Tambahkan favicon.ico

Dengan cara yang hampir sama menambah logo, berikut adalah cara menambah favicon.ico. Buat gambar favicon.ico-nya dulu dengan ukuran 32 x 32 piksel atau 16 x 16 piksel. Bisa dibuat menggunakan pengolah gambar GIMP.

Lalu salin ke direktori (direktori sistem operasi) /var/lib/mediawiki/skins/common/images/favicon.ico

Tambahkan baris berikut pada berkas /etc/mediawiki/LocalSettings.php

$wgFavicon = "/wiki/skins/common/images/favicon.ico";

Grr Ganti Logo Mediawiki

Grr... akhirnya bisa juga. Setelah kutak-katik, akhirnya aku bisa juga ganti logo mediawiki. Sederhana harusnya. Cuma jadi rumit saat konsep path bercampur baur dengan konfigurasi dan direktori di sistem operasi

Berikut konfigurasi /etc/apache2/sites-available/wiki
# more /etc/apache2/sites-available/wiki

ServerAdmin za@design.paume.itb.ac.id
ServerName ***.****.itb.ac.id
DocumentRoot /var/lib/mediawiki

ErrorLog /var/log/apache2/error-wiki.log
LogLevel warn
CustomLog /var/log/apache2/access-wiki.log common

ServerSignature Off


Lalu petunjuk pencerahan saya dapat saat membaca cuplikan log
# vim /var/log/access-wiki.log
...
*** - - [24/Dec/2008:02:20:54 -0600] "GET /wiki/skins/monobook/bullet.gif HTTP/1.1" 304 -
*** - - [24/Dec/2008:02:20:54 -0600] "GET /wiki/skins/common/images/poweredby_mediawiki_88x31.png HTTP/1.1" 304 -
*** - - [24/Dec/2008:02:20:54 -0600] "GET /wiki/skins/monobook/user.gif HTTP/1.1" 304 -
...


Ternyata direktori /wiki masih diperlukan sebagai path untuk memanggil gambar. Logo baru yang ingin saya masukkan, saya salin ke (ini path sistem operasi) /var/lib/mediawiki/skins/common/images/logo.png

Lalu tambahkan baris berikut pada /etc/mediawiki/LocalSettings.php

...
$wgLogo = "/wiki/skins/common/images/logo.png"
...


Taraaa!!!!

Senin, 22 Desember 2008

Install MediaWiki

Hari ini saya eksperimen install mediawiki. Awalnya saya install dengan database postgresql. Namun gagal. Akhirnya, saya gunakan mysql. Di bawah ini adalah catatan-catatan kegagalan saat instalasi sebagai bahan pelajaran dan dokumentasi.

Gagal pertama
Checking environment...

Please include all of the lines below when reporting installation problems.

* PHP 5.2.6-5 installed
* Found database drivers for: PostgreSQL
* PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* Session save path (/var/lib/php5) appears to be valid.
* PHP's memory_limit is 128M.
* Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
* Found GNU diff3: /usr/bin/diff3.
* Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
* Installation directory: /var/lib/mediawiki
* Script URI path: /mediawiki
* Installing MediaWiki with php file extensions
* Environment checked. You can install MediaWiki.
*

Generating configuration file...

Notice: Constant MW_INSTALL_PATH already defined in /var/lib/mediawiki/config/index.php(717) : eval()'d code on line 16
* Database type: PostgreSQL
* Loading class: DatabasePostgres
* Attempting to connect to database "postgres" as superuser "root"...
* Checking the version of Postgres...version 8.3 is OK.
* User "wikiuser" already exists, skipping account creation.
* Database "wikidb" already exists, skipping database creation.
* Connecting to "wikidb" as superuser "root" to check rights...OK
* Creating schema mediawiki ...
Warning: pg_query() [function.pg-query]: Query failed: ERROR: permission denied for database wikidb in /usr/share/mediawiki/includes/DatabasePostgres.php on line 591
FAILED.


Gagal kedua
Checking environment...

Please include all of the lines below when reporting installation problems.

* PHP 5.2.6-5 installed
* Found database drivers for: PostgreSQL
* PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* Session save path (/var/lib/php5) appears to be valid.
* PHP's memory_limit is 128M.
* Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
* Found GNU diff3: /usr/bin/diff3.
* Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
* Installation directory: /var/lib/mediawiki
* Script URI path: /mediawiki
* Installing MediaWiki with php file extensions
* Environment checked. You can install MediaWiki.
*

Generating configuration file...

Notice: Constant MW_INSTALL_PATH already defined in /var/lib/mediawiki/config/index.php(717) : eval()'d code on line 16
* Database type: PostgreSQL
* Loading class: DatabasePostgres
* Attempting to connect to database "postgres" as superuser "postgres"...
* Checking the version of Postgres...version 8.3 is OK.
* User "wikidb" already exists, skipping account creation.
* Creating database wikiuser...OK
* Connecting to "wikiuser" as superuser "postgres" to check rights...OK
* Creating schema mediawiki ...OK
* Checking for Pl/Pgsql ...not installed. Attempting to install Pl/Pgsql ...OK
* Attempting to connect to database "wikiuser" as "wikidb"... error: No database connection
* Checking the version of Postgres...
Warning: pg_query(): supplied argument is not a valid PostgreSQL link resource in /usr/share/mediawiki/includes/DatabasePostgres.php on line 591

Warning: pg_fetch_result(): supplied argument is not a valid PostgreSQL result resource in /usr/share/mediawiki/includes/DatabasePostgres.php on line 1027
Could not determine the numeric version from !


Yang ini yang berhasil

media wiki mysql berhasil

MediaWiki 1.12.0 Installation

* Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.

Checking environment...

Please include all of the lines below when reporting installation problems.

* PHP 5.2.6-5 installed
* Found database drivers for: MySQL PostgreSQL
* PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* Session save path (/var/lib/php5) appears to be valid.
* PHP's memory_limit is 128M.
* Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
* Found GNU diff3: /usr/bin/diff3.
* Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
* Found GD graphics library built-in.
* Installation directory: /var/lib/mediawiki
* Script URI path: /mediawiki
* Installing MediaWiki with php file extensions
* Environment checked. You can install MediaWiki.
*

Generating configuration file...

Notice: Constant MW_INSTALL_PATH already defined in /var/lib/mediawiki/config/index.php(717) : eval()'d code on line 16
* Database type: MySQL
* Loading class: DatabaseMysql
* Attempting to connect to database server as root...success.
* Connected to 5.0.51a-19
* Attempting to create database...
* Created database wikidb
* Creating tables... done.
* Initializing statistics...
* Granting user permissions to wikiuser on wikidb...success.
* Created sysop account WikiSysop.
*

Creating LocalSettings.php...

Installation successful! Move /var/lib/mediawiki/config/LocalSettings.php to /etc/mediawiki, then follow this link to your wiki.

You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. or read it online

* MediaWiki home
* Readme
* Release notes
* Documentation
* User's Guide
* FAQ

MediaWiki is Copyright © 2001-2008 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.

Kamis, 13 Desember 2007

Media Wiki

Aku jadi punya ide, menulis dokumentasi penelitian dalam bentuk Wiki. Apa sekarang mau belajar instalasi dan konfigurasi MediaWiki aja ya? Back to techie things