How to compile ossec on Windows?

It is not the first time I was asked that, so I decided to write it in here in case anyone else is interested. First of all, ossec is compiled using MinGW, so we have only used it with gcc. We do not support any other compiler, but feel free to use them if you want.

With that being said, you now need the windows specific files. Go to your ossec source code (on Unix) and execute the “” script. It will create all the necessary files for the Windows installation inside src/win-pkg.

    $ pwd /tmp/ossec-hids-1.1/src/win32/ $ ./ .. $ cd ../win-pkg $ zip win-pkg

After that, copy the “win-pkg” directory to your Windows system and execute the “make.bat” script on it.

    C:>cd win-pkg C:win-pkg>make ..

If your MinGW installation is not a C:MinGW, you will need to set the right paths on the make script. When you are done with your changes, you can generate the install.exe by compiling ossec-installer.nsi with NSIS.

This entry was posted in ossec, windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>