nagiosのクロスコンパイル
1.準備 ・クロスコンパイル環境は、libpngと同様zlibをコンパイルしたものをそのまま使用する。 ・クロスコンパイル用gccのある場所にパスを通は通っているはずである。# echo $PATHで確認して 通っていないならば再度通しておく。 ・GD関係のファイルの在処は、コンパイルオプションで指定できるが、何度か試した結果、デフォルト の/usr/local/以下にコピーする方が無用のトラブルが回避できる。
thinkpad:/root/work/nagios/local/lib# cp -rf * /usr/local/lib/
thinkpad:/root/work/nagios/local/include# cp -rf * /usr/local/include/
|
・nagios-2.12.tar.gzよりソースもらってきてこれを適当なディレクトリーで展開する。 私は/root/work/nagios以下を使用した。 ・thinkpad:~/work/nagios# tar zxvf nagios-2.12.tar.gz
2.クロスコンパイルの実行 ・./configureの実行 nagiosのドキュメントではnagiosというユーザーを作成することとなっているが、 OpenWrtではユーザー作成コマンドがインストールされていないため、実行ユーザーを rootとする。また、GDライブラリーの在処もデフォルトではあるが指定が必要のようであった。
thinkpad:‾/work/nagios/nagios-2.12#
./configure --build=i686-linux --host=mips-linux
--with-nagios-user=root --with-nagios-group=root
--with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include/
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... mips-unknown-linux-gnu
checking for mips-linux-gcc... mips-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mips-linux-gcc accepts -g... yes
checking for mips-linux-gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking for strip... /usr/bin/strip
checking how to run the C preprocessor... mips-linux-gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthreads.h usability... no
checking pthreads.h presence... no
checking for pthreads.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking uio.h usability... no
checking uio.h presence... no
checking for uio.h... no
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for initgroups... yes
checking for setenv... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for unsetenv... yes
checking for type of socket size... size_t
checking for pthread_create in -lcma... no
checking for pthread_create in -lpthread... yes
checking for library containing nanosleep... none required
checking for mail... /usr/bin/mail
Init script directory: /etc/init.d
We'll use default routines (in xdata/xsddefault.*) for status data I/O...
We'll use default routines (in xdata/xcddefault.*) for comment data I/O...
We'll use default routines (in xdata/xrddefault.*) for retention data I/O...
We'll use template-based routines (in xdata/xodtemplate.*) for object data I/O...
We'll use default routines (in xdata/xpddefault.*) for performance data I/O...
We'll use default routines (in xdata/xdddefault.*) for scheduled downtime data I/O...
checking for main in -liconv... no
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... yes
GD library was found!
これがGDライブラリが連携できた証拠 checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
checking for extra flags needed to export symbols... -Wl,-export-dynamic
checking for linker flags for loadable modules... -shared
checking for traceroute... /usr/sbin/traceroute
checking for snprintf... yes
checking for type va_list... yes
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating pkginfo
config.status: creating base/Makefile
config.status: creating common/Makefile
config.status: creating contrib/Makefile
config.status: creating cgi/Makefile
config.status: creating html/Makefile
config.status: creating module/Makefile
config.status: creating include/Makefile
config.status: creating xdata/Makefile
config.status: creating daemon-init
config.status: creating html/index.html
config.status: creating html/side.html
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/snprintf.h
config.status: include/snprintf.h is unchanged
config.status: creating include/nagios.h
config.status: creating include/cgiutils.h
Creating sample config files in sample-config/ ...
*** Configuration summary for nagios 2.12 05-19-2008 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: root,root
Command user/group: root,root
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/conf.d
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
|
・make allの実行
thinkpad:‾/work/nagios/nagios-2.12# make all
cd ./base && make
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/base' に入ります
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o broker.o broker.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o nebmods.o nebmods.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o checks.o checks.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o config.o config.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o commands.o commands.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o events.o events.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o flapping.o flapping.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o logging.o logging.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o notifications.o notifications.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o sehandlers.o sehandlers.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o utils.o utils.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o retention-base.o sretention.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xretention-base.o ../xdata/xrddefault.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o comments-base.o ../common/comments.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xcomments-base.o ../xdata/xcddefault.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o objects-base.o ../common/objects.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xobjects-base.o ../xdata/xodtemplate.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o statusdata-base.o ../common/statusdata.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xstatusdata-base.o ../xdata/xsddefault.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o perfdata-base.o perfdata.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xperfdata-base.o ../xdata/xpddefault.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o downtime-base.o ../common/downtime.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -c -o xdowntime-base.o ../xdata/xdddefault.c
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -o nagios
nagios.c broker.o nebmods.o checks.o config.o commands.o events.o
flapping.o logging.o notifications.o sehandlers.o utils.o
retention-base.o xretention-base.o comments-base.o xcomments-base.o
objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o
perfdata-base.o xperfdata-base.o downtime-base.o
xdowntime-base.o -Wl,-export-dynamic
-L/usr/local/lib -lm -lpthread -ldl
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c -L/usr/local/lib -lm
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/base' から出ます
cd ./cgi && make
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' に入ります
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o getcgi.o getcgi.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o cgiutils.o cgiutils.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o cgiauth.o cgiauth.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o objects-cgi.o ../common/objects.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o xobjects-cgi.o ../xdata/xodtemplate.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o statusdata-cgi.o ../common/statusdata.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o xstatusdata-cgi.o ../xdata/xsddefault.c
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o avail.cgi avail.c getcgi.o cgiutils.o cgiauth.o objects-cgi.o
xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o comments-cgi.o ../common/comments.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o xcomments-cgi.o ../xdata/xcddefault.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o downtime-cgi.o ../common/downtime.c
mips-linux-gcc -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -c -o xdowntime-cgi.o ../xdata/xdddefault.c
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o cmd.cgi cmd.c getcgi.o cgiutils.o cgiauth.o objects-cgi.o
xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o
xcomments-cgi.o downtime-cgi.o xdowntime-cgi.o
mips-linux-gcc -g
-O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o
config.cgi config.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o extinfo.cgi extinfo.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
comments-cgi.o xcomments-cgi.o downtime-cgi.o xdowntime-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o history.cgi history.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o notifications.cgi notifications.c getcgi.o cgiutils.o
cgiauth.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o
mips-linux-gcc -g -O2 -I/usr/local/include/
-DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o outages.cgi outages.c
getcgi.o cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o
statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o xcomments-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o showlog.cgi showlog.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o status.cgi status.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
comments-cgi.o xcomments-cgi.o
mips-linux-gcc -g -O2
-I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o
statuswml.cgi statuswml.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o summary.cgi summary.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
mips-linux-gcc
-g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
-o tac.cgi tac.c getcgi.o cgiutils.o cgiauth.o objects-cgi.o
xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o
xcomments-cgi.o
mips-linux-gcc -g -O2 -I/usr/local/include/
-DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o statuswrl.cgi statuswrl.c
getcgi.o cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o
statusdata-cgi.o xstatusdata-cgi.o -lm
mips-linux-gcc -g -O2
-I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o
statusmap.cgi statusmap.c getcgi.o cgiutils.o cgiauth.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
-lgd -lpng -ljpeg -lz -lm
mips-linux-gcc -g -O2
-I/usr/local/include/ -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o
trends.cgi trends.c getcgi.o cgiutils.o cgiauth.o objects-cgi.o
xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o -lgd -lpng
-ljpeg -lz -lm
mips-linux-gcc -g -O2 -I/usr/local/include/
-DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib -o histogram.cgi histogram.c
getcgi.o cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o
statusdata-cgi.o xstatusdata-cgi.o -lgd -lpng -ljpeg -lz -lm
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' から出ます
cd ./html && make
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/html' に入ります
make[1]: `all' に対して行うべき事はありません.
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/html' から出ます
cd ./module && make
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/module' に入ります
mips-linux-gcc -fPIC -g -O2 -I/usr/local/include/ -DHAVE_CONFIG_H -o helloworld.o helloworld.c -shared -L/usr/local/lib
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/module' から出ます
*** Compile finished ***
If the main program and CGIs compiled without any errors, you
can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
make install
- This installs the main program, CGIs, and HTML files
make install-init
- This installs the init script in /etc/init.d
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
make install-config
- This installs *SAMPLE* config files in /usr/local/nagios/etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!
*** Support Notes *******************************************
If you have questions about configuring or running Nagios,
please make sure that you:
- Look at the sample config files
- Read the HTML documentation
- Read the FAQs online at http://www.nagios.org/faqs
before you post a question to one of the mailing lists.
Also make sure to include pertinent information that could
help others help you. This might include:
- What version of Nagios you are using
- What version of the plugins you are using
- Relevant snippets from your config files
- Relevant error messages from the Nagios log file
For more information on obtaining support for Nagios, visit:
http://www.nagios.org/support/
*************************************************************
Enjoy.
|
・make installの実行
thinkpad:‾/work/nagios/nagios-2.12# make install
cd ./base && make install
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/base' に入ります
make install-basic
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/base' に入ります
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o root -g root nagios /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o root -g root nagiostats /usr/local/nagios/bin
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/base' から出ます
make strip-post-install
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/base' に入ります
/usr/bin/strip /usr/local/nagios/bin/nagios
/usr/bin/strip /usr/local/nagios/bin/nagiostats
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/base' から出ます
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/base' から出ます
cd ./cgi && make install
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' に入ります
make install-basic
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' に入ります
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/sbin
for file in *.cgi; do ¥
/usr/bin/install -c -m 775 -o root -g root $file
/usr/local/nagios/sbin; ¥
done
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' から出ます
make strip-post-install
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' に入ります
for file in *.cgi; do ¥
/usr/bin/strip /usr/local/nagios/sbin/$file; ¥
done
make[2]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' から出ます
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/cgi' から出ます
cd ./html && make install
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/html' に入ります
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/media
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/stylesheets
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/contexthelp
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/docs
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/docs/images
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/images
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/images/logos
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/share/ssi
/usr/bin/install -c -m 664 -o root -g root robots.txt /usr/local/nagios/share
/usr/bin/install -c -m 664 -o root -g root docs/robots.txt /usr/local/nagios/share/docs
for file in *.html; ¥
do /usr/bin/install -c -m 664 -o root -g root $file /usr/local/nagios/share; done
for file in media/*.wav; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/media; done
for file in stylesheets/*.css; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/stylesheets; done
for file in contexthelp/*.html; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/contexthelp; done
for file in docs/*.html; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/docs; done
for file in docs/images/*.*; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/docs/images; done
for file in images/*.gif; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/images; done
for file in images/*.jpg; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/images; done
for file in images/*.png; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/images; done
for file in images/logos/*.*; ¥
do /usr/bin/install -c -m 664 -o root -g root $file
/usr/local/nagios/share/images/logos; done
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12/html' から出ます
make install-basic
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12' に入ります
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/var/archives
if [ no = yes ]; then ¥
/usr/bin/install -c -m 664 -o root -g root p1.pl /usr/local/nagios/bin;
¥
fi;
*** Main program, CGIs and HTML files installed ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
make install-init
- This installs the init script in /etc/init.d
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
make install-config
- This installs *SAMPLE* config files in /usr/local/nagios/etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!
make[1]: ディレクトリ `/root/work/nagios/nagios-2.12' から出ます
thinkpad:‾/work/nagios/nagios-2.12# make install-commandmode
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/var/rw
chmod g+s /usr/local/nagios/var/rw
*** External command directory configured ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
make install-config
- This installs *SAMPLE* config files in /usr/local/nagios/etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!
|
・make install-config make install-initは/etc/init.d/nagiosをセットするためのものなので、クロスコンパイルの環境 では必要が無いので省略する。
thinkpad:‾/work/nagios/nagios-2.12# make install-config
/usr/bin/install -c -m 775 -o root -g root -d /usr/local/nagios/etc
/usr/bin/install -c -b -m 664 -o root -g root sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg
/usr/bin/install -c -b -m 664 -o root -g root sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg
/usr/bin/install -c -b -m 660 -o root -g root sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg
/usr/bin/install -c -b -m 664 -o root -g root sample-config/template-object/localhost.cfg /usr/local/nagios/etc/localhost.cfg
/usr/bin/install -c -b -m 664 -o root -g root sample-config/template-object/commands.cfg /usr/local/nagios/etc/commands.cfg
*** Sample config file installed ***
Remember, these are *SAMPLE* config files. You'll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.
If you have questions about configuring Nagios properly, please:
- Look at the sample config files
- Read the HTML documentation
- Read the FAQs online at http://www.nagios.org/faqs
*BEFORE* you post a question to one of the mailing lists.
|
これでnagiosのクロスコンパイルは完了である。
|