[Bitnami]Gitlab環境構建後的必會配置

gaearrow發表於2018-01-18

修改本機IP地址及DNS

//提升許可權
bitnami@debian:/$ sudo -i

//修改IP
# vi /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

address 192.168.x.x
netmask 255.255.255.0
gateway 192.168.1.1

//新增DNS
# cp  /etc/resolv.conf   /etc/resolv.confbak
# vi /etc/resolv.conf 
nameserver 8.8.8.8

//重啟網路
# /etc/init.d/networking restart

修改GitLab配置地址

bitnami@debian:/#find / -name gitlab.yml
/opt/gitlab/embedded/service/gitlab-tails/config/gitlab.yml
/var/opt/gitlab/gitlab-rails/etc/gitlab.yml

bitnami@debian:/#vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
...
## GitLab settings
gitlab:
  ## Web Server settings (note:...)
  host: 192.168.x.x  //如有域名此處填寫域名,如  mygitlab.com
  port: 443
  https: ture
...

//重啟才能生效
bitnami@debian:/#gitlab-ctl restart
ok: run: gitaly: (pid 12054) 1s
ok: run: gitlab-monitor: (pid 12066) 0s
...
ok: run: unicorn: (pid 12249) 1s

配置Gitlab域名

# vi  /etc/gitlab/gitlab.rb
...
external_url 'https://192.168.x.x'  //如有域名此處填寫域名,如 https://mygitlab.com
...
//重啟gitlab
# gitlab-ctl reconfigure

參考

https://www.cnblogs.com/kaneyang/p/7090923.html
https://segmentfault.com/q/1010000000689162
http://blog.csdn.net/real_myth/article/details/52033558
https://blog.csdn.net/vivasoft/article/details/53763031

相關文章