Git에서 다운로드

From mediawiki.org
This page is a translated version of the page Download from Git and the translation is 70% complete.
Outdated translations are marked like this.

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

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

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

더 자세한 정보를 위해서는 Git를 참조하세요.

전제 조건

이것을 사용하기 전에 Git가 필수적으로 설치되어 있어야 합니다. Git 설치 방법은 사용하는 운영체제에 따라 모두 다릅니다. Gerrit/Tutorial#Set up Git을 읽거나, 즐겨쓰는 검색 엔진을 이용하세요.

서드파티 라이브러리의 다운로드 및 설치를 위해 Composer 를 설치할 것을 권장합니다.

Git를 사용해서 미디어위키 다운로드

다운로드

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

첫번째 단계는 'MediaWiki core 저장소'를 복제하는 것입니다. 시간이 소요될 수 있습니다.

개발자를 위한 다운로드

미디어위키의 마지막 개발 버전은 'master' 브랜치에서 찾아볼 수 있습니다.

먼저 ssh 사용자명을 가지려면 개발자 계정이 있는지 확인하세요.

그 다음, 검토를 위한 변경사항을 제출할 수 있도록 터미널 창에서 다음의 명령을 입력하여 ssh <USERNAME>으로 복제하세요.

git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/core.git mediawiki

이를 통해 마스터 브랜치 $1를 참조하는 전체 미디어위키 코어 저장소를 mediawiki 이름의 하위 디렉터리로 복제합니다.

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

안정 브랜치 다운로드

소프트웨어 패치는 개발하고 싶지 않지만 익명으로 안정판 브랜치 1.40을 복제하고 싶다면 다음 명령어를 대신에 사용하세요:

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

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

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

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

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

git tag -l | sort -V

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

git checkout 1.40.1

Git 하부 모듈 업데이트하기

공통으로 쓰이는 확장 기능과 스킨을 위해 출시 브랜치는 수많은 Git 하위 모듈을 포함합니다. (마스터 브랜치는 이것들이 없음) 하위 모듈을 업데이트하려면 다음을 실행하십시오: The master branch does not have these. To update the submodules, run:

cd mediawiki
git submodule update --init --recursive

외부 라이브러리 가져오기

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

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

  • composer PHAR 다운로드 및 설치 후, 선택적으로 composer.phar 파일의 이름을 자신의 운영체제에 맞게 지시된 대로 바꾸고, 미디어위키 디렉터리로 이동하여 composer update --no-dev를 실행합니다. 권장되는 방법입니다.
    • If the default PHP CLI version does not match the web server's PHP version, specify it with e.g. php7.4 composer.phar update --no-dev.
  • Composer를 사용하고 싶지 않거나 WMF 프로덕션 클러스터에 쓰이는 동일한 집합의 벤더 라이브러리를 사용하고 싶으시다면 미디어위키 설치본의 코어 폴더 안에 vendor/ 디렉터리를 만들 수 있습니다:
    • With your developer account, use this command: git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/vendor.git
    • For anonymous checkout, use this command: git clone https://gerrit.wikimedia.org/r/mediawiki/vendor.git
    • 확장 기능 중 어떠한 것이라도 자체적인 Composer 요구 사항이 있을 경우 이 옵션을 사용할 수 없습니다.

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

최신으로 유지하기

If you're using a particular branch or the development version ("master" branch) of MediaWiki, picking up the latest changes is relatively easy. Change into your MediaWiki clone directory and issue this command:

git pull

All of the latest changes for the branch you are using will be applied.

The new version of core may require newer versions of extensions and skins, so you must go into each extension and skin directory and update it with a command like git pull --recurse-submodules.

You also need to update vendor/ with any newer versions of required libraries. This often means running the following Composer command, but see #Fetch external libraries above for more details:

composer update --no-dev

After updating/upgrading the code and required libraries you should run the MediaWiki update.php command-line script to update database tables as needed:

php maintenance/update.php

If you use MediaWiki-Vagrant , it offers a single command, vagrant git-update, that performs all these steps.

다른 버전으로 변경하기

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 ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/extensions/<EXT>

For anonymous checkout of the stable branch instead, use these commands:

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

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

https://gerrit.wikimedia.org/g/mediawiki/extensions/<EXT>/+/refs/heads/master

모든 확장 기능을 다운로드

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

With your developer account, to get the master branch:

git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/extensions

For anonymous checkout of the stable branch instead, use this command:

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

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_39 origin/REL1_39 || :'

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