$tar -zxvfnagios-plugins-1.4.16.tar.gz
$ cd nagios-plugins-1.4.16/
nagios@ubuntu:~/nagios-plugins-1.4.16$ sudo./configure --prefix=/usr/local/nagios --with-nagios-user=nagios--with-nagios-group=nagios
[sudo] password for nagios:
checking for a BSD-compatible install.../usr/bin/install -c
checking whether build environment is sane...yes
checking for a thread-safe mkdir -p.../bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type...x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in`/home/nagios/nagios-plugins-1.4.16':
configure: error: no acceptable C compilerfound in $PATH
See `config.log' for more details
nagios@ubuntu:~/nagios-plugins-1.4.16$
发现没有安装gcc、cc、cl.exe。由于服务器都没有连到internet,因此,我先通过一台能连internet的虚拟机,使用apt-get命令安装这些deb包,并将get到的安装文件进行备份。
这些安装包将来可传到未联网的cdn服务器进行安装。 1.1.1Deb包的获取
1,apt-get源错误问题的解决:
在虚拟机上安装gcc时,报错:
$ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc
nagios@ubuntu:~$
## Major bug fix updates produced after thefinal release of the
## distribution.
debhttp://old-releases.ubuntu.com/ubuntu/ maverick main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ maverickmain restricted
debhttp://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
deb-srchttp://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
## N.B. software from this repository isENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software inuniverse WILL NOT receive any
## review or updates from the Ubuntu securityteam.
debhttp://old-releases.ubuntu.com/ubuntu/ maverick universe
deb-src http://old-releases.ubuntu.com/ubuntu/ maverickuniverse
debhttp://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
deb-srchttp://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
## N.B. software from this repository isENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence.Please satisfy yourself as to
## your rights to use the software. Also,please note that software in
## multiverse WILL NOT receive any review orupdates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ maverickmultiverse
deb-srchttp://old-releases.ubuntu.com/ubuntu/ maverick multiverse
debhttp://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
deb-srchttp://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
## Uncomment the following two lines to addsoftware from the 'backports'
## repository.
## N.B. software from this repository may nothave been tested as
## extensively as that contained in the mainrelease, although it includes
## newer versions of some applications whichmay provide useful features.
## Also, please note that software inbackports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.old-releases.ubuntu.com/ubuntu/maverick-backports main restricted universe multiverse
# deb-src http://us.old-releases.ubuntu.com/ubuntu/maverick-backports main restricted universe multiverse
#remastersys for backup installed system
deb http://www.remastersys.com/ubuntu maverickmain
$ gcc --version
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5.1) 4.4.5
Copyright (C) 2010 Free Software Foundation,Inc.
This is free software; see the source forcopying conditions. There is NO
warranty; not even for MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE.
向/etc/rc.d/rc.local最后空一行,然后加入一行,然后显示下文件内容:
sed -i '$ a\' /etc/rc.d/rc.local
sed -i '$ a\/usr/local/nagios/bin/nrpe -c/usr/local/nagios/etc/nrpe.cfg -d' /etc/rc.d/rc.local
more /etc/rc.d/rc.local
1.1.4网卡配置
这里描述下网卡的配置,ubuntu的网卡配置与centos不同:
1,ip地址配置
$sudo vi/etc/network/interfaces
# Thisfile describes the network interfaces available on your system
# and howto activate them. For more information, see interfaces(5).
# Theloopback network interface
auto lo
iface loinet loopback