QuickStart
From Cfwiki
This article is by an anonymous author.
Recently, a Quickstart Guide was suggested. While it seemed to be generally agreed that the Wiki is not the greatest place for it, there were some suggestions that a draft could be completed on the Wiki, so I thought I'd give it a start. Another advantage is that developers and users could directly correct what they see with what worked for them, and thus spread the knowledge.
Please note that this is DRAFT documentation and should not be depended on.
Note also that this is just an outline; feel free to add some information, preferably linking heavily to already existing documentation. However, remember that if this is to be useful to someone offline, then all relevant information must be contained within this document to be available for printing.
Contents |
Refresh your Understanding
If you first installed cfengine, you will end up with the following standard directories:
| Directory | Description |
|---|---|
| /var/cfengine/ | This is the cfengine directory. |
| /var/cfengine/masterfiles | This is where the master files go into. The masterfiles are located on the server side, so where cfservd runs. |
| /var/cfengine/masterfiles/inputs | This is where the master configuration files go into. |
| /var/cfengine/inputs | The configuration which cfagent is going to use. |
| /var/cfengine/ppkeys | Security keys for root are placed in here. |
| ~/.ppkeys | Security keys for any other users are stored in their home directory. |
| /var/cfengine/bin | cfengine binaries. |
Note: On Debian the cfengine directory is below /var/lib/cfengine instead (as described above) in /var/cfengine.
Someone wanted a link to explain the directory and configuration layout. If we're talking about the client, then the Terse Guide is good, although its suggested master configuration differs from that used in cfengine-masterconf. The binaries are also documented in the Terse Guide.
Download cfengine and cfengine-masterconf
If you do not have a prebuilt package you can use, you'll have to build from the source files instead - unless you prefer to use source. There are packages for HP-UX, Solaris, Red Hat, Debian, Gentoo, and FreeBSD available.
You don't need both source files and prebuilt package files; pick one or the other. The sources for these files are as follows:
Source Files:
RPM:
- cfengine - if you have set up apt or yum with Dag Wieer's repository available, then use the appropriate tool command:
yum install cfengineorapt-get install cfengine - cfengine-masterconf
DEB:
- For Debian, just use apt-get to install cfengine2
Install cfengine and cfengine-masterconf
If you are using a pre-built package (such as RPM or DEB), follow the directions for installing packages on your system. To install an RPM:
rpm -Uvh cfengine.rpm cfengine-masterconf.rpm
To install cfengine on Debian run:
apt-get install cfengine2
If you are installing from source, use the standard process:
tar -xzvf filename cd created.directory ./configure make make install
Configure and Set Up cfengine-masterconf
At this point in the installation, you have a generic cfengine setup without any special configuration files. To ease the configuration process, you can use the cfengine-masterconf archive to build a decent master cfengine server configuration.
The directions on how to do this are located online here
Test things
(This needs to be written)
To Do
There were some other things that were requested too. Volunteers?
- Someone who actually knows something needs to verify that the package installation instructions given above are correct
- Someone needs to fill in how to test an existing cfengine setup
- A nice picture of all the binaries and their configuration files would be cool too.
- Someone suggested that this be a "Two-server Cfengine How-to: a succinct, step-by-step document explaining how to set up a two-machine cfengine setup from scratch, with complete configuration files. Explain why each step is done and give links to the detailed documentation".
- A howto specifically detailing Berkeley DB issues and static linking approaches (frequently asked, poorly documented!)
