Bitbucket Server をアーカイブ ファイルから Linux にインストールする

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

このページでは、tar.gz ファイルを使用して手動で、外部データベースのある本番環境に Bitbucket Server をインストールする方法を説明します。

この方法では、インストールプロセスをユーザーが最大限制御できます。



Bitbucket Server のその他のインストール方法 

  • トライアル - 無料トライアルの利用をすぐに開始できます。
  • インストーラー – Linux インストーラーを使用して Bitbucket をインストールします。 
  • Windows- Bitbucket を Windows Server にインストールします。

On this page

はじめる前に

Bitbucket Server をインストールする前に、いくつかの質問に答える必要があります。 

サポートされているオペレーティングシステムと Java のバージョンを使用していますか?
詳細を読む...

サポート対象プラットフォーム」 ページで、インストールする Bitbucket Server のバージョンをご確認ください。このページでは、サポート対象のオペレーティング システム、データベースおよびブラウザーに関する情報を提供しています。

参考情報

  • 本番サイトでの macOS への Bitbucket Server のインストールはサポートされません。
  • Bitbucket Server インストーラーには Java (JRE) および Tomcat が含まれているため、これらを別途インストールする必要はありません。
Bitbucket Server をサービスとして実行する予定ですか?
詳細を読む...

Bitbucket Server をサービスとして実行すると、Linux サーバーの起動時に Bitbucket Server が自動的に開始します。

Bitbucket Server をサービスとして実行したい場合は Linux インストーラーを使用してください。

Bitbucket Server をサービスとして実行しない場合

  • Bitbucket Server のインストール ディレクトリで start-bitbucket.sh ファイルを実行することで Bitbucket Server を開始および停止します。
  • Bitbucket Server は、Bitbucket Server をインストールするために使用されたユーザー アカウントで実行されます。専用ユーザーとして実行するように選択することもできます。
  • サーバーが再起動される場合、Bitbucket Server を手動で再起動する必要があります。

これらのオプションの詳細については、次のページを参照してください。

Bitbucket は既定で 7990、7992、および 7993 ポートを使用します。これらは利用可能ですか?
詳細を読む...

Port 7990: Bitbucket runs on port 7990 by default. If this port is already in use, see Change the port Bitbucket listens on for more guidance on changing this.

ポート 7992 および 7993: Bitbucket Server に組み込みの Elasticsearch インスタンス (機能の検索に必要) はポート 7992 および 7993 を使用する必要があります。これを変更することはできないため、これらのポートが利用可能であることを確認してください。

データベースはセットアップ済みで使用可能な状態ですか?
詳細を読む...

To run Bitbucket in production you'll need an external database. Check the Supported platforms page for the version you're installing for the list of databases we currently support.

参考情報

  • データベースは開始前にセットアップしておきます。PostgreSQLOracle、およびSQL Server 向けのガイドが提供されています。
  • MySQL は Bitbucket Server インスタンスでのサポート対象ですが、これは推奨されません。詳細については、「Bitbucket Server を MySQL に接続する」を参照してください。

Bitbucket Server ライセンスを持っていますか?
詳細を読む...

Bitbucket Server を使用するには、有効なライセンスが必要です。

参考情報

  • ライセンスをお持ちではない場合、セットアップ中に評価ライセンスを作成できます。この際、業務用のメール アドレスを使用するようにしてください。
  • If you already have a license key you'll be prompted to log in to my.atlassian.com to retrieve it, or you can enter the key manually during setup.
  • Bitbucket Cloud (bitbucket.org) から移行する場合、新しいライセンスが必要です。

Git および Perl の適切なバージョンをインストールしていますか?
詳細を読む...

Bitbucket Server requires Git on the machine that will run Bitbucket Server. If you need to check, install, or upgrade Git on the Bitbucket Server instance machine, see Installing and upgrading Git.

Git を最新バージョンにアップグレードする前に、現在サポートされている Git バージョンを「サポート対象のプラットフォーム」ページで確認してください。

Check that you have all the other system requirements, including Perl, to avoid any trouble.

JAVA_HOME 変数が正しく設定されていますか?
詳細を読む...

