Created
November 27, 2012 10:13
-
-
Save joker1007/4153463 to your computer and use it in GitHub Desktop.
CentOS 6.3で、シェルスクリプト一発でchefまでインストールする ref: http://qiita.com/items/16d2827519a152b514cd
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
# root executes this script | |
# Install Libraries for build | |
yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison wget unzip git | |
# Download Ruby | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
tar xvzf ruby-1.9.3-p327.tar.gz | |
# Create Install Directory | |
mkdir /opt/ruby | |
# Configure and Compile | |
cd ruby-1.9.3-p327 | |
./configure --prefix /opt/ruby | |
make | |
make install | |
cd | |
# Chef Install | |
/opt/ruby/bin/gem install chef | |
# Clone Cookbooks | |
git clone git://github.com/opscode/cookbooks.git chef-cookbooks | |
# Create Chef Directories | |
mkdir /etc/chef | |
mkdir /var/chef-solo | |
# Initial Setting | |
echo -e "file_cache_path \"/var/chef-solo\"\njson_attribs \"/etc/chef/node.json\"\ncookbook_path \"/root/chef-cookbooks\"" > /etc/chef/solo.rb | |
echo '{ "run_list": [] }' > /etc/chef/node.json | |
# Write run_list | |
# /opt/bin/chef-solo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment