好吧,我已经运行了一个运行Ubuntu的Amazon EC2服务器,然后按照下面的说明安装GitLab;
http://doc.gitlab.com/ce/install/installation.html
我无法完成的唯一步骤是对状态进行以下检查;
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
我得到以下错误;
rake aborted! Errno::ENOMEM: Cannot allocate memory - whoami
我认为这是因为我的EC2只是运行一个免费的层级设置,所以不是那么好的spec'd。
无论如何,我一直试图通过我的浏览器访问。 我已经build立了弹性IP,并指出我的领域(为了这个目的,可以说它的git.mydom.co.uk)。 在这个领域做一个whois显示我指向正确的地方。
由于某种原因,我得到了“糟糕,Chrome无法连接到git.mydom.co.uk”。 现在 – 一段时间,我得到了Nginx的持有页面(告诉我,我仍然需要执行configuration)。 从/ etc / nginx / sites-enabled /中删除默认文件后,这个消息就消失了。 从那以后,我什么也没有,即使当我从/ sites-available链接文件。 我已经尝试改变的git.mydom.co.uk文件的所有者坐在里面/网站启用和/网站可用www数据, 这里build议,但我只能改变文件的权限在/网站 – 可用,而不是在/ site-enabled中的符号链接。 这个文件的内容如下:
upstream gitlab { server unix:/home/git/gitlab/tmp/sockets/gitlab.socket; } server { listen *:80 default_server; # eg, listen 192.168.1.1:80; In most cases *:80 is a good idea server_name git.mydom.co.uk; # eg, server_name source.example.com; server_tokens off; # don't show the version number, a security best practice root /home/git/gitlab/public; # Increase this if you want to upload large attachments # Or if you want to accept large git objects over http client_max_body_size 20m; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; error_log /var/log/nginx/gitlab_error.log; location / { # serve static files from defined root folder;. # @gitlab is a named location for the upstream fallback, see below try_files $uri $uri/index.html $uri.html @gitlab; }
所有在这里提到的path看起来都OK …我现在正在对我的知识结束!
更新#1
在交换了一些内存的build议后,我现在已经设法得到..
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
…加工。 这虽然带来了以下错误与gitlabshell。
gitlab-shell self-check failed Try fixing it: Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u git -H editor /home/git/gitlab-shell/config.yml Please fix the error above and rerun the check)
这一些研究后,我觉得回到我的域没有正确configuration。 我已经从启用了网站的默认符号链接(所以没有与default_server标记冲突),我已经改变了git.mydom.co.uk文件中的根path指向一个简单的目录path包含一个索引文件,仍然无法通过我的浏览器得到它。 有什么只是我失踪?
它看起来像是在安装过程中遗漏了一些东西,因为检查返回了一个没有足够内存的错误。
GitLab Ubuntu要求状态:
512MB是绝对的最低限度,但我们不build议这样的内存量,你需要configuration一个256MB的最小交换,你的内存将只允许你运行一个慢麒麟工人,事情将只有情况下git ssh访问因为git http访问需要两个正在运行的worker(一个接收用户请求,一个接受授权检查)
由于亚马逊EC2免费层实例只有大约600MB的内存,您将需要configuration交换。 您可以按照以下说明在您的计算机上configuration交换空间: https : //www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04
我遇到了同样的问题。 将我的Gitlab域添加到/etc/hosts并将其指向127.0.0.1解决了我。