Skip to content

Instantly share code, notes, and snippets.

@bugcy013
Created November 12, 2012 11:18
Show Gist options
  • Save bugcy013/4058781 to your computer and use it in GitHub Desktop.
Save bugcy013/4058781 to your computer and use it in GitHub Desktop.
cfengine_setup
cf-engine Configuration
[1] Dowunload cf-engine source code
wget http://cfengine.com/source-code/download?file=cfengine-3.3.7.tar.gz
[2] Compile the source code
Debian/Ubuntu:
apt-get install libtokyocabinet-dev libpcre3-dev libssl-dev -y
CentOS/RedHat:
yum install tokyocabinet-devel pcre openssl -y
tar -xzvf cfengine-3.3.7.tar.gz
cd cfengine-3.3.7
./configure && make && make install
[3] Public key generation
/var/cfengine/bin/cf-key
[4] Verify the syntax by running cf-promises – if verification is successful, you will see no output:
root@cf-engine_server # cf-promises -f /var/cfengine/inputs/test.cf
[5] Apply changes to cf-engine server locally
root@cf-engine_server#cf-agent -f /var/cfengine/inputs/test.cf
R: Hello world!
[6] cp /var/cfengine/share/CoreBase/*.cf /var/cfengine/masterfiles/
[7] Connecting Server to client
root@cf-engine_server#/var/cfengine/bin/cf-agent --bootstrap --policy-server 192.168.70.39
-> Bootstrap to 172.16.100.134 completed successfully
root@cfhost#/var/cfengine/bin/cf-agent --bootstrap --policy-server 192.168.70.39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment