You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup_war.mkd 2.5KB

11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233
  1. ## Gitblit WAR Installation & Setup
  2. 1. Download Gitblit WAR [${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.war) to the webapps folder of your servlet container.
  3. 2. You may have to manually extract the WAR (zip file) to a folder within your webapps folder.
  4. 3. By default, the Gitblit webapp is configured through `WEB-INF/data/gitblit.properties`.
  5. Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sure to review and set:
  6. - *git.packedGitLimit* (set larger than the size of your largest repository)
  7. 4. You may have to restart your servlet container.
  8. 5. Open your browser to <http://localhost/gitblit> or whatever the url should be.
  9. 6. Enter the default administrator credentials: **admin / admin** and click the *Login* button
  10. **NOTE:** Make sure to change the administrator username and/or password!!
  11. ### WAR Data Location
  12. By default, Gitblit WAR stores all data (users, settings, repositories, etc) in `${contextFolder}/WEB-INF/data`. This is fine for a quick setup, but there are many reasons why you don't want to keep your data within the webapps folder of your servlet container. Specifying an alternate *baseFolder* also allows for simple upgrades in the future.
  13. Choose a location that is writeable by your servlet container!
  14. After you configure baseFolder and restart your container, Gitblit will copy the contents of the `WEB-INF/data` folder to your specified *baseFolder* **IF** the file `${baseFolder}/gitblit.properties` does not already exist. This allows you to get going with minimal fuss.
  15. #### Specifying baseFolder via GITBLIT_HOME
  16. You can specify `GITBLIT_HOME` either as an environment variable or as a `-DGITBLIT_HOME` JVM system property.
  17. #### Specifying baseFolder via web.xml
  18. You may specify an external location for your data by directly editing `WEB-INF/web.xml` and manipulating the *baseFolder* env-entry. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
  19. #### Specifying baseFolder via JNDI
  20. This is a better way to configure your *baseFolder* because it survives WAR redeploys or deployments of new versions. These directions assume you are running Tomcat as your container, other containers may have different ways to specify global JNDI environment entries.
  21. 1. Open TOMCAT_HOME/conf/context.xml
  22. 2. Insert an *Environment* node within the *Context* node.<pre>&lt;Environment name="baseFolder" type="java.lang.String" value="c:/projects/git/gitblit/data" override="false" /&gt;</pre>