Created
June 26, 2012 12:25
-
-
Save dlaxar/2995541 to your computer and use it in GitHub Desktop.
Installing Redmine AND GitLab on CentOS 6.2 (part 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you use gemn (the trailing n is important) | |
gemn update --system | |
gemn update | |
gemn install rails | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su gitlab | |
cd && git clone -b stable git://github.com/gitlabhq/gitlabhq.git | |
cd gitlabhq | |
bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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