On some systems a compatible compiler is not available, this leads to problems for the standard OSSEC install method. To work around this OSSEC supports being built on one system and installed on another.
Due to the way OSSEC is built the system compiling OSSEC must be the same OS and CPU platform for this work correctly.
First download the OSSEC package corresponding to the version you want to install and unpack it (on the system with a compiler).
# wget http://www.ossec.net/files/ossec-hids-latest.tar.gz # tar -zxvf ossec-hids-latest.tar.gz # rm ossec-hids-latest.tar.gz
Enter in the source directory of the downloaded package and compile OSSEC.
# cd ossec-*/src # make setagent # make all # make build # cd ../..
Modify ossec-hids-*/etc/preloaded-vars.conf to set BINARY_INSTALL to yes.
# echo "USER_BINARYINSTALL=\"y\"" >> ossec-hids*/etc/preloaded-vars.conf
Finally create an OSSEC package.
# tar -cvzf ossec-binary.tgz ossec-hids*
On the target system (that does not have a C compiler) download your ossec-binary.tgz created in the setups above.
# cd /tmp # scp firstname.lastname@example.org:/tmp/ossec-binary.tgz .
Complete the installation by unarchiving the binary package and running ./install.sh.
# tar xfvz ossec-binary.tgz # cd ossec-* # ./install.sh
After following the installation prompts your install will be complete.