Raspberry Pi和GitLab

Jam*_*g56 18 git raspberry-pi gitlab raspbian

有没有办法在运行Raspbian的Raspberry Pi设备上运行GitLab(http://gitlab.org/gitlab-ce)和GitLab CI(http://gitlab.org/gitlab-ci)?

我想拥有自己的内部Git框,我可以在其中存储代码,并可能允许其他朋友访问上传他们的代码.可能吗?

谢谢.

Ari*_* M. 15

Pi 2的官方方式

有一种非常简单的方法可以在Raspberry Pi 2上安装它.

wget https://s3-eu-west-1.amazonaws.com/downloads-packages/raspberry-pi/gitlab_7.9.0-omnibus.pi-1_armhf.deb
sudo dpkg -i gitlab_7.9.0-omnibus.pi-1_armhf.deb
Run Code Online (Sandbox Code Playgroud)

您可能更愿意访问官方页面以获取最新版本.它快速而简单,他们建议至少1Gb交换.

在Pi B和B +上你会很快达到内存限制并且随着你的成长而降低性能,但在Pi 2上它可以很好地工作,特别是如果你将你的存储库安装在外部USB硬盘上.


use*_*624 7

可以在Raspberry Pi上安装GitLab.你将需要Raspberry pi模型B reversion 2012或模型B +(512mb RAM).安装GitLab需要很长时间.

脚步:

  1. 获取最新Raspbian的新副本并扩展文件系统.一定要启动到文本模式.

  2. 通过输入以下的空闲空间: sudo apt-get purge xorg lxde xinit openbox lightdm && sudo apt-get autoremove && sudo apt-get clean

  3. 输入以下内容添加更多交换空间:( sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=524288这将花费一分钟左右)

  4. 键入以激活交换空间 sudo mkswap /swapfile1 && sudo chmod 0600 /swapfile1 && sudo swapon /swapfile1

  5. 获取外部硬盘并将其格式化为ext4.(很重要)

  6. 添加Git用户: sudo adduser --disabled-login --gecos 'GitLab' git

  7. 删除/ home/git中的所有内容 sudo rm -rf /home/git/* && sudo rm -rf /home/git/.*

  8. 在/ etc/fstab中添加以下内容:( sudo editor /etc/fstab)

    /swapfile1 none swap defaults 0 0 /dev/sda1 /home/git ext4 defaults 0 0

  9. 重启: sudo reboot

  10. 按照此处的说明获取最新版本的gitlab(目前为7.7):https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/doc/install/installation.md

注意:在"安装宝石"步骤中,当您键入时sudo -u git -H bundle install --deployment --without development test mysql aws,将需要几个小时,尤其是在获取宝石源并安装"kgio"时.您可以在此过程中忽略所有不兼容的消息.

另外需要注意的是,在GitLab中创建项目需要很长时间.如果需要超过一分钟,请返回仪表板.