깃에서 다운로드

This page is a translated version of the page Download from Git and the translation is 78% complete.

분산 버전 관리 시스템입니다. 최신 버전의 소스 코드와 모든 버전의 분기 및 태그된 릴리스를 여러분의 편의에 맞게 다운로드할 수 있게 해 줍니다.

만약 여러분이 개발자이고 패치를 제출하고자 한다면 Git을 이용하여 다운로드를 받으시는 것이 바람직합니다.

개발을 수행하지 않고 미디어위키 및 확장만 설치하고 싶다면, 안정 tarball 릴리즈를 다운로드하시기 바랍니다.

더 자세한 정보를 위해서는 Git를 참조하세요. 다음은 몇 가지 일반적인 작업에 대한 몇 가지 빠른 지침입니다.

전제 조건

Git을 사용하려면 먼저 Git을 설치해야 합니다. 운영 체제에 따라 Git을 얻는 방법은 다양합니다. Gerrit/Tutorial#Set up Git을 읽거나, 즐겨쓰는 검색 엔진을 이용하세요.

타사 라이브러리를 다운로드하고 설치하려면 Composer 를 설치하는 것이 좋지만 필수는 아닙니다.

Git를 사용하여 미디어위키 다운로드

다운로드

Git을 사용하여 미디어위키 코어, 그리고 현재 위키미디어 재단 서버에 설치된 모든 확장 기능, 게릿 에 호스팅된 수많은 기타 확장 기능들을 다운로드할 수 있습니다.

첫 번째 단계는 미디어위키 코어 저장소를 복제하는 것입니다. 이 작업에는 시간이 좀 걸릴 것입니다.

개발자를 위한 다운로드

미디어위키의 최신 개발 버전은 'master' 분기에서 추적됩니다.

먼저 SSH 사용자 이름을 갖도록 개발자 계정을 만들었는지 확인합니다.

그런 다음 터미널 창에서 다음 명령을 입력하여 저장소를 복제합니다.

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki

이렇게 하면 마스터 분기에 동기화된 미디어위키 코어 저장소 전체를 mediawiki라는 이름의 하위 디렉터리로 복제합니다.

다른 디렉터리에 설치하려면 명령줄에서 변경하세요(더 자세한 정보는 이 문서를 참고하세요). 저장소가 복제되고나면 다른 브랜치나 태그로 전환이 가능합니다. master 개발 브랜치는 미디어위키의 최첨단, 개발자 버전입니다. 즉, 안정적이지 않기 때문에 어떠한 환경에서도 프로덕션용으로 마스터 코드를 사용하지 않는 것이 좋습니다.

안정 브랜치 다운로드

소프트웨어 패치를 개발하지 않고 안정 릴리스 분기 1.41을 익명으로 복제하려면 다음 명령을 대신 사용하세요.

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_41 mediawiki

인터넷 속도가 느리고 복제된 판의 수를 줄이고 싶으시다면 git clone 명령어에 --depth=1를 추가하십시오.

미디어위키 태그 (안정판)

또는, 미디어위키의 특정 안정판은 '태그'를 통해 추적됩니다. 이는 타르볼 판과 유사합니다. 현재, 1.41.1 (안정판), 1.39.7 (LTS), 1.39.7 (이전 LTS)입니다.

사용 가능한 모든 태그를 볼 수 있습니다:

git tag -l | sort -V

특정 태그를 사용하려면(예: 최신 안정판):

git checkout 1.41.1

Git 서브모듈 업데이트

분기와 태그에는 일반적으로 사용되는 확장 기능과 스킨 및 vendor/ 디렉터리를 위한 여러 Git 하위 모듈이 있습니다. master 분기에는 이러한 것들이 없습니다. 서브모듈을 업데이트하려면 다음을 실행하세요.

cd mediawiki
git submodule update --init --recursive

외부 라이브러리 가져오기

미디어위키는 Composer 도구를 사용하여 외부 PHP 라이브러리들을 관리하며 이 라이브러리들은 모두 미디어위키 디렉터리의 vendor/ 디렉터리에 위치해 있습니다.

이 필요한 라이브러리를 설치하기 위해 선택할 사항이 있습니다:

  • composer PHAR 다운로드 및 설치 후, 선택적으로 composer.phar 파일의 이름을 자신의 운영체제에 맞게 지시된 대로 바꾸고, 미디어위키 디렉터리로 이동하여 composer update --no-dev를 실행합니다. 권장되는 방법입니다.
    • 기본 PHP CLI 버전이 웹 서버의 PHP 버전과 일치하지 않으면 php7.4 composer.phar update --no-dev 등으로 지정합니다.
  • Composer를 사용하고 싶지 않거나 WMF 프로덕션 클러스터에 쓰이는 동일한 집합의 벤더 라이브러리를 사용하고 싶으시다면 미디어위키 설치본의 코어 폴더 안에 vendor/ 디렉터리를 만들 수 있습니다:
    git clone https://gerrit.wikimedia.org/r/mediawiki/vendor.git
    • 확장 기능 중 어떠한 것이라도 자체적인 Composer 요구 사항이 있을 경우 이 옵션을 사용할 수 없습니다.

