Install Bitbucket Server from an archive file
このページでは、アーカイブ ファイルから Bitbucket Server を手動でインストールする方法について説明します。ただし、インストールを素早く問題なく実行するために、Bitbucket Server インストーラーを使用することを強くおすすめします。
関連ページ
- 「使用を開始する」を参照し、インストーラーの使用を検討してください
- Use Bitbucket in the enterprise
- Bitbucket Server 用の Docker コンテナ イメージ
1. サポート対象プラットフォームを確認する
Bitbucket Server でのテストが実施済みの、推奨されるアプリケーション サーバー、データベース、オペレーティング システム、Web ブラウザ、および Java や Git のバージョンについては、「サポート対象プラットフォーム」のページを参照してください。
アトラシアンでは、x86 ハードウェアおよび x86 ハードウェアの 64 ビット拡張版で動作する Bitbucket Server のみを公式にサポートしています。
Cygwin Git is not supported. No internal testing is done on that platform, and many aspects of Bitbucket Server's functionality (pull requests and forks among them) have known issues.
2. Java のバージョンを確認する
ターミナルまたはコマンド プロンプトで以下を実行します。
java -version
Java のバージョンは 1.8.x である必要があります。64 ビット版オペレーティング システムをお使いの場合は、64 ビット バージョンの Java が必要となります。
3. Git および Perl のバージョンを確認する
ターミナルまたはコマンド プロンプトで以下を実行します。
git --version
perl --version
Git のバージョンは 1.8.x 以降である必要があります。Perl のバージョンは 5.8.8 以降である必要があります。
Git および Perl のサポート対象バージョンが見つからない場合、それらをインストールまたはアップグレードする必要があります。「Git のインストールとアップグレード」を参照してください。
4. Bitbucket Server を取得する
Download Bitbucket Server from the Atlassian download site. Looking for the Bitbucket Server WAR file?
ダウンロードしたファイルをインストール場所に展開します (パスにスペースは含まないこと)。
The path to the extracted directory is referred to as the
in these instructions.<Bitbucket Server installation directory>
Never unzip the Bitbucket Server archive file over the top of an existing Bitbucket Server installation – each version of Bitbucket Server includes versioned jar files, such as bitbucket-model-4.0.0.jar
. If you copy these, you end up with multiple versions of Bitbucket Server's jar files in the classpath, which leads to runtime corruption.
Bitbucket Server の展開と Bitbucket Server の実行 (ステップ 6.) には同じユーザー アカウントを使用し、起動時に権限の問題が発生するのを回避します。本番環境インストールの場合、システムで Bitbucket Server を実行する新しい専用ユーザーを作成することをおすすめします。「Bitbucket Server を専用ユーザーで実行する」をご参照ください。
5. Bitbucket Server にデータの保存先を指定する
Bitbucket ホーム ディレクトリは、Bitbucket Server のデータが格納される場所です。
If you are upgrading Bitbucket Server, simply update the value of BITBUCKET_HOME
in the <Bitbucket Server installation directory
>/bin/set-bitbucket-home
file so the new Bitbucket Server installation points to your existing Bitbucket Server home directory (if you use a BITBUCKET_HOME
environment variable to specify the home directory location, no change is required).
Otherwise, for a new install, create your Bitbucket home directory (without spaces in the name), and then tell Bitbucket Server where you created it by editing the <Bitbucket Server installation directory
>/bin/set-bitbucket-home.sh
(or set-bitbucket-home.bat
) file – uncomment the BITBUCKET_HOME
line and add the absolute path to your home directory. Here's an example of what that could look like when you're done:
#
if ["x${BITBUCKET_HOME}" = "x"]; then
export BITBUCKET_HOME="/home/username/bitbucket_home"
fi
You should not locate your Bitbucket home directory inside the
— they should be entirely separate locations. If you do put the home directory in the <Bitbucket Server installation directory>
<Bitbucket Server installation directory>
it may be overwritten, and lost, when Bitbucket Server gets upgraded. And by the way, you'll need separate Bitbucket Server home directories if you want to run multiple instances of Bitbucket Server.
6. Move server.xml to your Bitbucket Server home shared
directory
新規インストールの場合や、Stash 3.8 以降をすでに実行している場合は、次の手順にスキップできます。
If you are upgrading from Stash 3.7 or earlier and you made any changes to <Bitbucket Server installation directory>/conf/server.xml
(for instance to secure your server with SSL):
- In the
<BITBUCKET_HOME>
directory, make a new directory calledshared
. - Then, copy your modified server.xml file into
<BITBUCKET_HOME>/shared/
. Ensure the copied file is readable by the user account that runs Bitbucket Server.
7. (Optional) Install and configure a remote search server
Bitbucket Server 4.5+ comes with a bundled search server, which runs as a separate process from the Bitbucket Server application, and does not require any extra configuration.
If you plan to use the bundled search server, jump to the next step, Start Bitbucket Server!
However, you can also install a search server on a remote machine, which can provide some advantages allocating memory resources. Read the instructions for installing and configuring a remote search server at Install and configure a remote Elasticsearch server and Install and configure a remote OpenSearch server.
Bundled search server ports
Bitbucket Server's bundled search server requires ports 7992 and 7993 be available to provide code search functionality. This is not configurable, so ensure these ports are available.
8. Bitbucket Server を開始する
There are a couple of ways in which you can start Bitbucket Server – see Start and stop Bitbucket.
If you've setup a remote search server you do not want to start the bundled search server.
To start Bitbucket Server with a remote search server
When using a remote search server, instead of the bundled search server, start Bitbucket Server by running start-bitbucket.sh --no-search
. This starts Bitbucket Server alone without running the bundled search server.
Bitbucket Server での設定を完了する
次に、ブラウザで http://localhost:7990/ に移動し、セットアップ ウィザードを実行します。セットアップ ウィザードで次の手順を行います。
- If you're evaluating Bitbucket Server, select Internal at the 'Database' step. Bitbucket Server will use its internal database, and you can easily migrate to external database later. See Connect Bitbucket to an external database.
- Bitbucket Server ライセンス キーを入力します。
- Bitbucket Server のベース URL を設定します。
- 管理者アカウントを設定します。
- Jira Software 連携をセットアップできます。これは必要に応じて後から実行することもできます。「セットアップ ウィザードで Jira 連携を設定する」を参照してください。
9. メール サーバーをセットアップする
メール サーバーを設定して、ユーザーが自身のパスワードを生成するリンクを Bitbucket Server から受信できるようにします。「メール サーバーのセットアップ」を参照してください。
10. ユーザーとディレクトリを追加する
次に、Bitbucket Server でユーザーをセットアップし、既存のディレクトリについて Bitbucket Server に示します。詳細については、以下のページを参照してください。
本番環境用の追加手順
For production or enterprise environments we recommend that you configure the additional aspects described on Use Bitbucket in the enterprise. The aspects described there are not necessary when you are installing for evaluation purposes only.
If you wish to install Bitbucket Server as a service on Linux, see Run Bitbucket as a Linux service.
Bitbucket Server の停止
Bitbucket Server のアンインストール
To uninstall Bitbucket Server, stop Bitbucket Server as described above and then delete the <Bitbucket Server installation directory
> and Set the home directory.