centos7 gitlab搭建


1. 安裝依賴

[root@localhost ~]# yum -y install policycoreutils openssh-server openssh-clients postfix

[root@localhost ~]# yum -y install policycoreutils-python


2.  下載安裝

[root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

[root@localhost ~]# rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

完成會有一個圖案


3. 修改配置文件,端口號最好修改,防止衝突

[root@localhost ~]# 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. 設置超級管理員賬戶

[root@localhost ~]# cd /opt/gitlab/bin/

[root@localhost bin]# gitlab-rails console production




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章