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




猜你喜欢

转载自blog.51cto.com/calabash/2319006