Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

yum -y install ntp php php-bcmath php-gd php-mysql httpd mysql gcc mysql-server

mysql-devel net-snmp net-snmp-utils yum install net-snmp-devel net-snmp-libs cur


l-devel make mak -y

/etc/init.d/ntpd start

wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.i386.rpm
chmod 7555 /usr/sbin/fping
useradd zabbix
wget http://superb-east.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.4.1.tar.g
z

tar -xzvf zabbix-1.4.1.tar.gz


/etc/init.d/mysqld start

/usr/bin/mysqladmin -u root password 123.com

mysql -u root -p

mysql> CREATE DATABASE zabbix;

mysql> GRANT DROP,INDEX,CREATE,SELECT,INSERT,UPDATE,ALTER,DELETE ON zabbix.* TO


zabbixmysqluser@localhost IDENTIFIED BY 123.com ;
mysql> quit;

cd zabbix-1.4.1
cat create/schema/mysql.sql | mysql -u zabbix -p zabbix
cat create/data/data.sql | mysql -u zabbix -p zabbix
cat create/data/images_mysql.sql | mysql -u zabbix -p zabbix
./configure enable-server prefix=/usr/local/zabbix with-mysql with-net-snmp with-
libcurl

make install
make clean

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


make install

echo 'zabbix_agent 10050/tcp' >> /etc/services

echo 'zabbix_trap 10051/tcp' >> /etc/services

mkdir /etc/zabbix
cp misc/conf/zabbix_agentd.conf /etc/zabbix
cp misc/conf/zabbix_server.conf /etc/zabbix

in /etc/zabbix/zabbix_server.conf, modify:
DBUser=zabbixmysqluser
BPassword=zabbixmysqlpassword
DBSocket=/var/lib/mysql/mysql.sock
FpingLocation=/usr/sbin/fping

in /etc/zabbix/zabbix_agentd.conf, modify:
Server=127.0.0.1,Your.Zabbix.Server.IP
Hostname=EnterAUniqueHostNameForEachAgent
cp misc/init.d/redhat/zabbix_agentd_ctl /etc/init.d/zabbix_agentd
cp misc/init.d/redhat/zabbix_server_ctl /etc/init.d/zabbix_server

in /etc/init.d/zabbix_agentd AND /etc/init.d/zabbix_server:


BASEDIR=/usr/local/zabbix
in /etc/init.d/zabbix_agentd (Note the # hash marks, they are necessary), add ne
ar the top, just below #!/bin/sh:
# chkconfig: 345 95 95
# description: Zabbix Agentd
in /etc/init.d/zabbix_server (again, note the # Hash marks, they are required),
add near the top, just below #!/bin/sh:
# chkconfig: 345 95 95
# description: Zabbix Server
Configure automatic starting and stopping of services.
chkconfig level 345 zabbix_server on
chkconfig level 345 zabbix_agentd on
chkconfig level 345 httpd on
chkconfig level 345 mysqld on
chkconfig level 0123456 iptables off
/etc/init.d/iptables stop

cp -r frontends/php /var/www/html/zabbix

in /etc/php.ini, modify:
max_execution_time = 300
max_input_time = 600
post_max_size = 32M
date.timezone = America/Los_Angeles

now yum install php-mbstring -y


Note: Obviously you should substitute your own time zone. For a list of all vali
d timezones, click here
/etc/init.d/httpd start
chmod 777 /var/www/html/zabbix/conf

You might also like