Created
June 21, 2013 11:57
-
-
Save ysaotome/5830732 to your computer and use it in GitHub Desktop.
CentOS 6.4 x86_64 にserverspecセットアップするスクリプトー
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
#!/bin/bash | |
# File:serverspec_install_with_centos64_x86_64.sh | |
# 2013/06/21 @ysaotome | |
## セットアップに必要なライブラリのインストール | |
/usr/bin/yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison | |
## rbenvセットアップ | |
/usr/bin/git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
/bin/mkdir /usr/local/rbenv/{shims,versions} | |
/usr/sbin/groupadd rbenv | |
/bin/chgrp -R rbenv /usr/local/rbenv | |
/bin/chmod -R g+rwxXs /usr/local/rbenv | |
/bin/cat << _RBENVCONF_ > /etc/profile.d/rbenv.sh | |
export RBENV_ROOT=/usr/local/rbenv | |
export PATH=\${PATH}:\${RBENV_ROOT}/bin | |
eval "\$(/usr/local/rbenv/bin/rbenv init -)" | |
_RBENVCONF_ | |
/bin/sh /etc/profile.d/rbenv.sh | |
## ruby-buildセットアップ | |
/usr/bin/git clone git://github.com/sstephenson/ruby-build.git /usr/local/ruby-build | |
cd /usr/local/ruby-build/ && ./install.sh | |
## rubyセットアップ | |
/usr/local/rbenv/bin/rbenv install 1.9.3-p429 | |
/usr/local/rbenv/bin/rbenv global 1.9.3-p429 | |
/usr/local/rbenv/bin/rbenv rehash | |
## serverspecセットアップ | |
## RSpec tests for checking your servers : http://serverspec.org/ | |
/usr/local/rbenv/shims/gem install serverspec --no-ri --no-rdoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment