Skip to content

Instantly share code, notes, and snippets.

@codedecay
Forked from jniltinho/install_gogs_ubuntu.sh
Last active August 29, 2015 14:27
Show Gist options
  • Save codedecay/35a4d7435f1c8d48dd06 to your computer and use it in GitHub Desktop.
Save codedecay/35a4d7435f1c8d48dd06 to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment