사용자:하늘/메모장/미디어위키 설치 세팅

다운받기[편집 | 원본 편집]

tar.gz 다운받아 압축풀기[편집 | 원본 편집]

패키지 매니저로 다운받기[편집 | 원본 편집]

git으로 다운받기[편집 | 원본 편집]

stable 버전 다운 받으려면 아래 명령어를 사용하세요. REL1_37부분을 최신 버전대로 바꾸시면 됩니다. git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_37 mediawiki[1]

세부 버전을 설정하고 싶다면 git tag -l | sort -V을 입력해서 버전 목록을 확인하고 git checkout 1.37.2 명령어로 버전(태그)을 선택해주세요.

그 다음에 하위 모듈을 업데이트 해야합니다.
cd mediawiki
git submodule update --init --recursive

composer update --no-dev

/vendor에서 git pull하면 다시 composer update 해야한다. 아예 하지 않는다.

버전 관리가 귀찮다면 vs코드 호스트 연결하여 GUI를 이용해 관리한다.

Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine


0 틀:Int NS_MAIN
1 Talk NS_TALK
2 User NS_USER
3 User talk NS_USER_TALK
4 Project NS_PROJECT
5 Project talk NS_PROJECT_TALK
6 File NS_FILE
7 File talk NS_FILE_TALK
8 MediaWiki NS_MEDIAWIKI
9 MediaWiki talk NS_MEDIAWIKI_TALK
10 Template NS_TEMPLATE
11 Template talk NS_TEMPLATE_TALK
12 Help NS_HELP
13 Help talk NS_HELP_TALK
14 Category NS_CATEGORY
15 Category talk NS_CATEGORY_TALK
-1 Special NS_SPECIAL
-2 Media NS_MEDIA

List of permissions[편집 | 원본 편집]

The following user rights are available in the latest version of MediaWiki.
If you are using an older version, look at "Special:Version" on your wiki and see if your version is covered in the "Versions" column.
Right Description User groups that have this right by default Versions
Reading
read 틀:Int - when set to false, override for specific pages with <tvar name=WhitelistRead>틀:Ll</tvar>

틀:Uploaded-files-access-restriction-info