Before you install Bitbucket Server, check that you're running a supported Java version and that the JAVA_HOME environment variable is set correctly.

JAVA_HOME 変数を確認するには:

$ java -version

JAVA_HOME 変数が正しく設定されていることを確認するには:

$ echo $JAVA_HOME

If you see a path to your Java installation directory, the JAVA_Home environment variable has been set correctly. If a path is not returned you'll need to set your JAVA_HOME environment variable manually before installing Bitbucket Server.

Elasticsearch のリモート インスタンスを使用する必要はありますか?
詳細を読む...

Bitbucket Server comes with a bundled Elasticsearch instance, which runs as a separate process from the Bitbucket Server application and doesn't require any extra configuration.

Elasticsearch インスタンスをリモート マシンにインストールすることもできます。これにより、メモリ リソースを割り当てる際にメリットがあります。すぐに使用できるスクリプトで自動的に構成できる、組み込みの Elasticsearch を使用することをおすすめします。

If you still want to use a remote instance of Elasticsearch there are instructions for doing so on the page How to Install and configure a remote Elasticsearch instance.



Bitbucket Server のインストール

1. Bitbucket Server をダウンロードする

Download the tar.gz file - www.atlassian.com/software/bitbucket/download.

2. インストールディレクトリの作成

  1. Create your installation directory (with full control permission) – this is where Bitbucket will be installed. Avoid using spaces or special characters in the path. We'll refer to this directory as your <installation-directory>.

  2. Extract the tar.gz file to your <installation-directory>

3. ホームディレクトリの作成

  1. Create your home directory (with full control permission) – this is where your Bitbucket Server data is stored. This should be separate to your installation directory. We'll refer to this directory as your <home-directory>

  2. Edit <installation-directory>/bin/set-bitbucket-home.sh file – uncomment the BITBUCKET_HOME line and add the absolute path to your home directory.

4. Bitbucket を起動する

  1. Change directory to the <installation-directory> and run this command:

    bin/start-bitbucket.sh



  2. In your browser, go to http://localhost:7990/ and run through the Setup Wizard. 

Bitbucket のセットアップ

Bitbucket Server の初回起動時にブラウザでアクセスすると、セットアップ ウィザードが自動的に実行されます。

5. データベースへの接続 

  1. データベースをまだ作成していない場合、ここで作成します。詳細については、このページの「はじめる前に」セクションを参照してください。 

データベースとして [外部] を選択し、ドロップダウン メニューからデータベース タイプを選択して、データベースの詳細情報を入力します。

MySQL を使用する場合は追加の手順が必要です...

MySQL / MariaDB 用の JDBC ドライバはライセンス上の制限により、Bitbucket Server にバンドルされていません。このため、ドライバをダウンロードしてインストールする必要があります。

  1. MySQL Connector/J JDBC ドライバをダウンロード サイトからダウンロードします。
  2. ダウンロードした zip/tar.gz ファイルを展開します。
  3. 展開したディレクトリの .jar ファイルを <Bitbucket home directory>/lib ディレクトリにコピーします。
  4. Bitbucket Server を再起動します。

Bitbucket Server を MySQL に接続する」もご参照ください。

6. ライセンス キーの追加

Follow the prompts to log in to my.atlassian.com to retrieve your license, or enter a license key.

また、このステップでベース URL を設定できます (あとから行うこともできます)。

7. 管理者アカウントの作成

  1. 管理者アカウントの詳細情報を入力します。
  2. Select either Go to Bitbucket to go straight to the Bitbucket interface or Integrate with Jira to create your connection with an existing Jira application. 

    詳細を読む...

    You can also select to use a Jira application as your user database during this step. See the page Configuring Jira integration in the Setup Wizard for details. You can also do this later.

9. Bitbucket Server の使用を開始する

That's it! Your Bitbucket site is accessible from a URL like this: http://<computer_name_or_IP_address>:<port>

次のステップ

本番環境に Bitbucket をセットアップする場合、次に、以下の部分を設定することをおすすめします。


Read more about setting up Bitbucket for an enterprise here: Using Bitbucket in the enterprise.

最終更新日: 2021 年 10 月 28 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.