centos7 gitlab搭建
1. 安裝依賴
[[email protected] ~]# yum -y install policycoreutils openssh-server openssh-clients postfix
[[email protected] ~]# yum -y install policycoreutils-python
2. 下載安裝
[[email protected] ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
[[email protected] ~]# rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
完成會有一個圖案
3. 修改配置檔案,埠號最好修改,防止衝突
[[email protected] ~]# vim /etc/gitlab/gitlab.rb
....
580 # unicorn['listen'] = '127.0.0.1'
581 unicorn['port'] = 8888
4. 初始化
gitlab-ctl reconfigure
5. 重啟
gitlab-ctl restart
6. 其他基本命令
#停止gitlab
gitlab-ctl stop
#解除安裝gitlab
rpm -e gitlab-ce
#檢視gitlab程序
ps aux | grep gitlab
#殺掉gitlab程序
kill -9 4473
#刪除gitlab檔案
find / -name gitlab|xargs rm -rf
7. 設定超級管理員賬戶
[[email protected] ~]# cd /opt/gitlab/bin/
[[email protected] bin]# gitlab-rails console production