IGOS Nusantara dan MediaWiki: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
(Sesuaikan LocalSettings.php)
 
(19 revisi antara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
 
Informasi Wiki yang akan dibuat:
 
Informasi Wiki yang akan dibuat:
 
* Nama wiki adalah IGNwiki
 
* Nama wiki adalah IGNwiki
* Wiki dibuat di server lokal dengan IP address lokal 192.168.1.1
+
* Wiki dibuat di server lokal dengan IP address lokal 192.168.0.1 (lihat: http://igos-nusantara.or.id/wiki/Skema_Jaringan )
* URL http://192.168.1.1/wiki/
+
* URL http://localhost/wiki/ atau http://192.168.0.1/wiki/
 +
 
 +
== Persiapan ==
 +
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
 +
 
 +
Selesaikan semua tahapan tersebut, selanjutnya lakukan pemasangan MediaWiki.
  
 
== Pasang MediaWiki ==
 
== Pasang MediaWiki ==
 +
Masuk terminal sebagai root, pasang MediaWiki memakai yum:
 
  yum install mediawiki
 
  yum install mediawiki
  
 
== Buat database ==  
 
== 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;
 
  create database IGNwiki;
 
  grant index, create, select, insert, update, delete, alter, lock tables on IGNwiki.* to 'IGNwiki'@'localhost'  identified by 'rhsBangeTd3H';
 
  grant index, create, select, insert, update, delete, alter, lock tables on IGNwiki.* to 'IGNwiki'@'localhost'  identified by 'rhsBangeTd3H';
  
 
== Sesuaikan mediawiki.conf ==
 
== Sesuaikan mediawiki.conf ==
Ada di /etc/httpd/conf.d/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 ==
 
== Setup ==
http://192.168.228.6/ign2010/wiki/config/index.php
+
http://localhost/wiki/config/index.php
  
Wiki name: IGNwiki
+
* Wiki name: IGNwiki
Admin username: admin
+
* Admin username: admin
Password: ---rhs---
+
* Password: ---rhs---
Password confirm: ---rhs---
+
* Password confirm: ---rhs---
  
Database name: IGNwiki
+
* Database name: IGNwiki
DB username: IGNwiki
+
* DB username: IGNwiki
DB password: rhsBangeTd3H
+
* DB password: rhsBangeTd3H
DB password confirm: rhsBangeTd3H
+
* DB password confirm: rhsBangeTd3H
  
 
== Pindahkan LocalSettings.php ==
 
== Pindahkan LocalSettings.php ==
Baris 32: Baris 47:
  
 
== Pasang Logo ==
 
== Pasang Logo ==
Nama berkas (misal) ign-wiki.png harus ditempatkan di /var/www/wiki/images/
+
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 ==
 
== 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
 
Secara default Wiki memiliki bentuk URL (contoh) sebagai berikut http://igos-nusantara.or.id/wiki/index.php?title=IGOS_Nusantara_dan_MediaWiki&action=edit
  
=== Sesuaikan mediawiki.conf ===
+
Ada dua cara untuk meringkas URL yaitu:
Berkas mediawiki.conf diatur agar sesuai, ada di /etc/httpd/conf.d/mediawiki.conf
+
=== Cara1 Meringkas URL Wiki dengan akses root ===
# Isi berkas: /etc/httpd/conf.d/mediawiki.conf
+
Alias /wiki/skins /usr/share/mediawiki/skins
+
Alias /wiki /var/www/wiki/index.php
+
Alias /images /var/www/wiki/images
+
  
=== Sesuaikan LocalSettings.php  ===
 
 
Tambahkan di bagian akhir dari LocalSettings.php
 
Tambahkan di bagian akhir dari LocalSettings.php
  $wgScriptPath       = "/ign2010/wiki"; # Path to the actual files. This should already be there
+
  $wgScriptPath = "/wiki";     # Path to the actual files. This should already be there
  $wgArticlePath = "/ign2010/wiki/$1";  # Virtual path. This directory MUST be different from the one used in $wgScriptPath
+
  $wgArticlePath = "/wiki/$1";  # Virtual path. This directory MUST be different from the one used in $wgScriptPath
  $wgUsePathInfo = true;                 # Enable use of pretty UR
+
  $wgUsePathInfo = true;         # Enable use of pretty UR
  
$wgLogo = "/ign2010/images/ign-wiki.png";
 
  
// disable language selection
+
=== Cara2 Meringkas URL Wiki TANPA akses root ===
$wgHiddenPrefs[] = 'language';
+
Buat .htaccess di dalam direktori /wiki (ada di /wiki/.htaccess)
  
$wgGroupPermissions['*']['edit'] = false;
+
  RewriteEngine On
 
+
=== Buat file robots.txt ===
+
Buat file robots.txt dan simpan di folder awal situs
+
  User-agent: *
+
Disallow: /w/
+
Disallow: /wiki/Special:Search
+
Disallow: /wiki/Special:Random
+
 
+
=== BAHAN ===
+
 
+
    # cp /var/www/wiki/config/LocalSettings.php /var/www/wiki/LocalSettings.php
+
 
+
Your Wiki is now ready for use.
+
 
+
Tip: To set the logo that appears in the upper-left corner of the wiki pages, add a line to the end of /var/www/wiki/LocalConfiguration.php (just before the line which reads "?>" ) which sets $wgLogo to the URI of a 153 x 153 pixel image:
+
 
+
    $wgLogo='http://Hostname/wiki/mylogo.png';
+
 
+
 
+
 
+
MediaWiki is available as a part of Fedora Extras (4 or later). In order to install it, you should run
+
# 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>
+
 
+
If you need support for mathematical formulas, you also need to install <code>mediawiki-math</code>:
+
# yum install mediawiki-math
+
 
+
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''
+
# yum install LabPlot
+
 
+
On Fedora Core 4, installing version 1.5.8-1, additional steps are needed
+
to enable inline LaTeX translation.  Some of these steps are described in
+
the following file: 
+
 
+
/usr/share/doc/mediawiki-math-1.5.8/README
+
 
+
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: 
+
 
+
$wgUseTeX = true;
+
 
+
Here is a method to restart the httpd server under Fedora:
+
 
+
/etc/init.d/httpd restart      - from root prompt (not recommended)
+
sudo /etc/init.d/httpd restart  - from user prompt with sudo configured
+
 
+
After enabling $wgUseTeX, you might see an error message such as this: 
+
 
   
 
   
<!-- an effort to make this visually distinct from a *real* error -->
+
# Don't rewrite requests for files in MediaWiki subdirectories,
*<p class='error'><small>''Failed to parse (Can't write to or create math output directory):''</small></p>
+
  # MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
 
+
  RewriteCond %{REQUEST_URI} !^/wiki/(stylesheets|images|skins)/
In MediaWiki file Math.php one finds this source code line:
+
  RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php
 
+
  RewriteCond %{REQUEST_URI} !^/wiki/error/(40(1|3|4)|500).html
  global $wgMathDirectory, $wgTmpDirectory, $wgInputEncoding;
+
  RewriteCond %{REQUEST_URI} !^/wiki/favicon.ico
 
+
  RewriteCond %{REQUEST_URI} !^/wiki/robots.txt
In my default LocalSettings.php I found these lines:
+
   
 
+
  # Rewrite http://wiki.domain.tld/article properly, this is the main rule
  $IP = "/var/www/mediawiki";
+
RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]
  $wgUploadDirectory  = "$IP/images";
+
# ...
+
  $wgMathDirectory    = "{$wgUploadDirectory}/math";
+
  $wgTmpDirectory    = "{$wgUploadDirectory}/tmp";
+
$wgTexvc            = '/usr/bin/texvc';
+
  $wgUseTeX          = true;
+
 
+
 
+
Which suggested this fix: 
+
 
+
cd /var/www/mediawiki/images
+
  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}}]]
+
== Taut ==
 +
* [1] http://www.sciencemedianetwork.org/wiki/About_this_wiki
 +
* [2] http://www.mediawiki.org/wiki/Manual_talk:Short_URL/wiki/Page_title_--_no_root_access

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