# chmod g+rwx /home/<gerrit-user> $ ls -l /home/ 合計 12 drwxrwxr-x 3 gerrit gerrit 88 8月 28 08:40 gerrit
# apt-get install postgresql postgresql-contrib
$ sudo -i -u postgres
$ psql postgres@localhost:~$
postgres@localhost:~$ \q
postgres@localhost:~$ createuser --username=postgres -RDIElPS <gerrit-user> postgres@localhost:~$ createdb --username=postgres -E UTF-8 -l ja_JP.UTF8 -T template0 -O <gerrit-user> reviewdb
# echo "deb mirror://mirrorlist.gerritforge.com/deb gerrit contrib" > /etc/apt/sources.list.d/gerritforge.list
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1871F775
# aptitude update # aptitude install gerrit
# diff gerrit.config gerrit.config.orig 3c3 < canonicalWebUrl = http://<your-host-name>:8080/gerrit --- > canonicalWebUrl = http://<your-host-name>:8080/ 16c16 < listenUrl = proxy-http://<your-host-name>/gerrit --- > listenUrl = http://*:8080/
# /etc/init.d/gerrit restart Stopping Gerrit Code Review: OK Starting Gerrit Code Review: OK
# diff -u 000-default.conf 000-default.conf.orig --- 000-default.conf +++ 000-default.conf.orig @@ -26,8 +26,6 @@ # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf - - AllowEncodedSlashes On </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
# /etc/init.d/apache2 restart Restarting apache2 (via systemctl): apache2.service.
http://<your-host-name>:8080/gerrit
$ git clone ssh://<user-name>@<your-host-name>:29418/<project-repos-name>