gogs mysql的安装部署_Gogs部署

1 go lang安装配置

3e8355d4971c?t=1486517187398

1.1  centos go lang install

yum install mercurial

安装 mercurial包

安装git包

yum install git

安装gcc

yum install gcc

cd /app

获取go 安装包

wget https://go.googlecode.com/files/go1.5.1.linux-amd64.tar.gz

tar xvf  go1.5.1.linux-amd64.tar.gz

vi /etc/profile

在profile里面添加如下内容

export GOROOT=/app/go

export PATH=$PATH:$GOROOT/bin

export GOPATH=$HOME/goTest

export GOBIN=$GOPATH/bin

go version

2 git 安装配置

2.1  centos git install

yum install curl

yum install curl-devel

yum install zlib-devel

yum install openssl-devel

yum install perl

yum install cpio

yum install expat-devel

yum install gettext-devel

yum install git

[root@svnserver go]# whereis git

git: /usr/bin/git /usr/share/man/man1/git.1.gz

[root@svnserver go]# git --version

git version 1.7.1

2.2  git version

3 mysql安装配置

3.1  rpm install  (请看mysql 官网资料)

3.2  远程数据库创建

DROP DATABASE IF EXISTS gogs;

CREATE DATABASE IF NOT EXISTS gogs CHARACTER SET utf8 COLLATE utf8_general_ci;

4 nginx 安装配置

4.1 环境配置

wget  nginx

tar xvf

./configure --prefix=/app/nginx

make && make install

[root@svnserver sbin]# ./nginx -V

nginx version: nginx/1.8.0

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

configure arguments: --prefix=/app/nginx

./nginx -s reload

4.2 wget 及编译安装

4.3 nginx.conf 配置

server {

listen      80;

server_name  localhost;

#charset koi8-r;

#access_log  logs/host.access.log  main;

#        location / {

#            root  html;

#            index  index.html index.htm;

#        }

location / {

proxy_pass http://127.0.0.1:3000;

}

5 gogs安装配置

5.1 部署路径参数规划

[root@svnserver gogs]# pwd

/app/gogs

[root@svnserver gogs]# ls

custom  data  gogs  LICENSE  log  public  README.md  README_ZH.md  repositories  scripts  templates

[root@svnserver gogs]#

[root@svnserver gogs]# pwd

/app/gogs

[root@svnserver gogs]# ls

custom  data  gogs  LICENSE  log  public  README.md  README_ZH.md  repositories  scripts  templates

[root@svnserver gogs]#

后台gogs守护进程使用

nohup ./gogs web &

5.2 安装配置

[root@svnserver conf]# vi app.ini

APP_NAME = Gogs: Go Git Service

RUN_USER = root

RUN_MODE = prod

[database]

DB_TYPE = mysql

HOST = 192.168.2.12:3306

NAME = gogs

USER = root

PASSWD = qazwsx

SSL_MODE = disable

PATH = data/gogs.db

[repository]

ROOT = /app/gogs/repositories

[server]

DOMAIN = 192.168.2.13

HTTP_PORT = 3000

ROOT_URL = http://192.168.2.13/

DISABLE_SSH = false

SSH_PORT = 22

OFFLINE_MODE = false

[mailer]

ENABLED = true

HOST = smtp.163.com:25

FROM = xxx@163.com

USER = xxx@163.com

PASSWD = ******

[service]

REGISTER_EMAIL_CONFIRM = true

ENABLE_NOTIFY_MAIL = true

DISABLE_REGISTRATION = false

ENABLE_CAPTCHA = true

REQUIRE_SIGNIN_VIEW = false

[picture]

DISABLE_GRAVATAR = false

[session]

PROVIDER = file

[log]

MODE = file

LEVEL = Info

[security]

INSTALL_LOCK = true

SECRET_KEY = LuKUtLjix5k4Dpq

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值