James Moger
2013-03-27 f6b200be4c8b90c26886c6cdd5809abac8c4ac15
src/site/setup.mkd
File was renamed from docs/01_setup.mkd
@@ -1,6 +1,6 @@
## Gitblit WAR Installation & Setup
1. Download [Gitblit WAR %VERSION%](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%) to the webapps folder of your servlet container.
1. Download [Gitblit WAR ${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.war) to the webapps folder of your servlet container.
2. You may have to manually extract the WAR (zip file) to a folder within your webapps folder.
3. By default, the Gitblit webapp is configured through `WEB-INF/data/gitblit.properties`.<br/>
Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sure to review and set:
@@ -20,7 +20,7 @@
## Gitblit GO Installation & Setup
1. Download and unzip [Gitblit GO %VERSION%](http://code.google.com/p/gitblit/downloads/detail?name=%GO%).
1. Download and unzip [Gitblit GO ${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.zip).
*Its best to eliminate spaces in the path name.* 
2. The server itself is configured through a simple text file.<br/>
Open `data/gitblit.properties` in your favorite text editor and make sure to review and set:
@@ -30,7 +30,7 @@
    **https** is strongly recommended because passwords are insecurely transmitted form your browser/git client using Basic authentication!
    - *git.packedGitLimit* (set larger than the size of your largest repository)
    - *git.streamFileThreshold* (set larger than the size of your largest committed file)
3. Execute `authority.cmd` or `java -jar authority.jar --baseFolder data` from a command-line
3. Execute `authority.cmd` or `java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data` from a command-line
    1. fill out the fields in the *new certificate defaults* dialog
   2. enter the store password used in *server.storePassword* when prompted.  This generates an SSL certificate for **localhost**.
   3. you may want to generate an SSL certificate for the hostname or ip address hostnames you are serving from<br/>**NOTE:** You can only have **one** SSL certificate specified for a port.
@@ -165,16 +165,16 @@
Here is a sample configuration that works on Debian 7.0 (Wheezy), your distribution may be different.
1. First we need to make sure we have Apache's proxy modules available.  
<pre>
---FIXED---
sudo su
cd /etc/apache2/mods-enabled
ln -s ../mods-available/proxy.load proxy.load
ln -s ../mods-available/proxy_balancer.load proxy_balancer.load
ln -s ../mods-available/proxy_http.load proxy_http.load
ln -s ../mods-available/proxy_ajp.load proxy_ajp.load
</pre>
---FIXED---
2. Then we need to make sure we are configuring Apache to use the proxy modules and to setup the proxied connection from Apache to Gitblit GO or from Apache to your chosen servlet container.  The following snippet is stored as `/etc/apache2/conf.d/gitblit`.  
%BEGINCODE%
---FIXED---
# Turn off support for true Proxy behaviour as we are acting as 
# a transparent proxy
ProxyRequests Off
@@ -189,11 +189,11 @@
ProxyPreserveHost On
 
# Set the permissions for the proxy
&lt;Proxy *&gt;
<Proxy>
   AddDefaultCharset off
   Order deny,allow
   Allow from all
&lt;/Proxy&gt;
</Proxy>
 
# The proxy context path must match the Gitblit context path.
# For Gitblit GO, see server.contextPath in gitblit.properties.
@@ -214,7 +214,7 @@
#RequestHeader set X-Forwarded-Context /
#ProxyPass /gitblit ajp://localhost:8009/gitblit
%ENDCODE%
---FIXED---
**Please** make sure to:  
    1. Review the security of these settings as appropriate for your deployment
    2. Uncomment the *ProxyPass* setting for whichever connection you prefer (http/ajp)
@@ -619,7 +619,7 @@
<blockquote>Grape (The Groovy Adaptable Packaging Engine or Groovy Advanced Packaging Engine) is the infrastructure enabling the grab() calls in Groovy, a set of classes leveraging <a href="http://ant.apache.org/ivy">Ivy</a> to allow for a repository driven module system for Groovy. This allows a developer to write a script with an essentially arbitrary library requirement, and ship just the script. Grape will, at runtime, download as needed and link the named libraries and all dependencies forming a transitive closure when the script is run from existing repositories such as Ibiblio, Codehaus, and java.net.</blockquote>
%BEGINCODE%
---JAVA---
// create and use a primitive array
import org.apache.commons.collections.primitives.ArrayIntList
@@ -630,7 +630,7 @@
ints.add(0, 42)
assert ints.size() == 1
assert ints.get(0) == 42
%ENDCODE%
---JAVA---
### Custom Fields