미디어위키 1.25 이전까지는 외부 라이브러리들은 코어 저장소에 보관되었으며 패키지 관리자가 필요하지 않았습니다.

최신으로 유지하기

미디어위키의 특정 분가나 개발 버전("마스터" 분기)을 사용하는 경우 최신 변경 사항을 비교적 쉽게 확인할 수 있습니다. 미디어위키를 복제한 디렉토리로 변경하고 다음 명령을 실행하세요.

git pull

사용 중인 분기의 모든 최신 변경 사항이 적용됩니다.

새로운 버전의 코어는 더 새로운 버전의 확장 기능 및 스킨이 필요할 수 있으므로 각 확장 기능 및 스킨 디렉토리에 들어가 git pull --recurse-submodules와 같은 명령어로 업데이트해야 합니다.

또한 vendor/를 최신 버전의 필수 라이브러리로 업데이트해야 합니다. 이는 종종 다음 Composer 명령을 실행하는 것을 의미하지만 자세한 내용은 위의 #외부 라이브러리 가져오기를 참조하세요.

composer update --no-dev

코드와 필요한 라이브러리를 업데이트/업그레이드한 후 미디어위키 update.php 명령줄 스크립트를 실행하여 필요에 따라 데이터베이스 테이블을 업데이트해야 합니다.

php maintenance/update.php

MediaWiki-Vagrant 을 사용하면 이러한 모든 단계를 수행하는 vagrant git-update라는 단일 명령을 제공합니다.

다른 버전으로 변경하기

Each of our versions are tracked as branches or tags. In order to switch to a different version (for example from the master branch to a different branch or tag), checkout the particular branch or tag you want from within your MediaWiki clone directory:

git checkout <브랜치 이름>

또는

git checkout <태그명>

The changes will be applied automatically and you will be all set to go.

Git를 이용하여 미디어위키 확장 기능 다운로드 받기

List of extensions in git

확장 기능 다운로드

In the next commands, replace ‎<EXT> with the name of the extension you want to download, without spaces. For Extension:TitleKey , it would be TitleKey. (case sensitive!)

Git에서 확장기능을 내려받고 복제:

With your developer account, use these commands to get the master branch:

cd /path/to/extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/<EXT>

To clone and checkout a stable release branch instead, use these commands:

cd /path/to/extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/<EXT> --branch REL1_41

You can view extension source code in Gerrit's gitiles application, and at the URL:

https://gerrit.wikimedia.org/g/mediawiki/extensions/<EXT>/+/HEAD


모든 확장 기능을 다운로드

If you prefer to have all MediaWiki extensions that are at gerrit.wikimedia.org checked out to your machine, enter the following:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions

Or, to checkout stable releases branch instead, use this command:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions --branch REL1_41

After running the git clone command, continue with these commands:

cd /path/to/extensions
git submodule update --init --recursive

At any time, to update all extensions to their latest versions of that branch, enter:

cd /path/to/extensions
git pull
git submodule update --init --recursive

다른 브랜치를 사용하려면(예: 새로운 출시판 이후):

git submodule foreach 'git checkout -b REL1_40 origin/REL1_40 || :'

Remember that you should only use versions of extensions from the same release as that version of MediaWiki and each other.

마스터 브랜치를 추적하려면:

git submodule foreach 'git checkout -b origin/master || :'

안정판으로 간주되지 않기 때문에 어떠한 환경에서도 업무용으로 마스터 코드를 사용하지 않는 것이 좋음을 명심하십시오.

If you only need a read-only checkout (for instance to grep or analyse all MediaWiki code), you can use the shared MediaWiki checkout on Labs, without downloading anything on your machines.

확장 기능 제거하기

  1. LocalSettings.php에서 "require_once …" 또는 "wfLoadExtension( … )" 부분을 제거합니다.
  1. Remove any line referencing the extension in composer.local.json (usually in the "extra → merge-plugin → include" section)
  1. Remove the extension's directory in install-dir/extensions/

Git를 이용한 미디어위키 스킨 다운로드

List of skins in git

미디어위키 1.24 이후로는 스킨들을 Git 다운로드에 포함하지 않습니다.

Follow the exact same procedure as for extensions (described in the previous section), but using skins rather than extensions in all URLs and paths.

Detailed installation instructions are available on each skin's page here on MediaWiki.org, for example see Skin:Vector#Installation. Instructions for all other skins are analogous.

같이 보기

Appendix

The Revision as of 14:26, 21 March 2019 changed the standard of linking to gerrit.wikimedia.org:

from:

gerrit.wikimedia.org/r/p/mediawiki

to:

gerrit.wikimedia.org/r/mediawiki