一、此项目依赖于go、mysql 未安装该环境 请先安装,此项目占用 3000端口 阿里云安全组规则记得开启
二、开始配置
1、新建git用户;
useradd git;
修改git密码:passwd git;(密码:长度至少为8个字符串)
整个项目切换为git用户进行安装操作:sudo git;安装目录为 /home/git
1、配置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 = 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/ //自己的服务器地址
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 保存