*, user 1.5+
Editing
applychangetags 틀:Int user 1.25+
autocreateaccount 틀:Int - a more limited version of createaccount 1.27+
createaccount 틀:Int - register / registration *, sysop 1.5+
createpage 틀:Int - requires the <tvar name=1>edit</tvar> right *, user 1.6+
createtalk 틀:Int - requires the <tvar name=1>edit</tvar> right *, user 1.6+
delete-redirect 틀:Int (note that this is not needed if the group already has the <tvar name=1>delete</tvar> right) 1.36+
edit 틀:Int *, user 1.5+
editsemiprotected 틀:Int - without cascading protection autoconfirmed, bot, sysop 1.22+
editprotected 틀:Int - without cascading protection sysop 1.13+
minoredit 틀:Int user 1.6+
move 틀:Int - requires the <tvar name=1>edit</tvar> right user, sysop 1.5+
move-categorypages 틀:Int - requires the <tvar name=1>move</tvar> right user, sysop 1.25+
move-rootuserpages 틀:Int - requires the <tvar name=1>move</tvar> right user, sysop 1.14+
move-subpages 틀:Int - requires the <tvar name=1>move</tvar> right user, sysop 1.13+
movefile 틀:Int - requires the <tvar name=1>move</tvar> right and <tvar name=AllowImageMoving>틀:Ll</tvar> to be true user, sysop 1.14+
reupload 틀:Int - requires the <tvar name=1>upload</tvar> right user, sysop 1.6+
reupload-own 틀:Int - requires the <tvar name=1>upload</tvar> right (note that this is not needed if the group already has the <tvar name=reupload>reupload</tvar> right) 1.11+
reupload-shared 틀:Int - (requires the <tvar name=1>upload</tvar> right) user, sysop 1.6+
sendemail 틀:Int user 1.16+
upload 틀:Int - requires the <tvar name=1>edit</tvar> right and <tvar name=EnableUploads>틀:Ll</tvar> to be true user, sysop 1.5+
upload_by_url 틀:Int - (Prior to 1.20 it was given to sysops) 1.8+
Management
bigdelete 틀:Int ( requires the <tvar name=1>delete</tvar> right sysop 1.12+
block 틀:Int - Block options include preventing editing and registering new accounts, and autoblocking other users on the same IP address sysop 1.5+
blockemail 틀:Int - allows preventing use of the Special:Emailuser interface when blocking - requires the block right sysop 1.11+
browsearchive 틀:Int - requires the <tvar name=1>deletedhistory</tvar> right sysop 1.13+
changetags 틀:Int - currently unused by extensions user 1.25+
delete 틀:Int 1.5–1.11: For undeletions, there is now the <tvar name=1>'undelete'</tvar> right, see below sysop 1.5+
deletedhistory 틀:Int sysop 1.6+
deletedtext 틀:Int sysop
deletelogentry 틀:Int - allows deleting/undeleting information (action text, summary, user who made the action) of specific log entries - requires the deleterevision right suppress 1.20+
deleterevision 틀:Int - Split into deleterevision and deletelogentry in 1.20 suppress 1.6+
editcontentmodel 틀:Int - requires the <tvar name=1>edit</tvar> right user 1.23.7+
editinterface 틀:Int - requires the <tvar name=1>edit</tvar> right sysop, interface-admin 1.5+
editmyoptions 틀:Int * 1.22+
editmyprivateinfo 틀:Int - also hides the "Change Password", but not other ways to change the password * 1.22+
editmyusercss 틀:Int - requires the <tvar name=1>edit</tvar> right user 1.22+
editmyuserjs 틀:Int - requires the <tvar name=1>edit</tvar> right user 1.22+
editmyuserjsredirect 틀:Int requires the <tvar name=1>edit</tvar> right 1.34+
editmyuserjson 틀:Int requires the <tvar name=1>edit</tvar> right user 1.31+
editmywatchlist 틀:Int * 1.22+
editsitecss 틀:Int - requires the <tvar name=1>editinterface</tvar> right interface-admin 1.32+
editsitejs 틀:Int - requires the <tvar name=1>editinterface</tvar> right interface-admin 1.32+
editsitejson 틀:Int - requires the <tvar name=1>editinterface</tvar> right sysop, interface-admin 1.32+
editusercss 틀:Int - requires the <tvar name=1>edit</tvar> right interface-admin 1.16+
edituserjs 틀:Int - requires the <tvar name=1>edit</tvar> right interface-admin 1.16+
edituserjson 틀:Int - requires the <tvar name=1>edit</tvar> right sysop, interface-admin 1.31+
hideuser 틀:Int - requires the <tvar name=1>block</tvar> right
Use <tvar name=HideUserContribLimit>틀:Wg</tvar> to disable.
suppress 1.10+
markbotedits 틀:Int - requires the <tvar name=1>rollback</tvar> right sysop 1.12+
mergehistory 틀:Int - requires the <tvar name=1>edit</tvar> right sysop 1.12+
pagelang 틀:Int - <tvar name=PageLanguageUseDB>틀:Ll</tvar> must be true 1.24+
patrol 틀:Int - <tvar name=UseRCPatrol>틀:Ll</tvar> must be true sysop 1.5+
patrolmarks 틀:Int 1.16+
protect 틀:Int - requires the <tvar name=1>edit</tvar> right sysop 1.5+
rollback 틀:Int - requires the <tvar name=1>edit</tvar> right sysop 1.5+
suppressionlog 틀:Int suppress 1.6+
suppressrevision 틀:Int - requires the <tvar name=1>deleterevision</tvar> right suppress 1.6+
unblockself 틀:Int - Without it, an administrator that has the capability to block cannot unblock themselves if blocked by another administrator sysop 1.17+
undelete 틀:Int - requires the <tvar name=1>deletedhistory</tvar> right sysop 1.12+
userrights 틀:Int - allows the assignment or removal of all(*) groups to any user.

(*)With <tvar name=AddGroups>틀:Ll</tvar> and <tvar name=RemoveGroups>틀:Ll</tvar> you can set the possibility to add/remove certain groups instead of all

bureaucrat 1.5+
userrights-interwiki 틀:Int 1.12+
viewmyprivateinfo 틀:Int * 1.22+
viewmywatchlist 틀:Int * 1.22+
viewsuppressed 틀:Int - i.e. a more narrow alternative to "suppressrevision" (note that this is not needed if the group already has the <tvar name=suppressrevision>suppressrevision</tvar> right) suppress 1.24+
Administration
autopatrol 틀:Int - <tvar name=UseRCPatrol>틀:Ll</tvar> must be true bot, sysop 1.9+
deletechangetags 틀:Int - currently unused by extensions sysop 1.28+
import 틀:Int - requires the <tvar name=1>edit</tvar> right sysop 1.5+
importupload 틀:Int - requires the <tvar name=1>edit</tvar> right sysop 1.5+
managechangetags 틀:Int - currently unused by extensions sysop 1.25+
siteadmin 틀:Int - not available by default) 1.5+
unwatchedpages 틀:Int - lists pages that no user has watchlisted sysop 1.6+
Technical
apihighlimits 틀:Int bot, sysop 1.12+
autoconfirmed 틀:Int - used for the 'autoconfirmed' group, see the other table below for more information autoconfirmed, bot, sysop 1.6+
bot 틀:Int - can optionally be viewed bot 1.5+
ipblock-exempt 틀:Int sysop 1.9+
nominornewtalk 틀:Anchor 틀:Int - requires the <tvar name=1>minoredit</tvar> right bot 1.9+
noratelimit 틀:Int - not affected by [[<tvar name=1>Special:MyLanguage/Manual:$wgRateLimits</tvar>|rate limits]] (prior to the introduction of this right, the configuration variable <tvar name=RateLimitsExcludedGroups>틀:Ll</tvar> was used for this purpose) sysop, bureaucrat 1.13+
override-export-depth 틀:Int
With this right, you can define the depth of linked pages at <tvar name=link1>Special:Export</tvar>. Otherwise, the value of <tvar name=link2>틀:Ll</tvar>, which is 0 by default, will be used.
?
purge 틀:Int - [[<tvar name=1>Special:MyLanguage/Manual:URL</tvar>|URL parameter]] "&action=purge" user 1.10+
suppressredirect 틀:Int - requires the <tvar name=1>move</tvar> right bot, sysop 1.12+
writeapi 틀:Int - requires the <tvar name=1>edit</tvar> right *, user, bot 1.13+

