Raspberry Pi and GitLab

我怕爱的太早我们不能终老 提交于 2019-12-02 19:12:46

Official way for the Pi 2

There is a very easy way to install it on the 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

You might prefer to go to the official page in order to get latest version. It's fast and easy, they recommend at least 1Gb swap.

On the Pi B and B+ you will hit the memory limit very soon and get degraded performance as you grow, but on the Pi 2 it works nicely, specially if you mount your repos on an external USB hard disk.

user3883624

It is possible to install GitLab on the Raspberry Pi. You will need the Raspberry pi model B reversion 2012 or model B+ (512mb of RAM). Installing GitLab takes a very long time.

Steps:

  1. Get a fresh copy of the latest Raspbian and expand the file system. Be sure to boot to text mode.

  2. Free-up space by typing: sudo apt-get purge xorg lxde xinit openbox lightdm && sudo apt-get autoremove && sudo apt-get clean

  3. Add some more swap space by typing: sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (this will take a minute or so)

  4. Activate the swap space by typing sudo mkswap /swapfile1 && sudo chmod 0600 /swapfile1 && sudo swapon /swapfile1

  5. Get an external hard drive and format it as ext4. (very important)

  6. Add the Git user: sudo adduser --disabled-login --gecos 'GitLab' git

  7. Delete everything in /home/git sudo rm -rf /home/git/* && sudo rm -rf /home/git/.*

  8. Add the following in /etc/fstab: (sudo editor /etc/fstab)

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

  9. Reboot: sudo reboot

  10. Follow the instructions here for the latest version of gitlab (currently 7.7): https://gitlab.com/gitlab-org/gitlab-ce/blob/7-7-stable/doc/install/installation.md

Notes: On step "Install Gems", when you type sudo -u git -H bundle install --deployment --without development test mysql aws, It will take several hours, especially while fetching the gem sources and installing "kgio". You can ignore all incompatibility messages during this process.

Another thing to note is that creating a project inside GitLab takes a very long time. Just return to the dashboard if it takes more than a minute.

Arthur

You can find GitLab requirements here. If you have Raspberry Pi model B (512MB of RAM), I think that you can run GitLab but you might encounter performance issue.

I'd suggest that you take a look here to find lighter systems.

I use Gitolite on a small server and it's pretty awesome. There is no web UI. Gitolite itself is just a git repo you push and pull changes to to control access

https://github.com/sitaramc/gitolite

On your expanded, up-to-date raspbian, edit the swap space config file:

sudo vi /etc/dphys-swapfile

Change CONF_SWAPSIZE from 100 to 1000

Follow the instructions for the latest GitLab, at the moment: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-14-stable/doc/install/installation.md

Happy gitting!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!