Gitlab Community Edition 镜像使用帮助(https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/)
首先信任 GitLab 的 GPG 公钥:
root@localhost:/data/gitlab# curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add – &>/dev/null
root@localhost:/etc/apt/sources.list.d# vim gitlab-ce.list 添加以下内容: deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
root@localhost:/data/gitlab# sudo apt-get install gitlab-ce
root@localhost:/data/gitlab# sudo cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
root@localhost:/data/gitlab# sudo gitlab-ctl reconfigure
root@localhost:/etc/gitlab# vim gitlab.rb
external_url ‘http://gitlab.army16.com’
nginx[‘listen_addresses’] = [“0.0.0.0”, “[::]”]
nginx[‘listen_port’] = 8660
root@localhost:/etc/gitlab# vim /etc/hosts
root@localhost:/etc/gitlab# sudo gitlab-ctl reconfigure
安装Kanban
root@localhost:/data/kanban# apt-get install redis-server
root@localhost:/data/kanban# service redis-server start
chmod +x kanban_x86_64_linux
后台运行:
(/data/kanban/kanban_x86_64_linux server –enable-signup=”false” –server-listen=”0.0.0.0:8670″ –server-hostname=”http://kanban.army16.com” –gitlab-url=”http://gitlab.army16.com” –gitlab-client=”c7fb38922a417a37bdca52b26dee51e35149955b4d6a531d44391b7ea3d40051″ –gitlab-secret=”b93c6303cf049b0a195d7bec7058728b1315d18d067166095850a20f6271c7c1″ –redis-addr=”127.0.0.1:6379″ &)
gitlab安装完毕后,默认开机启动,如果不想占用内存
sudo gitlab-ctl start/stop