Aix--zabbix agnet compilation and installation as well as encountering the "pit"

Source: Internet
Author: User
Tags automake

The previous article continued, the book connected to the previous one.

The previous article is about the installation of the AIX 6.1 operating system, but Hugo's task is not finished, the boss needs is the Zabbix agent's compilation installation. Since you need to compile, how can you less gcc this compiler tool? 工欲善其事 its prerequisite, let's install GCC first. (RPM package can be downloaded from http://www.bullfreeware.com/or Https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html#L)

We're uploading it to the AIX system using the Xshell feature.

#rpm-IVH gcc-4.2.0-1.aix6.1.ppc.rpm

GCC has been installed here, very simple.

Next, we upload the extracted zabbix-3.4.10 to the AIX system and start compiling.

#cd/tmp/zabbix-3.4.10;chmod u+x Configure

#./configure--prefix=/usr/local/zabbix--enable-agent

Hecking for Libpcre support ... no

Configure:error:Unable to use Libpcre (Libpcre check failed)

Oh? reported a libcpre mistake. Well, according to experience, is pcre not installed, then download Pcre and related dependent RPM package bar.

。。。。。。 Finally gathered up.

RPM-IVH pcre-8.34-1.aix6.1.ppc.rpm bzip2-1.0.6-2.aix6.1.ppc.rpm zlib-1.2.11-1.aix6.1.ppc.rpm readline-6.3-1.aix6.1.ppc.rpm readline-devel-6.3-1.aix6.1.ppc.rpm info-5.0-2.aix6.1.ppc.rpm bash-4.4-3.aix6.1.ppc.rpm libiconv-1.14-22.aix6.1.ppc.rpm

Let's configure again.

#./configure--prefix=/usr/local/zabbix--enable-agent

Or do you report this mistake? Should be missing the devel development Kit, go, to download, then install

RPM-IVH pcre-devel-8.34-1.aix6.1.ppc.rpm

Let's configure again.

#./configure--prefix=/usr/local/zabbix--enable-agent

Rub against the rub. Haha, it's quite smooth.

Then make a little bit of it.

#make

warning: ' Aclocal-1.15 ' is missing on your system.

         should only need it if you modified ' acinclude.m4 ' or

         ' configure.ac ' or M4 files included by ' Configure.ac '.

         the ' aclocal ' program was part of the GNU Automake package:

        

         It also requires GNU Autoconf, GNU M4 and Perl in order to run:

        

                   

