James Moger
2014-07-01 c72b44f85fa37650c1540d330117f92687fbd37f
commit | author | age
8c99a7 1 ## Gitblit WAR Installation & Setup
JM 2
3 1. Download Gitblit WAR [${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.war) to the webapps folder of your servlet container.  
4 2. You may have to manually extract the WAR (zip file) to a folder within your webapps folder.
6c4be1 5 3. By default, the Gitblit webapp is configured through `WEB-INF/data/gitblit.properties`.
8c99a7 6 Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sure to review and set:
c72b44 7     - *git.packedGitLimit* (set larger than the size of your largest repository)
8c99a7 8 4. You may have to restart your servlet container. 
JM 9 5. Open your browser to <http://localhost/gitblit> or whatever the url should be.
10 6. Enter the default administrator credentials: **admin / admin** and click the *Login* button  
11     **NOTE:** Make sure to change the administrator username and/or password!! 
12
13 ### WAR Data Location
b5d532 14 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.
8c99a7 15
b5d532 16 Choose a location that is writeable by your servlet container!
8c99a7 17
b5d532 18 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.
8c99a7 19
b5d532 20 #### Specifying baseFolder through web.xml
JM 21
22 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.
23
24 #### Specifying baseFolder through JNDI
25
26 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.
27
28 1. Open TOMCAT_HOME/conf/context.xml
29 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>