IGOS Nusantara dan MediaWiki: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
 
(28 revisi antara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
{{verify}}
+
Informasi Wiki yang akan dibuat:
{{Installation Guides}}
+
* Nama wiki adalah IGNwiki
{{MoveToMediaWiki}}
+
* Wiki dibuat di server lokal dengan IP address lokal 192.168.0.1 (lihat: http://igos-nusantara.or.id/wiki/Skema_Jaringan )
 +
* URL http://localhost/wiki/ atau http://192.168.0.1/wiki/
  
create database mediawiki;
+
== Persiapan ==
grant index, create, select, insert, update, delete, alter, lock tables on mediawiki.* to 'mediawiki'@'localhost' identified by 'rahasiaTuW';
+
MediaWiki memerlukan pemasangan:
 +
# Server web: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_server_web
 +
# PHP: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_PHP
 +
# MySQL: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_MySQL
 +
# phpMyAdmin: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_phpMyAdmin
  
MediaWiki is available as a part of Fedora Extras (4 or later). In order to install it, you should run
+
Selesaikan semua tahapan tersebut, selanjutnya lakukan pemasangan MediaWiki.
# yum install mediawiki
+
as root. After installation, open the file <code>/usr/share/doc/mediawiki-x.y.z/INSTALL.fedora</code> and follow the instructions there.
+
  
Note that in recent installations the INSTALL file is at <code>/usr/share/mediawiki/INSTALL</code>
+
== Pasang MediaWiki ==
 +
Masuk terminal sebagai root, pasang MediaWiki memakai yum:
 +
yum install mediawiki
  
If you need support for mathematical formulas, you also need to install <code>mediawiki-math</code>:
+
== Buat database ==
  # yum install mediawiki-math
+
Buka peramban/browser, masuk ke http://localhost/phpMyAdmin atau http://192.168.0.1/phpmyadmin/ klik pada bagian SQL atau di http://192.168.0.1/phpmyadmin/server_sql.php masukkan:
 +
  create database IGNwiki;
 +
grant index, create, select, insert, update, delete, alter, lock tables on IGNwiki.* to 'IGNwiki'@'localhost'  identified by 'rhsBangeTd3H';
  
If you have a more recent Fedora, there is no package ''mediawiki-math''. Because mediawiki requires "texvc" for LaTeX you'll also need to install ''LabPlot''
+
== Sesuaikan mediawiki.conf ==
  # yum install LabPlot
+
Ada di /etc/httpd/conf.d/mediawiki.conf, tambahkan pada bagian akhir.
 +
  # Isi berkas: /etc/httpd/conf.d/mediawiki.conf
 +
Alias /wiki/skins /usr/share/mediawiki/skins
 +
Alias /wiki /var/www/wiki/index.php
 +
Alias /wiki-images /var/www/wiki/images
  
On Fedora Core 4, installing version 1.5.8-1, additional steps are needed
+
== Setup ==
to enable inline LaTeX translation. Some of these steps are described in
+
http://localhost/wiki/config/index.php
the following file: 
+
  
/usr/share/doc/mediawiki-math-1.5.8/README
+
* Wiki name: IGNwiki
 +
* Admin username: admin
 +
* Password: ---rhs---
 +
* Password confirm: ---rhs---
  
If LaTeX formulas are displayed without translation, you might need to uncomment the following line manually in LocalSettings.php, and possibly also restart your httpd server:  
+
* Database name: IGNwiki
 +
* DB username: IGNwiki
 +
* DB password: rhsBangeTd3H
 +
* DB password confirm: rhsBangeTd3H
  
$wgUseTeX = true;
+
== Pindahkan LocalSettings.php ==
 +
Semula ada di /var/www/wiki/config/LocalSettings.php pindahkan ke /var/www/wiki/LocalSettings.php
 +
# mv /var/www/wiki/config/LocalSettings.php /var/www/wiki/LocalSettings.php
  
Here is a method to restart the httpd server under Fedora:
+
== Pasang Logo ==
 +
Buat logo (misal) ign-wiki.png berukuran 130 x 130 pixel. Logo kemudian ditempatkan di /var/www/wiki/images/
  
/etc/init.d/httpd restart      - from root prompt (not recommended)
+
Setelah logo tersimpan di /var/www/wiki/images/ign-wiki.png sesuaikan LocalSettings.php
  sudo /etc/init.d/httpd restart  - from user prompt with sudo configured
+
  $wgLogo = "/wiki-images/ign-wiki.png";
  
After enabling $wgUseTeX, you might see an error message such as this: 
+
== Meringkas URL Wiki ==
+
Secara default Wiki memiliki bentuk URL (contoh) sebagai berikut http://igos-nusantara.or.id/wiki/index.php?title=IGOS_Nusantara_dan_MediaWiki&action=edit
<!-- an effort to make this visually distinct from a *real* error -->
+
*<p class='error'><small>''Failed to parse (Can't write to or create math output directory):''</small></p>
+
  
In MediaWiki file Math.php one finds this source code line:  
+
Ada dua cara untuk meringkas URL yaitu:
 +
=== Cara1 Meringkas URL Wiki dengan akses root ===
  
  global $wgMathDirectory, $wgTmpDirectory, $wgInputEncoding;
+
Tambahkan di bagian akhir dari LocalSettings.php
 +
  $wgScriptPath  = "/wiki";      # Path to the actual files. This should already be there
 +
$wgArticlePath = "/wiki/$1";  # Virtual path. This directory MUST be different from the one used in $wgScriptPath
 +
$wgUsePathInfo = true;         # Enable use of pretty UR
  
In my default LocalSettings.php I found these lines:
 
  
$IP = "/var/www/mediawiki";
+
=== Cara2 Meringkas URL Wiki TANPA akses root ===
$wgUploadDirectory  = "$IP/images";
+
Buat .htaccess di dalam direktori /wiki (ada di /wiki/.htaccess)
# ...
+
$wgMathDirectory    = "{$wgUploadDirectory}/math";
+
$wgTmpDirectory    = "{$wgUploadDirectory}/tmp";
+
$wgTexvc            = '/usr/bin/texvc';
+
$wgUseTeX          = true;
+
  
 +
RewriteEngine On
 +
 +
# Don't rewrite requests for files in MediaWiki subdirectories,
 +
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
 +
RewriteCond %{REQUEST_URI} !^/wiki/(stylesheets|images|skins)/
 +
RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php
 +
RewriteCond %{REQUEST_URI} !^/wiki/error/(40(1|3|4)|500).html
 +
RewriteCond %{REQUEST_URI} !^/wiki/favicon.ico
 +
RewriteCond %{REQUEST_URI} !^/wiki/robots.txt
 +
 +
# Rewrite http://wiki.domain.tld/article properly, this is the main rule
 +
RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]
  
Which suggested this fix:
+
== Taut ==
 
+
* [1] http://www.sciencemedianetwork.org/wiki/About_this_wiki
cd /var/www/mediawiki/images
+
* [2] http://www.mediawiki.org/wiki/Manual_talk:Short_URL/wiki/Page_title_--_no_root_access
sudo mkdir math
+
sudo mkdir tmp
+
sudo chown apache math tmp
+
sudo chmod 775 math tmp
+
 
+
And then there was math. 
+
 
+
For Fedora-specific bug reports, use http://bugzilla.redhat.com/ with the product field set to "Fedora Extras" and the component field to "mediawiki".
+
 
+
*<p class='error'><small>''(PNG conversion failed; check for correct installation of latex, dvips, gs, and convert) :''</small></p>
+
 
+
If you have no error with php but no png generated, it's seems to be a problem with a configuration file of Tex. I solved my problem executing
+
fmtutil-sys --all
+
For more informations, I found the solution here :
+
http://forums.fedoraforum.org/showthread.php?t=197978
+
 
+
== See Also ==
+
 
+
*[[SELinux]]
+
 
+
{{languages|Manual:Running MediaWiki on Fedora Core}}
+
 
+
[[Category:Installation|{{PAGENAME}}]]
+

Revisi terkini pada 21 Agustus 2011 04.26

Informasi Wiki yang akan dibuat:

Persiapan

MediaWiki memerlukan pemasangan:

  1. Server web: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_server_web
  2. PHP: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_PHP
  3. MySQL: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_MySQL
  4. phpMyAdmin: http://igos-nusantara.or.id/wiki/IGOS_Nusantara_dan_phpMyAdmin

Selesaikan semua tahapan tersebut, selanjutnya lakukan pemasangan MediaWiki.

Pasang MediaWiki

Masuk terminal sebagai root, pasang MediaWiki memakai yum:

yum install mediawiki

Buat database

Buka peramban/browser, masuk ke http://localhost/phpMyAdmin atau http://192.168.0.1/phpmyadmin/ klik pada bagian SQL atau di http://192.168.0.1/phpmyadmin/server_sql.php masukkan:

create database IGNwiki;
grant index, create, select, insert, update, delete, alter, lock tables on IGNwiki.* to 'IGNwiki'@'localhost'  identified by 'rhsBangeTd3H';

Sesuaikan mediawiki.conf

Ada di /etc/httpd/conf.d/mediawiki.conf, tambahkan pada bagian akhir.

# Isi berkas: /etc/httpd/conf.d/mediawiki.conf
Alias /wiki/skins /usr/share/mediawiki/skins
Alias /wiki /var/www/wiki/index.php
Alias /wiki-images /var/www/wiki/images

Setup

http://localhost/wiki/config/index.php

  • Wiki name: IGNwiki
  • Admin username: admin
  • Password: ---rhs---
  • Password confirm: ---rhs---
  • Database name: IGNwiki
  • DB username: IGNwiki
  • DB password: rhsBangeTd3H
  • DB password confirm: rhsBangeTd3H

Pindahkan LocalSettings.php

Semula ada di /var/www/wiki/config/LocalSettings.php pindahkan ke /var/www/wiki/LocalSettings.php

# mv /var/www/wiki/config/LocalSettings.php /var/www/wiki/LocalSettings.php

Buat logo (misal) ign-wiki.png berukuran 130 x 130 pixel. Logo kemudian ditempatkan di /var/www/wiki/images/

Setelah logo tersimpan di /var/www/wiki/images/ign-wiki.png sesuaikan LocalSettings.php

$wgLogo = "/wiki-images/ign-wiki.png";

Meringkas URL Wiki

Secara default Wiki memiliki bentuk URL (contoh) sebagai berikut http://igos-nusantara.or.id/wiki/index.php?title=IGOS_Nusantara_dan_MediaWiki&action=edit

Ada dua cara untuk meringkas URL yaitu:

Cara1 Meringkas URL Wiki dengan akses root

Tambahkan di bagian akhir dari LocalSettings.php

$wgScriptPath  = "/wiki";      # Path to the actual files. This should already be there
$wgArticlePath = "/wiki/$1";   # Virtual path. This directory MUST be different from the one used in $wgScriptPath
$wgUsePathInfo = true;         # Enable use of pretty UR


Cara2 Meringkas URL Wiki TANPA akses root

Buat .htaccess di dalam direktori /wiki (ada di /wiki/.htaccess)

RewriteEngine On

# Don't rewrite requests for files in MediaWiki subdirectories, 
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/wiki/(stylesheets|images|skins)/
RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/wiki/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/wiki/favicon.ico
RewriteCond %{REQUEST_URI} !^/wiki/robots.txt

# Rewrite http://wiki.domain.tld/article properly, this is the main rule
RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]

Taut