Ubuntu 14.04 安装Go Git Server

来源:互联网 发布:json在线格式化 php 编辑:程序博客网 时间:2024/06/14 23:28

Ubuntu 14.04 安装Go Git Server

项目源码地址:
https://github.com/gogits/gogs
安装参考文档:
https://gogs.io/docs/installation
https://gogs.io/docs/installation/install_from_binary.html

1. 安装mysql和git

sudo apt-get install git mysql-server mysql-client libmysqlclient-dev

过程中输入mysql账户root的密码,要记下

sudo netstat -tap | grep mysql

通过上述命令检查之后,如果看到有mysql 的socket处于 listen 状态则表示安装成功。

2. 创建Gogit需要的数据库

mysql -u root -p
然后执行
https://github.com/gogits/gogs/blob/master/scripts/mysql.sql
中的sql语句

sql语句

3. 下载最新的release版本

https://github.com/gogits/gogs/releases
解压后,cd 到解压目录,然后执行./gogs web
image

4. 首次需要配置数据库

打开浏览器,输入 http://localhost:3000/
image
图中红色标注的是之前安装数据库创建的密码

点下面安装后,跳转到登录

以上配置信息保存在以下文件中
./gogs/custom/conf/app.ini

0 0
原创粉丝点击