Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

メタデータの末尾にスキップ
メタデータの先頭に移動

Hey! We're going to install Stash on Windows. There are a few steps, but we think you'll really like Stash once it's up and running.

1. サポート対象プラットフォームを確認する

Better check the Supported platforms page first; it lists the application servers, databases, operating systems, web browsers and JDKs that we have tested Stash with and recommend.

Atlassian only officially supports Stash running on x86 hardware and 64-bit derivatives of x86 hardware.

Cygwin Git is not supported. No internal testing is done on that platform, and many aspects of Stash's functionality (pull requests and forks among them) have known issues. When running Stash on Windows, always use msys Git.

2. Check your version of Java

In a command prompt, run this:

java -version

The version of Java should be 1.6.0 or higher.

 If you don't see Java 1.6.0 or higher, then get Java...

Download and install the Java Platform JDK (not the JRE) from Oracle's website.

Now try running 'java -version' again to check the installation. The version of Java should be 1.6.0 or higher.

3. Check that Windows can find Java

Stash uses the JAVA_HOME environment variable to find Java. To check that, in a command prompt, run:

echo %JAVA_HOME%

You should see a path to the root directory of the Java installation. When running Stash on Windows, unlike Linux or Unix, JAVA_HOME paths with spaces are just fine.

 If you don't see a path...

If you don't see a path, or if you just see %JAVA_HOME%, then set JAVA_HOME as follows:

Windows 7 の場合:

  1. [Start] に移動し、"sys env" を検索してから、[Edit the system environment variables] を選択します。
  2. [Environment Variables] をクリックした後、[System variables] の下で [New] をクリックします。
  3. variable name に「JAVA_HOME」と入力し、Variable value として、Java のインストール先の絶対パスを入力します。末尾にバックスラッシュを使用したり、値を引用符で囲んだりしないでください。

Now, in a new command prompt,  try running '%JAVA_HOME%\bin\java -version'. You should see the same version of Java as you saw in 2. above.

4. Check your versions of Git and Perl

コマンド プロンプトで以下を実行します。

git --version
perl --version

The version of Git should be 1.7.6 or higher. The version of Perl should be 5.8.8 or higher.

 If you don't see supported versions of Git and Perl, then get Git...

Download the Full installer for official Git for Windows.

Run the Git installer. Ensure that git.exe is available in the path:

  • Option 2, "Run Git from the Windows Command Prompt", or Option 3, "Run Git and included Unix tools from the Windows Command Prompt", will both work with Stash.
  • Do not select Option 1, "Use Git Bash only" -- this will not work with Stash.

Now, in a new command prompt, try running 'git --version' again. The version of Git should be 1.7.6 or higher.

(warning) msys Git is the only supported distribution when running Stash on Windows. Cygwin Git is not supported and has known issues.

5. Now it's time to get Stash

Download Stash from the Atlassian download site.

Extract the downloaded file to an install location. The path to the extracted directory is referred to as the <Stash installation directory> in these instructions.

(warning)   Don't use spaces in the path to the Stash installation directory.

6. Tell Stash where to store your data

The Stash home directory is where your Stash data is stored.

Create your Stash home directory, and then tell Stash where you created it by setting a STASH_HOME environment variable, as follows.

Windows 7 の場合:

  1. [Start] に移動し、"sys env" を検索してから、[Edit the system environment variables] を選択します。
  2. [Environment Variables] をクリックした後、[System variables] の下で [New] をクリックします。
  3. Enter "STASH_HOME" as the Variable name, and the absolute path to your Stash home directory as the Variable value. Don't use a trailing backslash.

(warning) There are a couple of things to know about setting up the Stash home directory on Windows that will make life easier:

  • You should not locate your Stash home directory inside the <Stash installation directory> — they should be entirely separate locations. If you do put the home directory in the <Stash installation directory> it will be overwritten, and lost, when Stash gets upgraded. And, by the way, you can't use the same Stash home directory for multiple instances of Stash.
  • Keep the path length to the Stash home directory as short as possible. See Stash always shows incorrect Merge Conflict in PRs for an explanation.
  • Don't use spaces in the path to the Stash home directory.

7. Start Stash!

(warning) Stash needs to be run as a non-administrator user.

The user that runs Stash must have read and write access to the Stash home directory and the <Stash installation directory>.

In a command prompt, change directory to the <Stash installation directory> and run the following command:

bin\start-stash.bat

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

8. メール サーバーをセットアップする

Configure your email server so users can receive a link from Stash that lets them generate their own passwords. See Setting up your mail server.

9. ユーザーとディレクトリを追加する

Now is the time to set up your users in Stash, and to tell Stash about any existing repositories you have. Please the following pages for the details:

本番環境用の追加手順

For production environments we recommend that you configure the additional aspects below. These are not necessary when installing for evaluation purposes. Please see Using Stash in the enterprise for more information about best practice.

Stash を専用ユーザーとして実行する 
外部データベースを使用する
Stash ホームディレクトリを保護する
  • For production environments the Stash home directory (created in step 7 above) should be secured against unauthorised access. See Stash home directory.
Stash を HTTPS で保護する
  • For production environments access to Stash should be secured using HTTP over SSL, especially if your data is sensitive and Stash is exposed to the internet. See Securing Stash with HTTPS.
Run Stash as a Windows service
既存のユーザーディレクトリへ接続する
Stash へのコンテキストパスを変更する
  • Where you are running Stash behind a proxy, or you have another Atlassian application, or any Java web application, available at the same hostname and context path as Stash, then you should set a unique context path for Stash. See Moving Stash to a different context path.

Stopping Stash (optional)

In a command prompt, change directory to the <Stash installation directory> and run:

bin\stop-stash.bat