미디어위키 설치법/설치법: 두 판 사이의 차이

위키책, 위키책
내용 삭제됨 내용 추가됨
Betalph (토론 | 기여)
원룡님 허가, 일단 이식
(차이 없음)

2010년 6월 15일 (화) 07:42 버전

윈도우즈 XP에서 미디어위키 설치

미디어위키 홈페이지에서 최신버전을 다운로드

http://www.mediawiki.org

Download a package
Current version
* mediawiki-1.7.1.tar.gz
* SVN: REL1_7_1

멀뚱이는 1.7.1 버전인 mediawiki-1.7.1.tar.gz 파일을 다운받았다.

그냥 바탕화면(Desktop)에 바로 다운받았다.

압축을 푼다

마우스 오른쪽으로 클릭하면 여기다 압축풀기가 뜬다.

그냥 바탕화면에 바로 압출 풀었다.

mediawiki-1.7.1 폴더가 생겨났다.

폴더 이름 변경

mediawiki-1.7.1 을 homewiki로 바꾸었다.

[root@ Desktop]# mv mediawiki-1.7.1 homewiki

아파치 웹서버의 루트 디렉토리로 이동시킨다

페도라아파치 웹 서버를 구동시키니까, 기본 루트는 /var/www/html 이었다.

거기에 homewiki를 통째로 이동시켰다.

[root@dhcp-323-30693 Desktop]# mv homewiki /var/www/html

접근 설정

chmod를 이용해 접근권한을 변경해준다. 외부사용자가 접근할 수 있게 바꿔준다.

[root@dhcp-323-30693 Desktop]# cd /var/www/html/homewiki
[root@dhcp-323-30693 Desktop]# chmod a+w config
[root@dhcp-323-30693 homewiki]# ls -l
합계 436
drwxrwxrwx 2 jimy jimy 4096 7월 9 14:45 config
[root@dhcp-323-30693 homewiki]# cd config
[root@dhcp-323-30693 config]# ls -l
합계 64
-rw-r--r-- 1 jimy jimy 54330 7월 9 14:45 index.php

이제 파이어폭스로 접속해보자

http://localhost/homewiki/config/ 여기가 주소다. 쳐보면, 드디어 미디어위키 인스톨러가 실행된다. http://localhost/homewiki/config/index.php 뭐 이렇게 쳐도 된다. 여하튼 이제 설치프로그램이 시작되었다.

몇가지 설정들을 해준다

설치 완료 메시지가 나온다

Creating LocalSettings.php...

Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow this link to your wiki.

아래부분에 위와 같이 메시지가 나오는데, config/LocalSettings.php 파일을 그 상위 디렉토리로 이동시키란다.

[root@dhcp-323-30693 /]# cd /var/www/html/homewiki/config
[root@dhcp-323-30693 config]# ls
LocalSettings.php index.php
[root@dhcp-323-30693 config]# mv Lo* ..
[root@dhcp-323-30693 config]# ls
index.php
[root@dhcp-323-30693 config]# cd ..
[root@dhcp-323-30693 homewiki]# ls L*
LocalSettings.php

설치 끝

이제 설치 끝났다. 사용하면 된다. 주소는 http://localhost/homewiki/ 이다.

미디어위키에 인터위키 설정하기

meta:도움말:미디어위키에 인터위키 설정하기에 멀뚱이가 직접 실행하면서 설명한 인터위키 설정법이 있다.

meta:Help:Guide for system administrators for setting up interwiki linking

Translation to korean language (ko)

예제는 user:멀뚱이가 직접 실행한 것이다.

mysql 시작하기

mysql -u <mysql 관리자 계정> -p

그리고 나서 암호를 입력한다.

mysql> USE <미디어위키 데이타베이스 이름>

예제:

