Ali cloud service deployment gogs code management system

First, this project depends on the go, mysql is not installed Please install the environment, this project occupies 3000 port   aliyun set of rules open safety recall

Second, start the configuration

1, the new user git;

useradd git;

Review git Password: the passwd git; (password: a string of at least 8)

The entire project switching operation of the installation user git: sudo git; installation directory is / home / git

1、配置mysql
登录mysql:mysqld -u root -p
Gogs create a database: CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;
2, the installation configuration gogs
wget https: //dl.gogs.io/0.11.4/linux_amd64.tar.gz // download packages
tar -zxf linux_amd64.tar.gz; // unpack
cd gogs
 
mkdir data
mkdir  log
New custom- "conf-" app.ini file
mkdir custom
cd custom
mkdir conf
cd conf
vim app.ini
 

APP_NAME = Gogs- project management
RUN_USER = git
RUN_MODE = Prod

[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gogs
USER = root
PASSWD = *******
SSL_MODE = disable
PATH = data/gogs.db

[repository]
ROOT = /home/git/gogs-repositories

[Server]
DOMAIN = 119.23.239.189
HTTP_PORT = 3000
root_url = HTTP: // *****: 3000 / // your server address
DISABLE_SSH = false
SSH_PORT = 22
START_SSH_SERVER = false
OFFLINE_MODE = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = false
ENABLE_CAPTCHA = true
REQUIRE_SIGNIN_VIEW = false

[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false

[session]
PROVIDER = file

[log]
MODE = file
LEVEL = Info
ROOT_PATH = /home/git/gogs/log

[security]
INSTALL_LOCK = true
SECRET_KEY = Co4TFL8mKZ1Lwmo

 

: Wq save

3: a daemon running: nohup ./gogs web output 2> & 1 &
 
Test Access: ip: 3000
 
 

Guess you like

Origin www.cnblogs.com/jn1011/p/10981106.html