??? What the heck? It should also be missing a command or Lib library. OK, Baidu a bit (hateful can't use google)

Download some RPM packages to try the installation, then make a bit

#rpm-IVH autoconf-2.65-1.aix6.1.noarch.rpm automake-1.15-1.aix6.1.noarch.rpm m4-1.4.14-1.aix6.1.ppc.rpm

#make

What the heck? Or to report this mistake, is not clearly already installed? Reluctantly, continue to Baidu .....

This command was found and executed in the compiled folder directory.

#autoreconf-IVF

Make it again.

#make

./configure[7961]: syntax error at line 9102: ' (' unexpected

Cd. &&/bin/sh./config.status Makefile

Config.status:creating Makefile

Cd.. /.. /.. &&/bin/sh./config.status src/libs/zbxcrypto/makefile Depfiles

Config.status:creating Src/libs/zbxcrypto/makefile

config.status:executing depfiles Commands

Gcc-dhave_config_h-i.-I.. /.. /.. /include-g-o2-mt LIBZBXCRYPTO_A-MD5.O-MD-MP-MF. Deps/libz

Bxcrypto_a-md5. Tpo-c-o libzbxcrypto_a-md5.o ' test-f ' md5.c ' | | echo './' md5.cin file included from/usr/include/sys/corral.h:25,

From/usr/include/libperfstat.h:28,

From.. /.. /.. /include/sysinc.h:292,

From.. /.. /.. /include/common.h:23,

From md5.c:54:

/usr/include/netinet/in6_var.h:65:error:array type has incomplete element type

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.


Nani ~ ~ ~ The original mistake did not, but there is a new error. The heart that ran to collapse AH.

Reading the wrong information is in the Configure file of 9102 lines, unrecognized (, this opening parenthesis?).

With curiosity, the Configure to the WIN10 environment, using EditPlus to see

Pkg_check_modules (Iksemel,iksemel,

Jabber_incdir= "$IKSEMEL _cppflags"

Jabber_libdir= "$IKSEMEL _ldflags"

Jabber_libs= "-liksemel"

,

Found_iksemel= "No"

Found_jabber= "No"

)

That's it, um. How many more empty lines? Are there multiple parameters in the branch? Think again ... The report is (this mistake, will it be ...)

See the Red Box No, other places are used {Yes, here how to use (?) With a try of psychology, will () changed () to {}, and the multi-line parameters into a row, the effect is as follows

Pkg_check_modules{iksemel,iksemel,jabber_incdir= "$IKSEMEL _cppflags", jabber_libdir= "$IKSEMEL _ldflags", JABBER_ Libs= "-liksemel", found_iksemel= "no", found_jabber= "No"}

Save, return to the AIX system, overwrite it, and make it.

#make

Gcc-dhave_config_h-i.-I.. /.. /.. /include-g-o2-mt LIBZBXCRYPTO_A-MD5.O-MD-MP-MF. Deps/libz

Bxcrypto_a-md5. Tpo-c-o libzbxcrypto_a-md5.o ' test-f ' md5.c ' | | echo './' md5.cin file included from/usr/include/sys/corral.h:25,

From/usr/include/libperfstat.h:28,

From.. /.. /.. /include/sysinc.h:292,

From.. /.. /.. /include/common.h:23,

From md5.c:54:

/usr/include/netinet/in6_var.h:65:error:array type has incomplete element type

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.

make:1254-004 the error code from the last command is 1.

Stop.

Please allow me to spit blood ... The error is gone, and a new error .... The heart that ran ... Break...

But the revolution has not succeeded successfully. homosexuals! Efforts are still needed.

Take a closer look at the error

This could be a problem with this two file, try it (again, copy to WIN10 environment, the following will be viewed by default in this environment)

Open the Sysinc.h file to see line No. 292 ... Thinking in ... May be missing include a library file it, hateful Baidu ...

increased the <sys/protosw.h> and passed it back to cover try Make

Come again ....

cpu.c:in function ' System_cpu_num ':

Cpu.c:29:error: ' perfstat_partition_config_t ' undeclared (first use of this function)

Cpu.c:29:error: (Each undeclared identifier was reported only once

Cpu.c:29:error:for each function it appears in.)

Cpu.c:29:error:expected '; ' Before ' part_cfg '

Cpu.c:47:error: ' Part_cfg ' undeclared (first use of this function)

What the hell is this? So many errors ... No wonder Zabbix since 2. X doesn't have a pre-compiled agent in the future.

I want to be quiet ....

Look at this error, it is estimated that the CPU set is not recognized

#find./-name CPU.C

Here, open it and look at it.

The error says ' perfstat_partition_config_t ' is undefined, can I comment out? Give it a try.

Make a bit.

cpu.c:in function ' System_cpu_num ':

Cpu.c:47:error: ' Part_cfg ' undeclared (first use of this function)

Cpu.c:47:error: (Each undeclared identifier was reported only once

Cpu.c:47:error:for each function it appears in.)

Cpu.c:47:error: ' perfstat_partition_config_t ' undeclared (first use of this function)

47th line error, then comment

Another error.

cpu.c:in function ' System_cpu_num ':

Cpu.c:55:error: ' Part_cfg ' undeclared (first use of this function)

Cpu.c:55:error: (Each undeclared identifier was reported only once

Cpu.c:55:error:for each function it appears in.)

Re-comment

Make a bit ..... Look at the jump on the screen ... As in the absolute darkness to see a beam of light ....

Make it past .....

That's not a hurry. Make install

#make Install

Also install the ... Inside that "chicken jelly"

Try starting the agent.

#/usr/local/zabbix/sbin/zabbix_agentd-c/usr/local/zabbix/etc/zabbix_agentd.conf

User does not exist, this is good to do, add a bit

#useradd Zabbix

#/usr/local/zabbix/sbin/zabbix_agentd-c/usr/local/zabbix/etc/zabbix_agentd.conf

#ps aux | grep Zabbix | Grep-v grep

Celebrate


This experiment is not so smooth, which encountered a lot of "pit", the next one will introduce the "pit" stepped


------------------------------------------------------------------------------------Beautiful Split-line

The following information is referenced in this experiment:

42222905

7542884

The RPM packages covered in this article can be downloaded via the following links:

Link: https://pan.baidu.com/s/1HCbwj_rEjsXUu6FeuFOQTw Password: RQMR

Aix--zabbix agnet compilation and installation as well as encountering the "pit"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.