diff --git a/Documentation/install.txt b/Documentation/install.txt index 0d045c6c8a..0ea6faca66 100644 --- a/Documentation/install.txt +++ b/Documentation/install.txt @@ -32,7 +32,9 @@ the downloads page at the project site: * http://code.google.com/p/gerrit/downloads/list[Gerrit Downloads] -Download any current `*.war` package. +Download any current `*.war` package. The war will be referred to as +`gerrit.war` from this point forward, so you may find it easier to +rename the downloaded file. Building Gerrit From Source @@ -84,9 +86,10 @@ Create a Gerrit specific user within the database and assign it a password, create a database, and give the user full rights: ==== - CREATE USER gerrit2 IDENTIFIED BY PASSWORD 'secret'; + CREATE USER gerrit2 IDENTIFIED BY 'secret'; CREATE DATABASE reviewdb; GRANT ALL ON reviewdb.* TO 'gerrit2'@'localhost'; + FLUSH PRIVILEGES; ==== @@ -120,14 +123,14 @@ index script through your database's query tool. PostgreSQL: ==== - java -jar gerrit.war --cat sql/index_postgres.sql | psql reviewdb + java -jar gerrit.war --cat sql/index_postgres.sql | psql reviewdb -U gerrit2 -W ==== MySQL: ==== - java -jar gerrit.war --cat sql/index_generic.sql | mysql reviewdb - java -jar gerrit.war --cat sql/mysql_nextval.sql | mysql reviewdb + java -jar gerrit.war --cat sql/index_generic.sql | mysql reviewdb -u gerrit2 -p + java -jar gerrit.war --cat sql/mysql_nextval.sql | mysql reviewdb -u gerrit2 -p ==== Configure site_path @@ -140,12 +143,14 @@ is stored in `system_config.site_path`, so you will need to update the database with this value. ==== - mkdir /home/gerrit/cfg - cd /home/gerrit/cfg + mkdir /home/gerrit2/cfg + cd /home/gerrit2/cfg - UPDATE system_config SET site_path='/home/gerrit/cfg' + UPDATE system_config SET site_path='/home/gerrit2/cfg' ==== +When '$site_path' is referenced below, it refers to the path set in the SQL above. + SSH Host Keys ~~~~~~~~~~~~~ @@ -167,7 +172,7 @@ application container. It is a security risk to make these files readable by anyone else. If you don't install Bouncy Castle, Gerrit will automatically -create a host key and save a copy to `'site_path'/ssh_host_key` +create a host key and save a copy to `'$site_path'/ssh_host_key` during first startup. For this to work correctly, Gerrit will require write access to the directory. @@ -180,7 +185,7 @@ any Git repository stored within it. ==== mkdir /srv/git - git config --file $site_path/gerrit.config gerrit.basePath /srv/git + git config --file '$site_path'/gerrit.config gerrit.basePath /srv/git ==== You may wish to consider also exporting this directory over the @@ -242,7 +247,7 @@ Copy Gerrit into the deployment: java -jar gerrit.war --cat extra/jetty_gerrit.xml >$JETTY_HOME/contexts/gerrit.xml cp gerrit.war $JETTY_HOME/webapps/gerrit.war - rm -f $JETTY_HOME/context/test.xml + rm -f $JETTY_HOME/contexts/test.xml ==== Edit `'$JETTY_HOME'/contexts/gerrit.xml` to correctly configure