1、此項目依賴於go、mysql 未安裝該環境 請先安裝,此項目佔用 3000端口 阿里雲安全組規則記得開啓mysql
2、開始配置linux
一、新建git用戶;git
useradd git;web
修改git密碼:passwd git;(密碼:長度至少爲8個字符串)sql
整個項目切換爲git用戶進行安裝操做:sudo git;安裝目錄爲 /home/git數據庫
一、配置mysql
登陸mysql:mysqld -u root -p
wget
https:
//dl.gogs.io/0.11.4/linux_amd64.tar.gz
//下載軟件包
APP_NAME = Gogs-項目管理
RUN_USER = git
RUN_MODE = prodvim
[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/ //本身的服務器地址
DISABLE_SSH = false
SSH_PORT = 22
START_SSH_SERVER = false
OFFLINE_MODE = falsesession
[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 保存