gitlab安装

版权声明 本站原创文章 由 萌叔 发表 转载请注明 萌叔 | http://vearne.cc 安装gitlab社区版 参考资料: 非常重要 https://about.gitlab.com/downloads/#ubuntu1404 我是直接在ubuntu14.04上安装的 PS:官方文档是最有价值的,我来当下搬运工 1. 安装必要的包 sudo apt-get install curl openssh-server ca-certificates postfix 其中 postfix 是邮件发送程序 ca-certificates使用来对公钥进行验证的 2. 安装gitlab社区版 curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce 3. 安装启动gitlab sudo gitlab-ctl reconfigure 4. 访问gitlab主页 经过观察我发现gitlab默认会在机器上安装 1)Ruby 2)Redis 安装路径 /var/opt/gitlab/redis 默认监听在unix域套接字上(还好没暴露在公网上) /var/opt/gitlab/redis/redis.socket 3)PostgreSQL 4)Nginx 安装路径 /opt/gitlab/embedded/sbin/nginx 配置文件路径 /var/opt/gitlab/nginx/conf nginx作为反向代理,后面挂有用unicorn启动的ruby进程,提供web服务 默认nginx需要占用80端口,所以这有可能会与你原先配置的web服务造成冲突 upstream gitlab-workhorse { server unix:/var/opt/gitlab/gitlab-workhorse/socket; } server { listen *:8000; # 默认为listen *:80 server_name code.xxx.club; # ***必须修改*** 默认为主机名 } 这里必须修改server_name,代码库中的git project地址都依赖此值 ...

January 1, 2018 · 1 min