今天,主要是将puppet的配置文件自动导入mysql数据库。花了大部分的时间在mysql的root密码初始化上面,表示悲剧。关于mysql的问题,可以看:http://blog.csdn.net/laiwenqiang/article/details/12833937。然后安装ruby-mysql和rails。
# yum install ruby-mysql
# gem install rails -v 2.3.5
按照某本书上说的,我就安装了2.3.5版本,好久以前的版本了吧。检查gem list:
# gem list
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
atomic (1.1.14)
daemon_controller (1.1.5)
i18n (0.6.5)
json (1.5.5)
minitest (4.7.5)
multi_json (1.8.2)
passenger (4.0.20)
rack (1.5.2, 1.0.1)
rails (2.3.5)
rake (10.1.0)
thread_safe (0.1.3)
tzinfo (0.3.38)
随后,新建mysql的puppet数据库和puppet用户,密码也是puppet:
# mysql -u root -p
# create database puppet;
# grant all privileges on puppet.* to puppet@localhost identified by 'puppt';
下一步,配置puppet.conf文件。
# vim /etc/puppet/puppet.conf
[master]
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = puppet
dbserver = localhost
开启服务器和客户端后,发现数据库里已经添加了成堆的内容。。。。。。。