Samhain | ||
---|---|---|
<<< Previous | Deployment to remote hosts | Next >>> |
Samhain provides an easy method to create custom binary packages with the native package manager of your operating system. Basically, this works like:
bash$./configure [your preferred options] bash$make rpm|deb|tbz2|solaris-pkg |
I.e. the binary package will be built with the compile options chosen in the preceding ./configure command. Supported package formats are: rpm (e.g. Redhat, SuSE, ...), deb (Debian), tbz2 (Gentoo Linux), and solaris-pkg (Solaris).
![]() | TIP |
---|---|
The binary package will use the OS-specific samhainrc.OS configuration file from the source directory, thus if you customize this, your package will contain your customized version. |
![]() | TIP |
---|---|
Upon installation, the package will not automatically initialize the baseline database, and not start the daemon (though it will install the runlevel script to start upon boot). |
![]() | NOTE |
---|---|
For reasons explained in the Section called Integrity of the executable in the chapter called Security Design>, we do not recommend to distribute binary packages to third parties. On the other hand, it is perfectly ok to use a self-built binary package to install/distribute samhain on your machine/within your own network. |
If you run ./configure in the source directory, a spec file samhain.spec will be created from samhain.spec.in. You can then use make rpm to create source and binary RPMs, or make srpm to create just the source RPM.
The RPM will be located in /usr/src/(distribution-specific)/RPMS/i386. Installing the RPM will not initialize the database automatically.
If anything fails during the build (and after installation has begun), just cd into the build directory and do a make uninstall && make uninstall-boot. If building for a non-RedHat system, the error messages will tell you which file paths in the spec file were incorrect.
If you want to create an RPM for a single-host version of samhain without any fancy options, you can just run
bash$ rpmbuild -ta samhain-version.tar.gz |
on the tarball (there is a default spec file in there).
The RPM will be located in /usr/src/(distribution-specific)/RPMS/i386. Installing the RPM will not initialize the database automatically.
![]() | NOTE |
---|---|
This is experimental and not well tested. Constructive feedback from experienced Solaris administrators is welcome. |
First run ./configure in the source directory with your preferred options, then do a make solaris-pkg. The result should be a package named samhain.pkg.
First run ./configure [your preferred options] in the source directory (reminder: use ./configure --prefix=USR, NOT ./configure --prefix=/usr for standard paths), then do a make tbz2. The .tbz2 package will be in /usr/portage/packages/All (this is just how Gentoo package building works).
The Gentoo package thus created will not initialize the database automatically upon installation. The .tbz2 package file will be in /usr/portage/packages/All (this is just how Gentoo package building works).
![]() | NOTE |
---|---|
If you just want to install on your own system, rather than building a package for other machines, you can use the command make emerge (after running ./configure, of course). |
First run ./configure in the source directory (reminder: use ./configure --prefix=USR, NOT ./configure --prefix=/usr for standard paths), then do a make deb. The .deb package and the corresponding .dsc file will be in the directory above the source directory (this is just how Debian package building works).
You will need the following additional Debian packages in order to build a Debian packages: apt-get fakeroot, apt-get debmake, apt-get debhelper, apt-get devscripts, and apt-get cpio.
The Debian package thus created will not initialize the database automatically upon installation. It will be located in the parent directory of the source directory (that's just the way the Debian build system works).
<<< Previous | Home | Next >>> |
Deployment to remote hosts | Up | Security Design |