Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 423 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
423
Dung lượng
3,33 MB
Nội dung
[...]... tar –zxvf nagios- 2.0rc1.tar.gz puppy# cd nagios- 2.0rc1 Before you install the Nagios server, you need to create a user and group to run Nagios as In Example 1-3, I show how to create them Example 1-3 Creating the Nagios User and Group puppy# groupadd nagios puppy# useradd -g nagios -M nagios The first command creates a group called nagios, and the second command creates a user also called nagios The... directory to install Nagios into /usr/local/ nagios with-htmluser=url The URL of the Nagios HTML files /nagios/ with-cgiurl=url The URL of the Nagios CGIs /nagios/ cgi-bin with -nagios- user=user The user the Nagios process will run as nagios with -nagios- group=group The group the Nagios process will run as nagios with-command-group=group Sets the group name for external commands None 11 6099_c01_final.qxd... Nagios Now that you have created the Nagios user and the required groups, you are ready to configure and compile Nagios Example 1-5 shows the configure command I am going to use Example 1-5 Nagios Server configure Statement puppy# /configure prefix=/usr/local /nagios with-htmlurl= /nagios/ ➥ with-cgiurl= /nagios/ cgi-bin with -nagios- user =nagios with -nagios- group =nagios with-command-group=ncmd As you... been tampered with In Example 1-2, I demonstrate downloading the Nagios server source package and confirming the checksum matches Example 1-2 Downloading and Verifying Nagios puppy# wget➥ http://easynews.dl.sourceforge.net/sourceforge /nagios/ nagios-2.0rc1.tar.gz puppy# md5sum nagios- 2.0rc1.tar.gz 051760458d961b6ee015b5932a8437c4 nagios- 2.0rc1.tar.gz Once you have downloaded and verified the checksum... running the process, in this case, the user apache For the Nagios server process, the default user should be the nagios user that I have just created In Example 1-4, I have created a command group and added the Nagios and web server process users to the group Example 1-4 Creating a Command Group puppy# groupadd ncmd puppy# usermod -G ncmd nagios puppy# usermod -G ncmd apache Compiling Nagios Now that... cause Nagios to fail to correctly compile The next options, with -nagios- user and with -nagios- group, allow you to specify the user and group that will run the Nagios server process Both options default to nagios I demonstrated creating a nagios user and group in Example 1-3 earlier in this section You can specify any user or group, but the user and group both need to exist ■ Caution Don’t run your Nagios. .. which contains other useful information about Nagios, before you go on to the “Installing via RPM” section ■ Note You will need to be logged on as root to install Nagios Installing from Source You can obtain the Nagios server source package from the Nagios website at www .nagios. org/ download/ At the time of this writing, the latest release of Nagios was version 2.0 and this book 6 At the time of this writing,... the Nagios Server After you have installed the required prerequisites, you can then install the Nagios server The Nagios server is available as a source package and as a Red Hat RPM.6 I will demonstrate how to install using both approaches As a general preference I strongly recommend installing the Nagios server from source This is principally because of the greater flexibility in configuring the Nagios. .. Also a consideration for your Nagios servers is backup and recovery You should include your Nagios server(s) in your normal backup regime and disaster recovery planning Installing the Nagios Software Now that we’ve briefly looked at positioning and selecting the right hardware and software for your Nagios installation, we can look at actually installing the Nagios software Nagios installations consist... configuration process requires you to specify a number of options Indeed, the six configure options used in Example 1-5 are critical to your Nagios configuration Table 1-2 lists these options and their descriptions and defaults Table 1-2 Nagios Critical configure Options Option Description Default prefix=directory Base directory to install Nagios into /usr/local/ nagios with-htmluser=url The URL of the Nagios .