Posts

Showing posts from January, 2012

Nagios on ubuntu

Here’s the HTML version of the rewritten content: ```html In this Scenario We have two machines: one running Ubuntu Server 10.04, which will be used for Nagios monitoring, and another running Ubuntu 10.10, serving as a remote host to be monitored. Both machines have a minimal installation. On the Nagios Server Install Required Packages: root@nagios-ubuntu:~# apt-get -y install ssh php5-gd gcc make build-essential libgd2-xpm-dev libssl-dev Create a User for Nagios: root@nagios-ubuntu:~# useradd -m nagios root@nagios-ubuntu:~# passwd nagios When a new user is created, a group with the same name is typically assigned. However, it's good practice to create a dedicated Nagios group and add the Nagios user to both this group and the www-data (Apache2) group: root@nagios-ubuntu:~# groupadd nagios root@nagios-ubuntu:~# usermod -G nagios nagios root@nagios-ubuntu:...

Adding Virtual nic's to *nix

Sometimes, we need to add virtual NICs to our *nix machine. To do this, copy the eth0 configuration file from /etc/sysconfig/network-scripts/ : [root@test ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 Edit the ifcfg-eth0:1 file and remove the "HWADDR" line: [root@test ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0:1 After editing, the file should look like this: DEVICE=eth0:1 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.255.0 IPADDR=192.168.56.102 GATEWAY=192.168.56.1 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes You can then use the ifup command to bring the virtual NIC up: [root@test ~]# ifup eth0:1 In Debian and other Debian-based distributions: Open the interfaces configuration file: root@debian:~# vim /etc/network/interfaces The file will look like this: auto eth0 iface eth0 inet static address 192.168.56.101 netmask 255.255.255.0 Ad...