Difference between revisions of "Gitlab2"

From ArchWiki
Jump to: navigation, search
(Basic configuration: All of the configuration are straightforward. No need to explain.)
(Create redirect.)
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Version Control System]]
#REDIRECT [[Gitlab]]
{{Article summary start}}
{{Article summary text|This page gives guidelines for the installation and configuration of Gitlab on Archlinux.}}
{{Article summary heading|Related}}
{{Article summary wiki|Gitolite}}
{{Article summary wiki|Ruby on Rails}}
{{Article summary end}}
{{Merge|Gitlab|Most of the text are the same.}}
===Install gems===
This could take a while as it installs all required libraries.
# cd /home/gitlab/gitlab
# source /home/gitlab/.bash_profile
# sudo -u gitlab -H bundle install --deployment
{{Note|1= Using "--without development test" in bundle command line will ignore required packages for database backup and restore }}
Fix for {{ic|pygments.rb}} to work with our python2 ([https://bbs.archlinux.org/viewtopic.php?pid=1143763#p1143763 thanks to] [https://bbs.archlinux.org/profile.php?id=51753 billyburly]).
# sed -i "s/opts = {})/opts = {:python_exe => 'python'})/g" /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/pygments.rb-2cada028da50/lib/pygments/ffi.rb
# ln -s /usr/bin/python2 /usr/bin/python
===Start redis server===
Start the [[daemon]]. If you are using {{Pkg| initscripts}} you might want to add {{ic|redis}} to your {{ic|DAEMONS}} array in {{ic|rc.conf}}.
{{Note|redis might already be running, causing a FAIL message to appear. Check if it is already running with {{ic|rc.d list redis}}.}}
If you have switched to [[systemd]], there is a service file included in the official package. See [[daemon]] how to enable it.
===Populate the database===
# sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
===Setup gitlab hooks===
# cp ./lib/hooks/post-receive /home/gitlab-git/share/gitolite/hooks/common/post-receive
# chown gitlab-git:gitlab-git /home/gitlab-git/share/gitolite/hooks/common/post-receive
===Server testing and resque process===
[http://defunkt.io/resque/ Resque] is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later. For the backstory, philosophy, and history of Resque's beginnings, please see this [https://github.com/blog/542-introducing-resque blog post].
Run resque process for processing queue:
# sudo -u gitlab bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production BACKGROUND=yes
or use Gitlab's start script:
# sudo -u gitlab ./resque.sh
{{Note|If you run this as root, {{ic|/home/gitlab/gitlab/tmp/pids/resque_worker.pid}} will be owned by root causing the resque worker not to start via init script on next boot/service restart}}
Gitlab application can be started with the next command:
# sudo -u gitlab bundle exec rails s -e production
Open {{ic|localhost:3000}} with your favorite browser and you should see Gitlab's sign in page. In case you missed it, the default login/password are:
Since this is a thin web server, it is only for test purposes. You may close it with {{Keypress|Ctrl+c}}. Follow instructions below to make Gitlab run with a real web server.

Latest revision as of 10:40, 10 June 2013

Redirect to: