hhking / hhking.github.io

博客
https://blog.hhking.cn/
3 stars 0 forks source link

阿里云 GitLab 折腾笔记 | HK Talk #36

Open hhking opened 5 years ago

hhking commented 5 years ago

https://blog.hhking.cn/2018/11/24/aliyun-gitlab-install/

想自己搭建一个 git 服务来玩一玩,正好有个阿里云,虽然配置很渣,但是也想着随便搞一搞。于是从官方教程开始,遇到一些坑,查看一些资料,解决一些问题,有了下面的笔记。

cheniot commented 5 years ago

大佬,我根据你的教程安装GitLab时,还踩到了其它坑,在此记录下:
问题
用域名访问刚安装好的GitLab时,出现502错误,我依照你的博客解决了内存不足的问题,但依然出现502错误。
排查和解决
1,输入几次gitlab-ctl status,发现unicorn的pid一直在变化,推断GitLab的unicorn应该有问题。
2,使用gitlab-ctl tail unicorn来跟踪unicorn的状态,悲催的发现原来8080端口被占用了(unicorn的默认端口是8080,而我在该台服务器上启了一个Tomcat的端口也是8080,所以冲突了)。
3,接着在/etc/gitlab/gitlab.rb 中做出如下修改(把8080换成空闲的端口即可):
unicorn['port'] = 9090
4,再使用gitlab-ctl reconfigure命令重启GitLab配置,这样GitLab服务器就可以正常运行了

hhking commented 5 years ago

@cheniot 大佬,我根据你的教程安装GitLab时,还踩到了其它坑,在此记录下:
问题
用域名访问刚安装好的GitLab时,出现502错误,我依照你的博客解决了内存不足的问题,但依然出现502错误。
排查和解决
1,输入几次gitlab-ctl status,发现unicorn的pid一直在变化,推断GitLab的unicorn应该有问题。
2,使用gitlab-ctl tail unicorn来跟踪unicorn的状态,悲催的发现原来8080端口被占用了(unicorn的默认端口是8080,而我在该台服务器上启了一个Tomcat的端口也是8080,所以冲突了)。
3,接着在/etc/gitlab/gitlab.rb 中做出如下修改(把8080换成空闲的端口即可):
unicorn['port'] = 9090
4,再使用gitlab-ctl reconfigure命令重启GitLab配置,这样GitLab服务器就可以正常运行了

👍👍👍

WeiGrand commented 4 years ago

安装完发现内存不够,原来是要用虚拟内存,感谢大佬指导