Ubuntu 12.04 Puppet Master使用MySQL作为后端数据库

1.安装mysql数据库

# apt-get install mysql-server

2.创建数据

sudo mysql -uroot -p
mysql> CREATE DATABASE puppet CHARACTER SET utf8;

mysql > CREATE USER 'puppet'@'localhost'IDENTIFIED BY '123123';

mysql > GRANT ALL PRIVILEGES ON puppet.* TO 'puppet'@'localhost';

mysql> flush privileges;

3.在puppet.conf写入
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = 123123
dbserver = localhost

4.下载 gem mysql
gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
相关链接:http://projects.puppetlabs.com/projects/1/wiki/using_stored_configuration

相关推荐