五分钟学会centos配置gitlab
生活随笔
收集整理的這篇文章主要介紹了
五分钟学会centos配置gitlab
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
下載gitlab
親測: centos6.5? ?
安裝依賴包:
1: yum install curl policycoreutils policycoreutils-python openssh-server openssh-clients依賴包安裝完成之后:
1: systemctl enable sshd 2: systemctl start sshd 3: yum install postfix 4: systemctl enable postfix 5: systemctl start postfix 6: firewall-cmd --permanent --add-service=http 7: systemctl reload firewalld以上依賴安裝完之后,下載gitlab:
centos 6系統(tǒng)的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6 centos 7系統(tǒng)的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7下載相對應(yīng)系統(tǒng)的rpm包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.0-ce.0.el6.x86_64.rpm安裝rpm包
rpm -i gitlab-ce-8.0.0-ce.0.el6.x86_64.rpm安裝完成之后
vim /etc/gitlab/gitlab.rb修改gitlab配置文件,訪問IP:端口,? ?如果不修改默認(rèn)80端口,進(jìn)入文件之后,找到
external_url # 這個(gè)變量修改external_url變量
external_url 'http://ip:端口'修改完成之后退出并且保存
esc + wq保存之后需要更新一下修改
gitlab-ctl reconfigure重啟gitlab
gitlab-ctl restart # 重啟gitlab-ctl stop # 停止gitlab-ctl start # 啟動(dòng)gitlab-ctl status # 查看狀態(tài)訪問gitlab
輸入你在? ?/etc/gitlab/gitlab.rb文件里定義的
external_url后邊跟的ip就可以訪問配置成功之后就會出現(xiàn)這個(gè)頁面, 默認(rèn)賬號:root, 密碼;password, 如果不對的話,請自行修改。
修改gitlab管理員賬號密碼
gitlab-rails console production# 按下回車之后會出現(xiàn) Loading production environment (Rails 4.1.1)# 依次輸入 irb(main):001:0> user = User.where(id:1).first irb(main):002:0> user.password='66668888' # root密碼 irb(main):003:0> user.save!# 返回 true # 表示修改成功Ctrl+C 可以退出了到了這里之后,gitlab就配置完成了,接下來就可以使用了。以上所有方法,親測,全部有效。
?
?
# 修改gitlab IP地址 vim /etc/gitlab/gitlab.rbexternal_url 'ip地址'配置完成 重置命令: gitlab-ctl reconfigure重啟命令: gitlab-ctl restart?
轉(zhuǎn)載于:https://www.cnblogs.com/wuyongcong/p/9020658.html
總結(jié)
以上是生活随笔為你收集整理的五分钟学会centos配置gitlab的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sourcetree回退已推送的代码
- 下一篇: redis 入门教程