Gitlab

9-10 1,065 views

安装指导
手动安装指导
配置

Install gitlab on centos 6.8

1. Install and configure the necessary dependencies

On CentOS, the commands below will also open HTTP and SSH access in the system firewall.

yum update
yum install -y curl openssh-server openssh-clients cronie
lokkit -s http -s ssh

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

yum install postfix
service postfix start
chkconfig postfix on

During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

修改80端口

cd /var/opt/gitlab/nginx/conf
vim gitlab-http.conf

---- site configuration(截取一部分) ----
upstream gitlab-workhorse {
  server unix:/var/opt/gitlab/gitlab-workhorse/socket;
}

server {
  listen *:80; --修改端口

  server_name localhost;
  server_tokens off; ## Don't show the nginx version number, a security best practice

启动

gitlab-ctl start

停止

gitlab-ctl stop

重启

gitlab-ctl restart

502 Error

# gitlab-ctl stop

# vi /etc/gitlab/gitlab.rb   (change only these lines, uncomment if required)
unicorn['port'] = 8081
gitlab_git_http_server['auth_backend'] = "http://localhost:8081"

# gitlab-ctl reconfigure  (to apply the changes)
# gitlab-ctl restart
# lsof -i:8081        (check whether unicorn has started properly)

备份

https://segmentfault.com/a/1190000002439923
https://segmentfault.com/a/1190000011080992
https://docs.gitlab.com/ce/raketasks/backup_restore.html

迁移

https://segmentfault.com/a/1190000002439923

Ubuntu 更新源

Ubuntu 16.04 LTS国内快速更新源 sudo vi /etc/apt/sources.list deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb ...

阅读全文

SSH NAT 端口映射

使用ssh命令建立正向端口映射 ssh -C -f -N -g -L 188:aliyuncs.com:88 root@tiaobanji.com 引用http://blog.creke.net/722.html SSH隧道与端口转发及内网...

阅读全文

CentOS 7 安装 Nginx,MySQL,PHP

第一步 – 安装Nginx 为了向我们的网站访问者显示网页,我们将使用 Nginx,一种现代化的高效网页服务器。 要添加CentOS 7 EPEL存储库,请打开终端并使用以下...

阅读全文

欢迎留言