轉自:https://www.jianshu.com/p/79bfded68899css
文前說明html
做爲碼農中的一員,須要不斷的學習,我工做之餘將一些分析總結和學習筆記寫成博客與你們一塊兒交流,也但願採用這種方式記錄本身的學習之旅。nginx
本文僅供學習交流使用,侵權必刪。
不用於商業目的,轉載請註明出處。git
Centos 版本:Centos 7.3.10.0-514.el7.x86_64
GitLab 服務器版本:gitlab-ce-8.17.8-ce.0.el7.x86_64.rpm
Git 下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7redis
yum -y install policycoreutils openssh-server openssh-clients postfix
rpm -i gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm
vi /etc/gitlab/gitlab.rb
1 ## GitLab configuration settings 2 ##! This file is generated during initial installation and **is not** modified 3 ##! during upgrades. 4 ##! Check out the latest version of this file to know about the different 5 ##! settings that can be configured by this file, which may be found at: 6 ##! https://gitlab.com/gitlab-org/omnibus-gitlab/raw/master/files/gitlab-config-template/gitlab.rb.template 7 8 9 ## GitLab URL 10 ##! URL on which GitLab will be reachable. 11 ##! For more details on configuring external_url see: 12 ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab 13 external_url 'http://gitlab.develop.com:6666'
259 ### For setting up different data storing directory 260 ###! Docs: https://docs.gitlab.com/omnibus/settings/configuration.html#storing-git-data-in-an-alternative-directory 261 ###! **If you want to use a single non-default directory to store git data use a 262 ###! path that doesn't contain symlinks.** 263 # git_data_dirs({"default" => "/home/develop/data/gitlab-data"})
gitlab-ctl reconfigure
......
Recipe: gitlab::gitlab-rails * execute[clear the gitlab-rails cache] action run - execute /opt/gitlab/bin/gitlab-rake cache:clear Recipe: gitlab::unicorn * service[unicorn] action restart - restart service service[unicorn] Recipe: gitlab::sidekiq * service[sidekiq] action restart - restart service service[sidekiq] Recipe: gitlab::nginx * service[nginx] action restart - restart service service[nginx] Running handlers: Running handlers complete Chef Client finished, 12/319 resources updated in 24 seconds gitlab Reconfigured!
# gitlab-ctl restart ok: run: gitlab-workhorse: (pid 47282) 0s ok: run: logrotate: (pid 47289) 1s ok: run: nginx: (pid 47296) 0s ok: run: postgresql: (pid 47303) 0s ok: run: redis: (pid 47312) 1s ok: run: sidekiq: (pid 47317) 0s ok: run: unicorn: (pid 47322) 1s
經常使用 gitlab 命令 | 說明 |
---|---|
gitlab-ctl reconfigure | 重置配置信息 |
gitlab-ctl restart | 重啓 gitlab 服務 |
gitlab-ctl status | 查看 gitlab 狀態 |
gitlab-ctl stop | 中止 gitlab 服務 |
gitlab-ctl tail | 查看 gitlab 運行日誌 |
gitlab-ctl stop unicorn | 中止 unicorn 服務 |