Skip to content

Instantly share code, notes, and snippets.

@premist
Created January 12, 2012 15:50
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save premist/1601228 to your computer and use it in GitHub Desktop.
Save premist/1601228 to your computer and use it in GitHub Desktop.
Installing GitLab on CentOS 6.2 (Part 1)
curl https://raw.github.com/gist/1588091/8b7b7a203074231f3dc75bdee48b3017078fb621/CentOS-Base.repo -o /etc/yum.repos.d/CentOS-Base.repo
curl https://raw.github.com/gist/1588091/2e5ab750cd0603dd7210ea7a999d15f9aadae711/epel.repo -o /etc/yum.repos.d/epel.repo
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
yum -y groupinstall 'Development Tools' 'Additional Development'
yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc gitolite sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --enable-shared --disable-pthread
make
make install
gem update --system
gem update
gem install rails
adduser --shell /bin/bash --create-home --home-dir /home/gitlab gitlab
su gitlab
ssh-keygen -t rsa
su
adduser --system --shell /bin/sh --comment 'gitolite' --create-home --home-dir /home/git git
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su git
gl-setup ~/gitlab.pub
usermod -a -G git gitlab
chmod -R g+rwX /home/git/repositories/
chmod g+r /home/git
Copy link

ghost commented Apr 14, 2012

For stage1.sh
'Development Libraries' group no longer in CentOS 6.2

I am using 'Additional Development' group.

@premist
Copy link
Author

premist commented Apr 14, 2012

leekiangiap,
Thanks for letting me know. Changed

Copy link

ghost commented Apr 14, 2012

Hi,

I am newbie learning linux. Wish to know why the stage2.sh command to run ./configure need to use --enable-shared and --enable-pthread ?

Thanks !

Copy link

ghost commented Apr 14, 2012

Just to share some findings

I study the ./configure --help
--enable-pthread is obsolete and ignored

The main advantage in using --enable-shared is that the executables can then share the code, thus decreasing memory and disk space requirements.

@premist
Copy link
Author

premist commented Apr 14, 2012

leekiangiap,
thanks for noticing. I just found --enable-pthread makes performance issue and I actually don't need to use it.

Copy link

ghost commented Apr 14, 2012

Hi,

Thanks for your kindness of providing this installation script.

Installing gitolite package from the EPEL by default created a user named "gitolite", do we still need to create the user named "git" ? what is the difference of having and not having it ?

@dlaxar
Copy link

dlaxar commented Jun 20, 2012

I've updated it a little bit and added a few missing things. It can be found at http://dlaxar.blogspot.co.at/2012/06/installing-gitlab-with-gitolite-on.html

@Aethelflaed
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment