Está en la página 1de 5

http/ip-server/cacti cai buoc nay truoc khi cai spin

cai dat bang cach giai nen cacti.tar.gz xong roi (Gom ca cai xong tren nen web
http/ip-server/cacti roi moi cai spin)

1. Step 1 �V Prerequisites

yum install -y gcc mysql-devel net-snmp-devel autoconf automake libtool dos2unix


help2man
help2man co the khong can

2. Step 2 �V Spine Files

cd /tmp
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8h.tar.gz
giai nen spin vao day
cd /var/www/html/
tar -xzvf cacti-spine-0.8.8h.tar.gz
giai nen cac-spin

3. Step 3 �V Compile Spine

cd /var/www/html/cacti-spine-0.8.8h
./bootstrap
./configure
make
make install
./configure --prefix=/opt/spine

4. Step 4 �V Configure Spine

cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
vi /usr/local/spine/etc/spine.conf

DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass password
DB_Port 3306
DB_PreG 0

5. Step 5 �V Configure Cacti to use spine

Login to your Cacti instance and go to:


Console -> Settings -> Poller

Change the ��Poller Type�� to ��spine��.

You��re cacti instance is now using the spine poller.

Console -> Settings -> Alternate Poller Path -> /usr/local/spine/bin/spine ( neu
Path Ok sau khi save la duocj)

-----------------------------------------------------------------------------
#####
ket qua chay make va make install

make

gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD


-MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT spine.o -
MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT util.o -M
D -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT snmp.o -M
D -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT locks.o -
MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT poller.o
-MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT
nft_popen .o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT php.o -MD
-MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT ping.o -M
D -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT keywords.
o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT error.o -
MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/us
r/lib64/mysql -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o
poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient_r
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snm
p.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64/m
ysql -lpthread -lssl -lm -lnetsnmp -lmysqlclient_r
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]# make install
make[1]: Entering directory `/var/www/html/cacti-spine-0.8.8h'
test -z "/usr/local/spine/bin" || /bin/mkdir -p "/usr/local/spine/bin"
/bin/sh ./libtool --mode=install /usr/bin/install -c spine
'/usr/local/spine/bin'
libtool: install: /usr/bin/install -c spine /usr/local/spine/bin/spine
test -z "/usr/local/spine/etc" || /bin/mkdir -p "/usr/local/spine/etc"
/usr/bin/install -c -m 644 spine.conf.dist '/usr/local/spine/etc'
make[1]: Leaving directory `/var/www/html/cacti-spine-0.8.8h'
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]#
./configure --prefix=/opt/spine
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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... gawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for ANSI C header files... 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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to enable -Wall... no
checking for help2man... false // No help2man //
checking for help2man... false // No help2man //
./configure: line 11394: test: too many arguments
checking for threadsafe gethostbyname()... no
checking for gethostbyname_r in -lnls... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... yes
checking for deflate in -lz... yes
checking for kstat_close in -lkstat... no
checking for CRYPTO_realloc in -lcrypto... yes
checking for ANSI C header files... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for signal.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for netinet/ip_icmp.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for malloc... yes
checking for calloc... yes
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking priv.h usability... no
checking priv.h presence... no
checking for priv.h... no
checking whether we are using Solaris privileges... no
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking whether we are using Linux Capabilities... no
checking for mysql_init in -lmysqlclient_r... yes
checking if Net-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... yes
checking for the spine results buffer size... 1024 bytes
checking for the maximum simultaneous spine scripts... 20
checking for the maximum MySQL buffer size... 65536
checking whether we are using traditional popen... no
checking whether to verify net-snmp library vs header versions... no
checking for glibc gethostbyname_r... yes
checking for Solaris/Irix gethostbyname_r... no
checking for HP-UX gethostbyname_r... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: config/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
[root@localhost cacti-spine-0.8.8h]#
[root@localhost cacti-spine-0.8.8h]#

También podría gustarte