Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Installing Redmine AND GitLab on CentOS 6.2 (part 2)
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 --program-suffix n
make && make install
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 redis
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 --program-suffix n
make && make install
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 --program-suffix n
make && make install
# make sure you use gemn (the trailing n is important)
gemn update --system
gemn update
gemn install rails
adduser --shell /bin/bash --create-home --home-dir /home/gitlab gitlab
su gitlab
ssh-keygen -t rsa # as gitlab user
exit
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 # this passes the admin key to gitolite
usermod -a -G git gitlab
chmod -R g+rwX /home/git/repositories/
chmod g+r /home/git
passwd gitlab
su gitlab
ssh git@localhost
curl http://python-distribute.org/distribute_setup.py | python
easy_install pip
pip install pygments
gemn install bundler
visudo # add 'gitlab[tab]ALL=(ALL)[tab]ALL'
gemn install ruby-debug19
gemn install charlock_holmes
su gitlab
cd && git clone -b stable git://github.com/gitlabhq/gitlabhq.git
cd gitlabhq
bundle install
mysql -u root -p
-- write this into the mysql prompt
CREATE DATABASE gitlab CHARACTER SET UTF8;
GRANT ALL PRIVILEGES ON gitlab.* TO 'gitlab'@'localhost' IDENTIFIED BY 'git' WITH GRANT OPTION;
quit
sudo nohup redis-server > /dev/null & #wihtout sudo if running as gitlab user
cp ~/gitlabhq/config/database.yml.example ~/gitlabhq/config/database.yml
cp ~/gitlabhq/config/gitlab.yml.example ~/gitlabhq/config/gitlab.yml
RAILS_ENV=production raken db:setup
RAILS_ENV=production raken db:seed_fu
# as root
chmod 770 /home/git
# make sure redis is running
bundle exec rails s -e production -p 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment