Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:gogs

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

freebsd:gogs [2015/02/13 15:09]
idefix angelegt
freebsd:gogs [2015/02/13 16:17] (aktuell)
idefix
Zeile 1: Zeile 1:
 ====== Gogs ====== ====== Gogs ======
 +===== Installation =====
 +Create a test user:
 +<code console>
 +adduser -w no
 +# name the user gogs
 +# Define as shell bash
 +</​code>​
 +
 To install gogs do the following: To install gogs do the following:
 <code console> <code console>
 +cd /​usr/​ports/​devel/​git
 +install install clean
 cd /​usr/​ports/​lang/​go/​ cd /​usr/​ports/​lang/​go/​
 make install clean make install clean
Zeile 8: Zeile 18:
 cd /​usr/​ports/​databases/​gosqlite3/​ cd /​usr/​ports/​databases/​gosqlite3/​
 make install clean make install clean
-mkdir -/usr/local/src + 
-cd /usr/local/src +su gogs 
-git clone https://​github.com/​gogits/gogs.git +cd 
-bash +echo '​export GOROOT= ​/usr/local/go' >> $HOME/​.bash_profile 
-mkdir -p /usr/local/share/go +echo '​export GOPATH=$HOME/go' >> $HOME/.bash_profile 
-export ​GOPATH=/usr/local/share/go+echo '​export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> $HOME/​.bash_profile 
 +source $HOME/​.bash_profile 
 +# go get -u github.com/gpmgo/gopm 
 +mkdir -p $GOPATH/src/github.com/gogits 
 +cd $GOPATH/src/github.com/gogits 
 +git clone -b dev https://​github.com/​gogits/​gogs.git 
 +cd gogs 
 +go get ./...
 go build go build
 +cd $GOPATH/​src/​github.com/​gogits/​gogs
 +./gogs web
 +</​code>​
 +If you do not see an error message press ctrl+c.
  
 +===== Configuration =====
 +Create a new mysql user and database.
 +<code console>
 +mysql -u root -p
 +create database gogs;
 +grant all privileges on gogs.* to '​gogs'​@'​localhost'​ identified by '​password';​
 +quit
 </​code>​ </​code>​
 +
 +<code console>
 +su - gogs
 +cd
 +mkdir -p logs
 +mkdir -p gogs-repositories
 +mkdir -p $GOPATH/​src/​github.com/​gogits/​gogs/​custom/​conf
 +cd $GOPATH/​src/​github.com/​gogits/​gogs
 +cp conf/​app.ini custom/​conf/​
 +vi $GOPATH/​src/​github.com/​gogits/​gogs/​custom/​conf/​app.ini
 +</​code>​
 +
 +Change the following lines in the configuration:​
 +<code yaml>
 +RUN_USER = gogs
 +ROOT = /​usr/​home/​gogs/​gogs-repositories
 +DOMAIN = fechner.net
 +ROOT_URL = %(PROTOCOL)s://​git.%(DOMAIN)s:/​
 +HTTP_ADDR = localhost
 +HTTP_PORT = 3000
 +
 +Configure database section to match you database user, password and database you configured
 +</​code>​
 +
 +Next we configure apache24:
 +<code console>
 +mkdir -p /​usr/​home/​http/​git.fechner.net/​logs
 +</​code>​
 +
 +<code yaml /​usr/​local/​etc/​apache24/​Includes/​git.fechner.net.conf>​
 +<​VirtualHost *:80 localhost:​443>​
 +ServerName git.fechner.net
 +ServerAdmin idefix@fechner.net
 +
 +ErrorLog /​usr/​home/​http/​git.fechner.net/​logs/​error.log
 +TransferLog /​usr/​home/​http/​git.fechner.net/​logs/​access.log
 +CustomLog /​usr/​home/​http/​git.fechner.net/​logs/​custom.log combined
 +
 +ProxyPass /     ​http://​localhost:​3000/​
 +
 +Include etc/​apache24/​ssl/​ssl-template.conf
 +Include etc/​apache24/​ssl/​https-forward.conf
 +</​VirtualHost>​
 +</​code>​
 +
 +First config is with:
 +<code console>
 +su - git
 +cd $GOPATH/​src/​github.com/​gogits/​gogs
 +./gogs web
 +</​code>​
 +
  
freebsd/gogs.txt · Zuletzt geändert: 2015/02/13 16:17 von idefix