#!/bin/bash ## Install Gogs 0.6.3 on Ubuntu 14.04 LTS 64Bits ## Author: Nilton OS -- www.linuxpro.com.br ## Version: 0.2 echo 'install_gogs_ubuntu.sh' echo 'Support Ubuntu/Debian' echo 'Installs Gogs 0.6.3' echo 'Requires Ubuntu 14.04+, Debian 7+' # Check if user has root privileges if [[ $EUID -ne 0 ]]; then echo "You must run the script as root or using sudo" exit 1 fi apt-get update apt-get install -y unzip apt-get install -y wget git-core postfix mysql-client mysql-server adduser --disabled-login --gecos 'Gogs' git su - git cd wget http://gogs.dn.qbox.me/gogs_v0.6.3_linux_amd64.zip unzip gogs_v0.6.3_linux_amd64.zip rm -f gogs_v0.6.3_linux_amd64.zip cd gogs mysql -p < etc/mysql.sql exit cp /home/git/gogs/scripts/init/debian/gogs /etc/init.d/ chmod +x /etc/init.d/gogs /etc/init.d/gogs start ## Gogs enable on Boot update-rc.d gogs defaults ## Gogs Server App run on port 3000 ## Access http://ip_your_server:3000 to continue the installation ## Links ## http://gogs.io/docs/installation/install_from_source.html ## http://gogs.io/ ## https://github.com/gogits/gogs/ ## https://github.com/gogits/gogs/blob/master/conf/app.ini