- 配置Gitlab使用外部数据库官方文档:https://docs.gitlab.com/omnibus/settings/database.html
- 配置外部数据库官方文档:https://docs.gitlab.com/ce/install/requirements.html#database
创建数据库账号信息
- 创建用户gitlab
create user gitlab with password '12345678'; - 创建数据库gitlabhq_production
create database gitlabhq_production OWNER gitlab; - 将gitlabhq_production库的所有权赋值给gitlab
GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production TO gitlab;
修改Gitlab配置信息
-
打开配置文件
vim /etc/gitlab/gitlab.rb -
禁用本地PostgreSQL
postgresql['enable'] = false
-
设置PostgreSQL数据库连接信息
gitlab_rails['db_database'] = "gitlabhq_production" gitlab_rails['d

本文档介绍了如何配置Gitlab使用外部的PostgreSQL数据库,包括创建数据库账号、修改Gitlab配置文件,以及详细步骤来禁用本地PostgreSQL并设置数据库连接信息。
最低0.47元/天 解锁文章
6885

被折叠的 条评论
为什么被折叠?