틀:Note

틀:Anchor

$wgLibertyLiveRCArticleNamespaces = array_merge(
    [NS_MAIN, NS_PROJECT, NS_TEMPLATE, NS_HELP, NS_CATEGORY], 
    [NS_HANJA_DICT]
);
$wgLibertyLiveRCTalkNamespaces = array_merge(
    [NS_TALK, NS_USER_TALK, NS_PROJECT_TALK, NS_FILE_TALK, NS_MEDIAWIKI_TALK, NS_TEMPLATE_TALK, NS_HELP_TALK, NS_CATEGORY_TALK],
    [NS_HANJA_DICT_TALK]
);

메일 서버 설정[편집 | 원본 편집]

$wgEnableEmail      = true;
$wgEnableUserEmail  = true; # 유저가 이메일을 보낼 수 있게 설정

$wgEmergencyContact = "xyz37.smtp@gmail.com"; # 긴급 메일 주소
$wgPasswordSender   = "xyz37.smtp@gmail.com"; # 비밀번호 재설정 용도 메일 주소

$wgEnotifUserTalk = true; # 유저 토론 이메일로 알림
$wgEnotifWatchlist = true; # 주시목록 이메일로 알림
$wgEmailAuthentication = true; # 이메일 인증

#아래 부분을 본인에 맞게 설정해 주면 된다.
 
$wgSMTP = array(
 'host'     => "smtp.gmail.com",
 'IDHost'   => "gmail.com",
 'port'     => 587,
 'auth'     => true,
 'username' => "********@gmail.com",
 'password' => "**********"
);

$wgSMTP = array(
    'host'     => "smtp.sendgrid.net",
    'IDHost'   => "smtp.sendgrid.net",
    'port'     => 587,
    'auth'     => true,
    'username' => "apikey",
    'password' => "***************************"
);

[출처] MediaWiki에 Gmail 알림 기능 설정하기 | 작성자 The Programmer

gmail을 릴레이로 하면 각 이용자에게 비밀번호 재설정 등의 메일을 보낼 때 구글 계정이 노출된다.

SendgridMailjet, Mailgun를 이용한다.

mailjet이나 mailgun이나 같은 곳에서 제작했는데 [1] 용도에 따라 사용하자. mailgun은 청구지 주소를 요구하여 이 주소가 없으면 만들어야 하는 수고가 든다. mailjet은 마케팅 용도로 다양한 템플릿을 제공한다. 이 플랜이 좀 적절하지 않아보이지만 가입이 간편하다.

$wgSMTP 변수가 설정되어있지 않으면 기본 php 메일 보내기 함수(mail())가 작동한다. mail 함수는 sendmail 명령어를 작동시킨다.

사실 sendmail만으로도 메일을 보낼 수 있지만 스팸이 뜨는 것 같다. 아직 sendmail로 스팸없이 되는지 확인은 못했다.

postfix 설치

SMTP 서버는 다른 이용자에게 메일을 보낼 수 있게 통로를 제공해준다.

메일 서버 제공 서비스를 하지 않는다면 다른 해커의 서버에서 릴레이를 설정해 스팸 메일을 마구 뿌려대지 않게 보안을 잘 설정하거나 외부 릴레이를 차단한다. 릴레이 받지 않기

SMTP 서버는 동시에 클라이언트가 될 수 있는데 한 SMTP 서버가 또 다른 SMTP 서버로 메일을 보내면 자기 자신은 클라이언트가 된다. 메일을 보내면 클라이언트 메일을 받으면 서버, 릴레이 대상(gmail, mailgun, sendgrid)은 서버, 릴레이하는 쪽은 클라이언트

smtp 설정을 보면 smtp와 smtpd가 있는데 smtp는 자신이 클라이언트 일때의 설정이고 smtpd는 자신이 서버일 때의 설정이다.

메일 전달해주세요 (클라이언트)

메일 주시면 전달해드릴게요 (서버)

POP3 IMAP 서버

메일 보관함 서버

송신측 호스트 -> SMTP 서버 -> SMTP 서버 -> SMTP 서버 ... -> 수신 서버(메일함) -> 수신측 호스트

미디어위키 예시

사용자가 미디어위키에서 메일 인증을 보냄 -> php 스크립트가 인증 메일 생성 -> sendmail 프로세스가 작동하여 외부의 SMTP 서버로 전달 -> SMTP 서버끼리 전달 -> IMAP이나 POP로 보냄

보안 등의 이유로 SMTP가 거절, 연결 실패하면 보내기 실패 /var/mail/****으로 메시지 이동

/var/spool/mail?

슬래시가 들어간 문서에서 시각편집기 오류[편집 | 원본 편집]

사용자가 해야할 오류 해결

아파치인 경우 sites-enabled/ 아래의 설정 파일에 AllowEncodedSlashes NoDecode를 작성하고 나간다. (https가 활성화되어있고) 그래도 되지 않는다면 ssl을 설정할 때 만졌던 conf 파일에 AllowEncodedSlashes NoDecode를 작성해본다. let's encrypt 아파치 자동 설정으로 ssl을 설정했을 경우 000-default-le-ssl.conf 파일이다.

  1. 복사는 연속 3번 클릭!