Alibaba cloud on ubuntu14.04-64 bit installation gogs

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

sudo apt-get update

sudo apt-get upgrade

sudo adduser gogs//create user password *******

Su gogs//switch to gogs user

CD ~//Enter user gogs root directory


sudo apt-get install git//installing Git

git--version//check if Git is installed successfully


sudo apt-get install mysql-server//install MySQL database account: root password: ********

MySQL--version//check MySQL version to determine if the installation was successful

Create Data Gogs

Mysql-u root-p
mysql> SET GLOBAL storage_engine = ' InnoDB ';
mysql> CREATE DATABASE gogs CHARACTER SET UTF8 COLLATE utf8_bin;
Mysql> GRANT all privileges on gogs.* to ' root ' @ ' localhost ' identified by ' itadmin ';
mysql> FLUSH privileges;
Mysql> QUIT;

sudo mkdir goapp//go Application installation directory

Installing the Golang Environment

sudo wget http://www.golangtc.com/static/go/go1.4.1.linux-amd64.tar.gz// download 64-bit binaries

Extracting binary files

TAR-XZVF go1.4.1.linux-amd64.tar.gz-c/var/opt/

You can then find a Go folder in the/var/opt/directory, which contains the Golang environment file

Configuring the Golang Environment

echo Export Goroot=/var/opt/go >>. BASHRC

echo Export gobin= $GOROOT/bin >>. BASHRC

echo Export goarch=amd64 >>. BASHRC

echo Export Goos=linux >>. BASHRC

echo Export Gopath=/home/gogs/goapp >>. BASHRC

echo Export path=.: $PATH: $GOBIN >>. BASHRC

Make the configuration environment immediately effective

SOURCE . BASHRC

Use the ENV command to check if the Golang is installed successfully

Go env

sudo mkdir repositories//Create a warehouse directory

CD Goapp

sudo wget http://gogs.dn.qbox.me/gogs_v0.5.11_linux_amd64.zip//Download Gogs

sudo apt-get install ZIP//installation Zip tool for extracting *.zip files

sudo unzip gogs_v0.5.11_linux_amd64.zip//unzip Gogs file

LS//view files and folders in the/home/gogs/goapp directory

CD Gogs//Enter unzip the created file Gogs

mkdir Custom

mkdir custom/conf//Create a custom profile directory

CD Custom/conf/app.ini//Create custom configuration file

sudo chmod-r 777 Custom//Modify Custom folder permissions

mkdir Log//Create logs Directory

sudo chmod-r 777 log//Modify log folder permissions


Start Gogs

Cd/home/gogs/goapp/gogs

./gogs Web

then visit http://localhost:3000 /install to complete the first run configuration work


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.