[jimy@dhcp-323-95323 ~]$ su -
Password:
[root@dhcp-323-95323 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 45 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
mysql> use wdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

인터위키 테이블 보기

여기서 interwiki는 혹시 테이블 prefix를 설정한 경우에는 yourprefix_interwiki를 쓰라는 의미이다.

interwiki<tab><tab> 탭키를 두번 누른다.

mysql> interwiki (엔터키 치지말고 탭키를 연속 두 번 누르기)
interwiki            interwiki.iw_prefix
interwiki.iw_local   interwiki.iw_url
mysql> interwiki 

예제:

Database changed
mysql> mw_interwiki (엔터키 치지말고 탭키를 연속 두 번 누르기)
mw_interwiki            mw_interwiki.iw_prefix  mw_interwiki.iw_url
mw_interwiki.iw_local   mw_interwiki.iw_trans
mysql> mw_interwiki

주된 테이블은 'interwiki'이다.

이제 이 테이블의 내용들을 보자:

SELECT COUNT(*) FROM interwiki;

무엇이 있나 보자:

SELECT * FROM interwiki;

예제:

mysql> SELECT COUNT(*) FROM mw_interwiki;
+----------+
| COUNT(*) |
+----------+
|      179 |
+----------+
1 row in set (0.09 sec)

mysql> SELECT * FROM mw_interwiki;
+---------------------+-----------------------------------------------------------------------------------+----------+----------+
| iw_prefix           | iw_url                           | iw_local | iw_trans |
+---------------------+-----------------------------------------------------------------------------------+----------+----------+
| abbenormal          | http://www.ourpla.net/cgi-bin/pikie.cgi?$1                           |        0 |        0 |
| acadwiki            | http://xarch.tu-graz.ac.at/autocad/wiki/$1                           |        0 |        0 |
| acronym             | http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1                 |        0 |        0 |
| advogato            | http://www.advogato.org/$1                           |        0 |        0 |
| aiwiki              | http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?$1                           |        0 |        0 |
| alife               | http://news.alife.org/wiki/index.php?$1                           |        0 |        0 |
| annotation          | http://bayle.stanford.edu/crit/nph-med.cgi/$1                           |        0 |        0 |
| annotationwiki      | http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1                           |        0 |        0 |
| arxiv               | http://www.arxiv.org/abs/$1                           |        0 |        0 |
| aspienetwiki        | http://aspie.mela.de/Wiki/index.php?title=$1                           |        0 |        0 |
| bemi                | http://bemi.free.fr/vikio/index.php?$1                           |        0 |        0 |
| benefitswiki        | http://www.benefitslink.com/cgi-bin/wiki.cgi?$1                           |        0 |        0 |
| brasilwiki          | http://rio.ifi.unizh.ch/brasilienwiki/index.php/$1                           |        0 |        0 |
| bridgeswiki         | http://c2.com/w2/bridges/$1                           |        0 |        0 |
| c2find              | http://c2.com/cgi/wiki?FindPage&value=$1                           |        0 |        0 |
| cache               | http://www.google.com/search?q=cache:$1                           |        0 |        0 |
| ciscavate           | http://ciscavate.org/index.php/$1                           |        0 |        0 |
| cliki               | http://ww.telent.net/cliki/$1                           |        0 |        0 |
| cmwiki              | http://www.ourpla.net/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| codersbase          | http://www.codersbase.com/$1                           |        0 |        0 |
| commons             | http://commons.wikimedia.org/wiki/$1                           |        0 |        0 |
| consciousness       | http://teadvus.inspiral.org/                           |        0 |        0 |
| corpknowpedia       | http://corpknowpedia.org/wiki/index.php/$1                           |        0 |        0 |
| creationmatters     | http://www.ourpla.net/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| dejanews            | http://www.deja.com/=dnc/getdoc.xp?AN=$1                           |        0 |        0 |
| demokraatia         | http://wiki.demokraatia.ee/                           |        0 |        0 |
| dictionary          | http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1            |        0 |        0 |
| disinfopedia        | http://www.disinfopedia.org/wiki.phtml?title=$1                           |        0 |        0 |
| diveintoosx         | http://diveintoosx.org/$1                           |        0 |        0 |
| docbook             | http://docbook.org/wiki/moin.cgi/$1                           |        0 |        0 |
| dolphinwiki         | http://www.object-arts.com/wiki/html/Dolphin/$1                           |        0 |        0 |
| drumcorpswiki       | http://www.drumcorpswiki.com/index.php/$1                           |        0 |        0 |
| dwjwiki             | http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1                           |        0 |        0 |
| echei               | http://www.ikso.net/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| ecxei               | http://www.ikso.net/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| efnetceewiki        | http://purl.net/wiki/c/$1                           |        0 |        0 |
| efnetcppwiki        | http://purl.net/wiki/cpp/$1                           |        0 |        0 |
| efnetpythonwiki     | http://purl.net/wiki/python/$1                           |        0 |        0 |
| efnetxmlwiki        | http://purl.net/wiki/xml/$1                           |        0 |        0 |
| elibre              | http://enciclopedia.us.es/index.php/$1                           |        0 |        0 |
| eljwiki             | http://elj.sourceforge.net/phpwiki/index.php/$1                           |        0 |        0 |
| emacswiki           | http://www.emacswiki.org/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| eokulturcentro      | http://esperanto.toulouse.free.fr/wakka.php?wiki=$1                           |        0 |        0 |
| evowiki             | http://www.evowiki.org/index.php/$1                           |        0 |        0 |
| eĉei               | http://www.ikso.net/cgi-bin/wiki.pl?$1                          |        0 |        0 |
| finalempire         | http://final-empire.sourceforge.net/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| firstwiki           | http://firstwiki.org/index.php/$1                           |        0 |        0 |
| foldoc              | http://www.foldoc.org/foldoc/foldoc.cgi?$1                           |        0 |        0 |
| foxwiki             | http://fox.wikis.com/wc.dll?Wiki~$1                           |        0 |        0 |
| fr.be               | http://fr.wikinations.be/$1                           |        0 |        0 |
| fr.ca               | http://fr.ca.wikinations.org/$1                           |        0 |        0 |
| fr.fr               | http://fr.fr.wikinations.org/$1                           |        0 |        0 |
| fr.org              | http://fr.wikinations.org/$1                           |        0 |        0 |
| freebsdman          | http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1                           |        0 |        0 |
| gamewiki            | http://gamewiki.org/wiki/index.php/$1                           |        0 |        0 |
| gej                 | http://www.esperanto.de/cgi-bin/aktivikio/wiki.pl?$1                           |        0 |        0 |
| gentoo-wiki         | http://gentoo-wiki.com/$1                           |        0 |        0 |
| globalvoices        | http://cyber.law.harvard.edu/dyn/globalvoices/wiki/$1                           |        0 |        0 |
| gmailwiki           | http://www.gmailwiki.com/index.php/$1                           |        0 |        0 |
| google              | http://www.google.com/search?q=$1                           |        0 |        0 |
| googlegroups        | http://groups.google.com/groups?q=$1                           |        0 |        0 |
| gotamac             | http://www.got-a-mac.org/$1                           |        0 |        0 |
| greencheese         | http://www.greencheese.org/$1                           |        0 |        0 |
| hammondwiki         | http://www.dairiki.org/HammondWiki/index.php3?$1                           |        0 |        0 |
| haribeau            | http://wiki.haribeau.de/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| herzkinderwiki      | http://www.herzkinderinfo.de/Mediawiki/index.php/$1                           |        0 |        0 |
| hewikisource        | http://he.wikisource.org/wiki/$1                           |        1 |        0 |
| hrwiki              | http://www.hrwiki.org/index.php/$1                           |        0 |        0 |
| iawiki              | http://www.IAwiki.net/$1                           |        0 |        0 |
| imdb                | http://us.imdb.com/Title?$1                           |        0 |        0 |
| infosecpedia        | http://www.infosecpedia.org/pedia/index.php/$1                           |        0 |        0 |
| jargonfile          | http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1                         |        0 |        0 |
| jefo                | http://www.esperanto-jeunes.org/vikio/index.php?$1                           |        0 |        0 |
| jiniwiki            | http://www.cdegroot.com/cgi-bin/jini?$1                           |        0 |        0 |
| jspwiki             | http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=$1                           |        0 |        0 |
| kerimwiki           | http://wiki.oxus.net/$1                           |        0 |        0 |
| kmwiki              | http://www.voght.com/cgi-bin/pywiki?$1                           |        0 |        0 |
| knowhow             | http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?$1                        |        0 |        0 |
| ko                  | http://ko.wikipedia.org/wiki/$1                           |        1 |        0 |
| lanifexwiki         | http://opt.lanifex.com/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| lasvegaswiki        | http://wiki.gmnow.com/index.php/$1                           |        0 |        0 |
| linuxwiki           | http://www.linuxwiki.de/$1                           |        0 |        0 |
| lojban              | http://www.lojban.org/tiki/tiki-index.php?page=$1                           |        0 |        0 |
| lqwiki              | http://wiki.linuxquestions.org/wiki/$1                           |        0 |        0 |
| lugkr               | http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1                           |        0 |        0 |
| lutherwiki          | http://www.lutheranarchives.com/mw/index.php/$1                           |        0 |        0 |
| m                   | http://meta.wikipedia.org/wiki/$1                           |        1 |        0 |
| mathsongswiki       | http://SeedWiki.com/page.cfm?wikiid=237&doc=$1                           |        0 |        0 |
| mbtest              | http://www.usemod.com/cgi-bin/mbtest.pl?$1                           |        0 |        0 |
| meatball            | http://www.usemod.com/cgi-bin/mb.pl?$1                           |        0 |        0 |
| mediazilla          | http://bugzilla.wikipedia.org/$1                           |        1 |        0 |
| memoryalpha         | http://www.memory-alpha.org/en/index.php/$1                           |        0 |        0 |
| meta                | http://meta.wikipedia.org/wiki/$1                           |        1 |        0 |
| metaweb             | http://www.metaweb.com/wiki/wiki.phtml?title=$1                           |        0 |        0 |
| metawiki            | http://sunir.org/apps/meta.pl?$1                           |        0 |        0 |
| metawikipedia       | http://meta.wikimedia.org/wiki/$1                           |        0 |        0 |
| moinmoin            | http://purl.net/wiki/moin/$1                           |        0 |        0 |
| mozillawiki         | http://wiki.mozilla.org/index.php/$1                           |        0 |        0 |
| muweb               | http://www.dunstable.com/scripts/MuWebWeb?$1                           |        0 |        0 |
| netvillage          | http://www.netbros.com/?$1                           |        0 |        0 |
| oeis                | http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=$1 |        0 |        0 |
| openfacts           | http://openfacts.berlios.de/index.phtml?title=$1                           |        0 |        0 |
| openwiki            | http://openwiki.com/?$1                           |        0 |        0 |
| opera7wiki          | http://nontroppo.org/wiki/$1                           |        0 |        0 |
| orgpatterns         | http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?$1                      |        0 |        0 |
| osi reference model | http://wiki.tigma.ee/                           |        0 |        0 |
| pangalacticorg      | http://www.pangalactic.org/Wiki/$1                           |        0 |        0 |
| patwiki             | http://gauss.ffii.org/$1                           |        0 |        0 |
| personaltelco       | http://www.personaltelco.net/index.cgi/$1                           |        0 |        0 |
| phpwiki             | http://phpwiki.sourceforge.net/phpwiki/index.php?$1                           |        0 |        0 |
| pikie               | http://pikie.darktech.org/cgi/pikie?$1                           |        0 |        0 |
| pmeg                | http://www.bertilow.com/pmeg/$1.php                           |        0 |        0 |
| ppr                 | http://c2.com/cgi/wiki?$1                           |        0 |        0 |
| purlnet             | http://purl.oclc.org/NET/$1                           |        0 |        0 |
| pythoninfo          | http://www.python.org/cgi-bin/moinmoin/$1                           |        0 |        0 |
| pythonwiki          | http://www.pythonwiki.de/$1                           |        0 |        0 |
| pywiki              | http://www.voght.com/cgi-bin/pywiki?$1                           |        0 |        0 |
| raec                | http://www.raec.clacso.edu.ar:8080/raec/Members/raecpedia/$1                      |        0 |        0 |
| revo                | http://purl.org/NET/voko/revo/art/$1.html                           |        0 |        0 |
| rfc                 | http://www.rfc-editor.org/rfc/rfc$1.txt                           |        0 |        0 |
| s23wiki             | http://is-root.de/wiki/index.php/$1                           |        0 |        0 |
| scoutpedia          | http://www.scoutpedia.info/index.php/$1                           |        0 |        0 |
| seapig              | http://www.seapig.org/$1                           |        0 |        0 |
| seattlewiki         | http://seattlewiki.org/wiki/$1                           |        0 |        0 |
| seattlewireless     | http://seattlewireless.net/?$1                           |        0 |        0 |
| seeds               | http://www.IslandSeeds.org/wiki/$1                           |        0 |        0 |
| senseislibrary      | http://senseis.xmp.net/?$1                           |        0 |        0 |
| shakti              | http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/$1                           |        0 |        0 |
| slashdot            | http://slashdot.org/article.pl?sid=$1                           |        0 |        0 |
| smikipedia          | http://www.smikipedia.org/$1                           |        0 |        0 |
| sockwiki            | http://wiki.socklabs.com/$1                           |        0 |        0 |
| sourceforge         | http://sourceforge.net/$1                           |        0 |        0 |
| squeak              | http://minnow.cc.gatech.edu/squeak/$1                           |        0 |        0 |
| strikiwiki          | http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?$1                         |        0 |        0 |
| susning             | http://www.susning.nu/$1                           |        0 |        0 |
| svgwiki             | http://www.protocol7.com/svg-wiki/default.asp?$1                           |        0 |        0 |
| tavi                | http://tavi.sourceforge.net/$1                           |        0 |        0 |
| tejo                | http://www.tejo.org/vikio/$1                           |        0 |        0 |
| terrorwiki          | http://www.liberalsagainstterrorism.com/wiki/index.php/$1                         |        0 |        0 |
| theopedia           | http://www.theopedia.com/$1                           |        0 |        0 |
| tmbw                | http://www.tmbw.net/wiki/index.php/$1                           |        0 |        0 |
| tmnet               | http://www.technomanifestos.net/?$1                           |        0 |        0 |
| tmwiki              | http://www.EasyTopicMaps.com/?page=$1                           |        0 |        0 |
| turismo             | http://www.tejo.org/turismo/$1                           |        0 |        0 |
| twiki               | http://twiki.org/cgi-bin/view/$1                           |        0 |        0 |
| twistedwiki         | http://purl.net/wiki/twisted/$1                           |        0 |        0 |
| uea                 | http://www.tejo.org/uea/$1                           |        0 |        0 |
| unreal              | http://wiki.beyondunreal.com/wiki/$1                           |        0 |        0 |
| ursine              | http://ursine.ca/$1                           |        0 |        0 |
| usej                | http://www.tejo.org/usej/$1                           |        0 |        0 |
| usemod              | http://www.usemod.com/cgi-bin/wiki.pl?$1                           |        0 |        0 |
| visualworks         | http://wiki.cs.uiuc.edu/VisualWorks/$1                           |        0 |        0 |
| w                   | http://www.wikipedia.org/wiki/$1                           |        1 |        0 |
| warpedview          | http://www.warpedview.com/index.php/$1                           |        0 |        0 |
| webdevwikinl        | http://www.promo-it.nl/WebDevWiki/index.php?page=$1                           |        0 |        0 |
| webisodes           | http://www.webisodes.org/$1                           |        0 |        0 |
| webseitzwiki        | http://webseitz.fluxent.com/wiki/$1                           |        0 |        0 |
| why                 | http://clublet.com/c/c/why?$1                           |        0 |        0 |
| wiki                | http://c2.com/cgi/wiki?$1                           |        0 |        0 |
| wikia               | http://www.wikia.com/wiki/index.php/$1                           |        0 |        0 |
| wikibooks           | http://en.wikibooks.org/wiki/$1                           |        1 |        0 |
| wikicities          | http://www.wikicities.com/index.php/$1                           |        0 |        0 |
| wikif1              | http://www.wikif1.org/$1                           |        0 |        0 |
| wikimedia           | http://wikimediafoundation.org/wiki/$1                           |        0 |        0 |
| wikinews            | http://en.wikinews.org/wiki/$1                           |        0 |        0 |
| wikinfo             | http://www.wikinfo.org/wiki.php?title=$1                           |        0 |        0 |
| wikiquote           | http://en.wikiquote.org/wiki/$1                           |        1 |        0 |
| wikisource          | http://sources.wikipedia.org/wiki/$1                           |        1 |        0 |
| wikispecies         | http://species.wikipedia.org/wiki/$1                           |        1 |        0 |
| wikitravel          | http://wikitravel.org/en/$1                           |        0 |        0 |
| wikiworld           | http://WikiWorld.com/wiki/index.php/$1                           |        0 |        0 |
| wikt                | http://en.wiktionary.org/wiki/$1                           |        1 |        0 |
| wiktionary          | http://en.wiktionary.org/wiki/$1                           |        1 |        0 |
| wlug                | http://www.wlug.org.nz/$1                           |        0 |        0 |
| wlwiki              | http://winslowslair.supremepixels.net/wiki/index.php/$1                           |        0 |        0 |
| ypsieyeball         | http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?$1                           |        0 |        0 |
| zu                  | http://zu.wikipedia.org/wiki/$1                           |        1 |        0 |
| zwiki               | http://www.zwiki.org/$1                           |        0 |        0 |
| zzz wiki            | http://wiki.zzz.ee/                           |        0 |        0 |
+---------------------+-----------------------------------------------------------------------------------+----------+----------+
179 rows in set (0.05 sec)
mysql>


SQL 테이블 내용에 대해 보다 자세한 것은 다음을 참조: http://dev.mysql.com/doc/refman/5.1/en/retrieving-data.html

인터위키 테이블 편집하기

나만의 인터위키 추가하기

매우 간단하다. 그냥 통째로 복사해다가 붙여넣기 한다.

가령, bugzilla-interwiki.sql 파일에 아래와 같은 내용이 들어있다.

REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
('kdebug','http://bugs.kde.org/show_bug.cgi?id=$1',0),
('mozbug','http://bugzilla.mozilla.org/show_bug.cgi?$1',0),
('gentoobug','http://bugs.gentoo.org/show_bug.cgi?$1',0);

그러면 위 내용을 그대로 블럭으로 잡아 복사한다.

그리고 나서

mysql>

이 상태에서 마우스 오른쪽 버튼을 누르고, 붙여넣기 한다. 그럼 원하는 인터위키가 추가된다.

예제: 위의 interwiki를 mw_interwiki 고쳤다는 것만 주의하면 된다.

mysql> REPLACE INTO mw_interwiki (iw_prefix,iw_url,iw_local) VALUES
    -> ('kdebug','http://bugs.kde.org/show_bug.cgi?id=$1',0),
    -> ('mozbug','http://bugzilla.mozilla.org/show_bug.cgi?$1',0),
    -> ('gentoobug','http://bugs.gentoo.org/show_bug.cgi?$1',0);
Query OK, 3 rows affected (0.28 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql>

아래와 같은 방법도 있다는데, 어렵다. 비추천이다.

mysql -u <username> -p <nameofyourdatabase> < <filename.sql>

mysql -u wikiuser -p wikidb < bugzilla-interwiki.sql

This does not report success when it works. If you want to double check, you have to check the interwiki table.

위키백과의 인터위키 목록을 사용하기

미디어위키 디렉토리에 보면, maintanance/wikipedia-interwiki.sql 파일이 있는데, 여기에 위키백과가 현재 사용하고 있는 인터위키 목록이 있다.

대략 일부만을 보면 다음과 같은 내용들이 있다:

REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
('w','http://www.wikipedia.org/wiki/$1',1),
('m','http://meta.wikipedia.org/wiki/$1',1),
('meta','http://meta.wikipedia.org/wiki/$1',1),
('zu','http://zu.wikipedia.org/wiki/$1',1);

뭐, 이것도 역시 위에서 말한 방법으로 그냥 복사해서 붙여넣으면 자동으로 다 실행된다.

그러나 더 간단한 방법을 소개한다.

mysql> \. /var/www/localhost/mediawiki-1.3.0/maintenance/wikipedia-interwiki.sql
Query OK, 155 rows affected (0.24 sec)
Records: 155  Duplicates: 0  Warnings: 0

mysql>  

예제:

mysql> \. /var/www/html/homewiki/maintenance/wikipedia-interwiki.sql
Query OK, 155 rows affected (0.24 sec)
Records: 155  Duplicates: 0  Warnings: 0

mysql>  

그러나, 그 파일 내용안에interwiki 앞에 프리픽스를 달아서 고쳐준 다음에 저 명령을 실행해야 한다.

wikipedia-interwiki.sql의 내용은 아래와 같다. 그거 맨 위에 interwiki만 앞에 접두어 제대로 달아주면 된다.

예를들어, ko:user:멀뚱이의 프리픽스는 위에서 본 바와 같이 mw_이다. 따라서

REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES

이것을

 
REPLACE INTO /*$wgDBprefix*/mw_interwiki (iw_prefix,iw_url,iw_local) VALUES

이것으로 고쳐주면 된다. mw_ 라는 프리픽스만 추가해 주었다.

wikipedia-interwiki.sql의 내용:

-- For convenience, here are the *in-project* interwiki prefixes
-- for Wikipedia.

REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES
('q','http://en.wikiquote.org/wiki/$1',1),
('b','http://en.wikibooks.org/wiki/$1',1),
('n','http://en.wikinews.org/wiki/$1',1),
('aa','http://aa.wikipedia.org/wiki/$1',1),
('ab','http://ab.wikipedia.org/wiki/$1',1),
('af','http://af.wikipedia.org/wiki/$1',1),
('ak','http://ak.wikipedia.org/wiki/$1',1),
('als','http://als.wikipedia.org/wiki/$1',1),
('am','http://am.wikipedia.org/wiki/$1',1),
('an','http://an.wikipedia.org/wiki/$1',1),
('ang','http://ang.wikipedia.org/wiki/$1',1),
('ar','http://ar.wikipedia.org/wiki/$1',1),
('arc','http://arc.wikipedia.org/wiki/$1',1),
('as','http://as.wikipedia.org/wiki/$1',1),
('ast','http://ast.wikipedia.org/wiki/$1',1),
('av','http://av.wikipedia.org/wiki/$1',1),
('ay','http://ay.wikipedia.org/wiki/$1',1),

뭐, 간단한 편집기로 위의 한 줄에 interwiki 만 mw_interwiki로 고쳐주고서, 그냥 통째로 복사해서

mysql> 여기서 마우스 오른쪽 클릭, 붙여넣기 해버리면 끝난다.

인터위키 누르면 새로운 창에서 열리게 하는 방법

그러니까, 간단히 설명하면

위에 나오는 .sql 파일 내용 중에서

('ay','http://ay.wikipedia.org/wiki/$1',1),

이런 형식의 부분을

('ay','http://ay.wikipedia.org/wiki/$1" TARGET="_blank',1),

이렇게 고쳐주라는 이야기로 보인다. 실제로 해보지는 않았다.

더 보기: meta:Opening external links in a new window

mysql 사용법의 추가 도움말

meta:Mysql Help

위에 설명한 방법보다 phpMyAdmin 를 사용하기를 더 권장한다

영어판에는 그렇게 써놨는데, phpMyAdmin을 설치하는 거 의외로 까다롭다. 그러나 일단 phpMyAdmin가 설치되었다면 더 간단하다고 설명하고 있다. 번역 안했다.

http://www.stanton-finley.net/fedora_core_5_installation_notes.html#phpMyAdmin

user:멀뚱이는 페도라 코어 5를 쓰는데, 여기에 phpMyAdmin을 설치하는 법 굉장히 쉽게 써 있다. 그대로 복사해다가 붙여넣기만 하면 된다. 아파치 웹서버네 기타 필요한 것도 매우 쉽게 설명해 놓았다.

phpMyAdmin은 나중에 필드 각각을 좀 고쳐줄 때, 유용하며, 행여나 sql 데이타베이스가 깨졌다면서 홈페이지가 안 뜨는 경우에, 그 데이타베이스 수정을 위해서도 요긴하다만, 한번에 대량의 인터위키 입력은 위에 설명한 파일을 단 번에 추가하면 족하다. 추후 데이타베이스 관리를 위해서 설치해 두면 좋다고 본다.

If your server uses the software phpMyAdmin, you can simply select the database that uses the wiki (remember that your actual wikidb and wikiuser name were specified by you, and are stored in LocalSettings.php ), then select the table "interwiki" from the sidebar. To use the graphical interface, just select "browse" at the top and then you can opt to "insert new row" (at the bottom of the table) following the pattern established for the other items ("$1" is what will be replaced with whatever follows the interwiki prefix in your code; it will usually be at the end of the URL for the site for which you want to make a shortcut). Then click go or opt to insert another record until you are done.

인용

meta:Cite/Cite.php 에 아래의 주석표기를 지원하게끔 하는 설치방법이 있다. 즉, 미디어위키를 설치하면 기본으로 제공되는게 아니라서, 따로 추가해줘야 작동한다.

<ref></ref>
<references/>

다운로드 받기

Required by Cite.php or else you'll get a pretty blank page!

둘 다 받는다.

요구사항

미디어위키 버전 1.6x 이상이어야 한다.

설치방법

  1. Cite.php 파일과 Cite.i18n.php 파일을 extensions 폴더에 복사한다.
  2. LocalSettings.php 파일을 열어서
    require_once( "includes/DefaultSettings.php" );
    라고 쓰인 바로 아랫줄에
    require_once( "$IP/extensions/Cite.php" );
    을 추가한다.
  • 만약 위와 같이 설치하여 작동하지 않는다면, 맨 아래 ?> 바로 윗 줄에다가 다음과 같이 추가한다:
include( '$IP/extensions/Cite.php' );

InstantCommons

meta:InstantCommons에 미디어위키 후속 버전에서 곧 지원하게 될 인스턴트커먼스 프로젝트가 안내되어 있다. 즉, 미디어위키나 기타 다른 위키엔진을 사용해서 설치한 개인 사용자의 위키 페이지에서 직접 커먼스의 이미지들을 이용할 수 있게 하는 것이다.


[[image:sample.jpg]]

지금의 미디어어키 버전 1.7.1 에서는 위와 같이 입력하면, 자신의 데이타베이스 서버에서 sample.jpg을 찾기만 할 뿐, 커먼스와의 자동연결은 되지 않는다. 그러나, 200여개의 위키피디아 재단의 위키백과들 처럼, 자신의 데이타베이스에 사진이 없으면, 자동으로 커먼스의 사진을 검색하는 시스템...아직은 지원되지 않으나, 곧 지원할 것이하고 한다.

또한 다른 위키엔진에서도 사용가능하게 할 것이라고 한다.

$wgUseInstantCommons 설정을 추가하여서 지원할 것이라고 한다.

기본설정으로 나만 편집가능하게 하기

설정파일 LocalSettings.php 을 바꾸면, 외부 사용자는 아무도 편집못하고 기본적으로 모든 문서를 기본값으로 보호되게 할 수 있다. 그러면, 개인만의 데이타베이스 또는 홈페이지, 블로그가 된다. 미디어위키의 설정은 모두 LocalSettings.php 를 수정하는 것으로 바꿀 수 있다.

서버 가동

1. 도메인 네임 서비스를 해주는 회사와 계약해서, 자신의 컴퓨터에 도메인 네임, 예를들어 http://sample.com 이라는 사이트 이름을 얻는다. 그리고 24시간 컴퓨터 켜놓는다.

2. 이 방법 보다는, 대형 호스팅 업체를 이용하는 방법이 더 좋곘다. 내 컴퓨터 24시간 안 켜놔도 되고, 그냥 사용료만 좀 지불하면 된다.

3. 24시간 운용하지 않고, 다른 사람 이용도 제한적이고, 그냥 개인만 사용하려면, 그렇게 해도 된다. 나만의 방대한 데이타베이스가 된다.

페이지 퍼오기

영어 위키피디아나 한글 위키백과에서 문서 내보내기 기능 special:export을 이용, 원하는 다수의 문서들을 xml 파일로 한꺼번에 저장한다. 그리고 내 미디어위키에서 문서 들여오기 기능 special:import을 이용, 한꺼번에 다수의 문서들을 불러들인다.

우분투에 미디어위키 설치하기

  • 사용버전: 우분투 7.10 베타, 미디어위키 1.11.0
sudo apt-get install apache2 php5 mysql-server php5-mysql

# 아파치 웹서버, PHP5, mysql 데이타베이스 서버를 자동으로 설치해 줍니다.

cd /var/www
svn checkout http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_11/phase3 wiki

# SVN을 통해서 미디어위키 최신버전을 자동으로 설치해 줍니다.
# /var/www 디렉토리는 내 사이트 주소 http://localhost/ 의 기본 홈 디렉토리입니다.
# 이 아래에 wiki 디렉토리를 새로 만들어서 SVN을 통해 최신 버전의 미디어위키를 다운받습니다.
# /var/www/wiki 주소가 되겠고, 웹 주소로는 http://localhost/wiki/ 가 되겠군요.

cd /var/www/wiki
chmod 755 config

# http://localhost/wiki/config 디렉토리를 실행가능하게 설정변경 해주는 겁니다.

이제 파이어폭스 웹브라우저에서 http://localhost/wiki/ 를 입력하면, 최초 설정 페이지가 뜹니다.
설정을 완료해주면, 미디어위키가 설치완료됩니다.
그 후에 다음을 실행해 줘야겠죠.

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

# LocalSettings.php 설정파일을 미디어위키 홈디렉토리로 옮기는 것입니다.

이제 파이어폭스 웹브라우저에서 http://localhost/wiki/ 를 입력하면, 설치완료된 미디어위키가 뜹니다. 이제 사용하면 됩니다.

안전을 위해서 다음을 실행하여 config 디렉토리를 삭제합니다:

rm -r /var/www/wiki/config

리눅스의 다른 배포판도 설치하는 방법은 동일합니다.

sudo apt-get install apache2 php5 mysql-server php5-mysql

# 아파치 웹서버, PHP5, mysql 데이타베이스 서버를 자동으로 설치해 줍니다.

이 부분만이 다른 배포판에 맞게 바뀌겠군요.

여하튼 아파치 웹서버, PHP5, mysql 데이타베이스 서버를 설치해서 제대로 작동되게 한 다음, 위의 나머지 부분을 실행하면 됩니다.