diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index 3e6c61017..0458df3fa 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -19,9 +19,6 @@ end execute "rvm deps" do command "yum install -y bzip2" end -execute "install mysql" do - command "yum install -y mysql mysql-server mysql-devel" -end def harden_ruby(ruby_string) Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| diff --git a/chef/cookbooks/centos/recipes/main.rb b/chef/cookbooks/centos/recipes/main.rb index f23ed9ac6..f5455876a 100644 --- a/chef/cookbooks/centos/recipes/main.rb +++ b/chef/cookbooks/centos/recipes/main.rb @@ -15,6 +15,7 @@ end harden_ruby("ree-1.8.7-2010.02") include_recipe "centos::image_magick" +include_recipe "centos::mysql" include_recipe "common::main" include_recipe "centos::nginx" include_recipe "centos::redis" diff --git a/chef/cookbooks/centos/recipes/mysql.rb b/chef/cookbooks/centos/recipes/mysql.rb new file mode 100644 index 000000000..184f4932e --- /dev/null +++ b/chef/cookbooks/centos/recipes/mysql.rb @@ -0,0 +1,11 @@ +execute "install mysql" do + command "yum install -y mysql mysql-server mysql-devel" +end + +execute "start mysql service to create the system tables" do + command "service mysqld start" +end + +execute "stop service again" do + command "service mysqld stop" +end