Installing Foreman on CentOS 6
by actionjack on June 6, 2012 | Leave your comment
Currently the easiest way to install foreman is by using the foreman-installer which is basically a set of pre-packaged puppet modules
cd /tmp
git clone --recursive git://github.com/theforeman/foreman-installer.git
echo include foreman, foreman_proxy | puppet apply --modulepath /tmp/foreman-installer
chkconfig mysqld on
service mysqld start
/usr/bin/mysql_secure_installation
Create a my.cnf for auto logon of mysql:
And enter the following content:
user = root
password = password
Lock down the access to the file:
Create the foreman development and live databases:
mysql -e "create user 'superforeman'@'localhost' identified by 'mysupersecretpassword';"
mysql -e "grant all privileges on foreman.* to 'superforeman'@'localhost';"
mysql -e "create database foreman_development character set utf8;"
mysql -e "grant all privileges on foreman_development.* to 'superforeman'@'localhost';"
Configure foreman to use the mysql database:
adapter: mysql
database: foreman_development
host: localhost
username: superforeman
password: mysupersecretpassword
encoding: utf8
test:
adapter: mysql
database: foreman_test
host: localhost
username: superforeman
password: mysupersecretpassword
encoding: utf8
production:
adapter: mysql
database: foreman
host: localhost
username: superforeman
password: mysupersecretpassword
encoding: utf8
Replace the existing yum repo with an updated one to get the latest RPM’s:
Run yum update to update foreman:
Install mysql and foreman support components:
And voila
Leave your comment