2008-04-21

Install zabbix-1.4.5 on CentOS 5.1

CentOS 5.1 installed with

yum install httpd


yum install php


=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
php i386 5.1.6-15.el5 base 1.2 M
Installing for dependencies:
php-cli i386 5.1.6-15.el5 base 2.3 M
php-common i386 5.1.6-15.el5 base 140 k


Installed: php.i386 0:5.1.6-15.el5 Dependency Installed: php-cli.i386 0:5.1.6-15.el5 php-common.i386 0:5.1.6-15.el5 Complete!


yum install php-mysql

============================================================================= Package Arch Version Repository Size ============================================================================= Installing: php-mysql i386 5.1.6-15.el5 base 83 k Installing for dependencies: mysql i386 5.0.22-2.2.el5_1.1 updates 3.0 M perl-DBI i386 1.52-1.fc6 base 605 k php-pdo i386 5.1.6-15.el5 base 61 k Installed: php-mysql.i386 0:5.1.6-15.el5 Dependency Installed: mysql.i386 0:5.0.22-2.2.el5_1.1 perl-DBI.i386 0:1.52-1.fc6 php-pdo.i386 0:5.1.6-15.el5 Complete!

since I did not have mysql installed it does it because of the dependency, but this is not the server.

yum install php-gd
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: php-gd i386 5.1.6-15.el5 base 111 k Installed: php-gd.i386 0:5.1.6-15.el5 Complete!

yum install php-bcmath
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
php-bcmath i386 5.1.6-15.el5 base 31 k

Installed: php-bcmath.i386 0:5.1.6-15.el5
Complete!

yum install mysql-server

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-server i386 5.0.22-2.2.el5_1.1 updates 10 M
Installing for dependencies:
perl-DBD-MySQL i386 3.0007-1.fc6 base 147 k

Installed: mysql-server.i386 0:5.0.22-2.2.el5_1.1
Dependency Installed: perl-DBD-MySQL.i386 0:3.0007-1.fc6
Complete!

yum install mysql-devel

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-devel i386 5.0.22-2.2.el5_1.1 updates 2.4 M

yum install net-snmp

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
net-snmp i386 1:5.3.1-19.el5_1.4 updates 701 k
Installing for dependencies:
lm_sensors i386 2.10.0-3.1 base 494 k

yum install net-snmp-devel

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
net-snmp-devel i386 1:5.3.1-19.el5_1.4 updates 1.8 M
Installing for dependencies:
beecrypt-devel i386 4.1.2-10.1.1 base 160 k
elfutils-devel i386 0.125-3.el5 base 52 k
elfutils-devel-static i386 0.125-3.el5 base 78 k

yum install curl
yum install curl-devel

yum install gcc
yum install make


********************3

useradd -s /sbin/nologin zabbix

chkconfig --level 2345 mysqld on
service mysqld start
mysqladmin -u root password sqlpwd

Download Zabbix, i.e. using firefox and it gets copied onto the desktop

cd /home/guru/Desktop
mkdir /usr/src/software
mv zabbix-1.4.5.tar.gz /usr/src/software/
cd /usr/src/software
tar xzf zabbix-1.4.5.tar.gz
cd zabbix-1.4.5

[root@dhcppc3 zabbix-1.4.5]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database zabbix;
Query OK, 1 row affected (0.01 sec)

mysql>

mysql> quit;
Bye

cd create/schema
[root@dhcppc3 schema]# cat mysql.sql | mysql -u root -p zabbix
Enter password:
cd ../data
[root@dhcppc3 data]# cat data.sql | mysql -u root -p zabbix
Enter password:
[root@dhcppc3 data]# cat images_mysql.sql | mysql -u root -p zabbix
Enter password:

cd ../..

[root@dhcppc3 zabbix-1.4.5]# ./configure --enable-server --with-mysql --with-net-snmp --with-libcurl

Configuration:

Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux

Compiler: gcc
Compiler flags: -g -O2 -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -I/usr/include/rpm -I/usr/local/include -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -I. -I/usr/include/net-snmp

Enable server: yes
With database: MySQL
WEB Monitoring via: cURL
Native Jabber: no
SNMP: net-snmp
IPv6: no
Linker flags: -L/usr/lib/mysql -L/usr/lib -L/usr/kerberos/lib -L/usr/lib -L/usr/lib/lib -L/usr/lib -L/usr/lib/lib
Libraries: -lm -lresolv -lmysqlclient -lcurl -lnetsnmp

Enable agent: no

LDAP support: no

***********************************************************
* Now run 'make install' *
* *
* Thank you for using ZABBIX! *
* *
***********************************************************

[root@dhcppc3 zabbix-1.4.5]#


make install

I don't know why but it does not install the files, I had to copy it manually

[root@dhcppc3 zabbix-1.4.5]# cp src/zabbix_server/zabbix_server /usr/local/bin



mkdir /etc/zabbix
cp misc/conf/*.conf /etc/zabbix/

[root@dhcppc3 zabbix-1.4.5]# mkdir /var/www/html/zabbix
[root@dhcppc3 zabbix-1.4.5]# cp -R frontends/php/* /var/www/html/zabbix/

cd /etc/zabbix
vi zabbix_server.conf

DBPassword=sqlpwd

chkconfig --level 2345 httpd on

service httpd start

start a browser and http://localhost



vi /etc/php.ini

max_execution_time = 300
date.timezone = Europe/Zurich

Save config, in my case it gets onto the desktop, copy it where it says it needs it.


passwd zabbix

log in using user: admin and no password.

don't forget to start zabbix_server

cp /home/guru/Desktop/zabbix.conf.php /var/www/html/zabbix/conf/