官术网_书友最值得收藏!

There's more…

Congratulations! You just installed, configured, and started OSSEC to protect your server. An excellent first step in the mastery of OSSEC! You might also be thinking that there is a lot of work to run this setup process on each server, and you're right. It's not always desirable or possible to perform source installs on every server in your network. Luckily for us, there's a speedier way!

Binary installations

On most production systems, a C compiler may not available. Don't worry, it is still possible to deploy it on these systems without requiring administrators to install hefty development packages.

OSSEC provides a binary installer for Windows on the Downloads page (http://www.ossec.net/?page_id=19) of the site. This is an agent-only binary, so you will still require a Linux/BSD server to manage any Windows agents.

For Linux systems, there are two major package managers, RPM and APT. Distributions based on Red Hat use a binary package called an RPM. Atomicorp provides a handy installer for their nicely packaged OSSEC RPMs, which you can install using the following command on your Red Hat server:

$ wget -q -O - https://www.atomicorp.com/installers/atomic |sudo sh

After that, you'll be able to install the OSSEC server or agent through yum:

$ sudo yum install ossec-hids-server

Or for a client install, use the following command:

$ sudo yum install ossec-hids-client

If you intend to install it on a Debian-based Linux distribution, Nicolas Zin has packaged OSSEC for Ubuntu. His work is available at the following link:

https://launchpad.net/~nicolas-zin/+archive/ossec-ubuntu

Follow his instructions to enable the source in APT. Install OSSEC server by running the following command:

$ sudo apt-get install ossec-hids-server

Or for a client install, use the following command:

$ sudo apt-get install ossec-hids-agent

Integrating the deployment of OSSEC into your organization's configuration management solution is much easier with binary packaging. Servers receiving a binary package do not require a C compiler to be installed. This often fits within the organization's requirements to remove unnecessary software from its infrastructure.

Starting OSSEC at boot

Even though OSSEC may already be running, we need to make sure that we configure our installation to start during the operating system's boot sequence. This step varies depending on the operating system you're running. The easiest way to start OSSEC on Linux/BSD is to add the /var/ossec/bin/ossec-control start command to the /etc/rc.d/rc.local file, which is executed at boot.

If you've chosen the binary package install, chances are that the package provides an initialization script for your operating system. Most modern systems use an initialization script usually installed as /etc/init.d/ossec-hids, and the following commands will enable it:

  • Red Hat-based: /sbin/chkconfig ossec-hids on
  • Debian-based: /sbin/update-rc.d ossec-hids defaults

The Microsoft Windows binary installer configures OSSEC to run at startup, so no additional steps are necessary.

主站蜘蛛池模板: 玉山县| 富宁县| 双辽市| 沈丘县| 新闻| 常德市| 如东县| 玛沁县| 泰宁县| 西藏| 罗甸县| 广水市| 子长县| 尤溪县| 德州市| 福贡县| 三门峡市| 安多县| 亚东县| 鹤庆县| 冀州市| 长治县| 行唐县| 茌平县| 常州市| 宁海县| 松江区| 衡阳市| 九龙县| 合作市| 郑州市| 三门县| 格尔木市| 美姑县| 蒙城县| 遂川县| 德清县| 临洮县| 浮梁县| 西青区| 宜宾县|