Gogs服务搭建
Gos
Go语言开发的Git服务器https://gogs.io/
安装环境
- 本次安装使用Centos6
配置yum源,安装mariadb数据库
- 替换yum源路径
- 访问阿里镜像网站[http://mirrors.aliyun.com],找到centos,点击"帮助"
执行命令:
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
下载前可以先移除原有的repo文件。找到对应CentOS版本的repo文件下载。
下载完成后执行
- 1.清除所有yum缓存
yum clean all
- 2.安装Git
yum install git -y
- 3.查看可安装的mariadb数据库
yum list | grep mariadb
- 4.安装mariadb-server会自动安装mariadb
yum install mariadb-server
- 5.启动mariadb.service和添加mariadb.service的开机启动
systemctl start mariadb.service
systemctl enable mariadb.service
- 6.使用root用户登录查看数据库,并退出
mysql -u root
show databases;
exit;
-
7.配置数据库