注:是否配置https、相对路径/gitlab根据实际情况
1、gitlab.yml
cd /home/git/gitlabvim config/gitlab.yml
编辑如下:
第32行
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host:domain
port: 443
https: ture
第47行
relative_url_root: /gitlab
2、unicorn.rb
cd /home/git/gitlab
执行如下命令查看CPU内核数
nproc
vim config/unicorn.rb
修改如下:
ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
worker_processes 4
3、resque.yml
cd /home/git/gitlab
vim config/resque.yml
修改如下:
production:
# Redis (single instance)
url: redis://:pass@host:6379/db
4、database.yml
cd /home/git/gitlab
vim config/database.yml
修改如下:
production:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
reconnect: false
database: db
pool: 10
username: un
password: "pass"
host: host
port: 3306
socket: /var/lib/mysql/mysql.sock
5、config.yml
vim /home/git/gitlab-shell/config.yml
修改如下:
user: git
gitlab_url: http://localhost:8080/gitlab/
http_settings:
self_signed_cert: false
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
bin: "/bin/redis-cli"
namespace: resque