centos7 gitlab搭建


1. 安装依赖python

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

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


2.  下载安装ssh

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

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

完成会有一个图案post


3. 修改配置文件,端口号最好修改,防止冲突spa

[root@localhost ~]# vim /etc/gitlab/gitlab.rbrest

....server

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

相关文章
相关标签/搜索