How to‎ > ‎

Install Zabbix on CEntOS 6.4

# Install CEntOS 6.4 Minimal

# Turn off firewall and SELINUX
chkconfig iptables off && chkconfig ip6tables off && service iptables stop && service ip6tables stop && setenforce 0
vi /etc/selinux/config #replace SELINUX=enforcing with SELINUX=disabled

# set IP Address and hostname

# Update
yum -u update

# Install
yum install telnet nmap traceroute man ntpd wget mlocate unzip dos2unix perl make gcc mysql mysql-server -y

# Time sync, ntpd auto start and start ntpd services
ntpdate #2 or 3 times
chkconfig ntpd on
/etc/init.d/ntpd start

# MySQL auto start and start MySQL services
chkconfig mysqld on
/etc/init.d/mysqld start

# Install Zabbix Repositories and install Zabbix server and agent
rpm -ivh
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y

#Set MySQL root password and secure MySQL server
mysql -u root mysql
SET PASSWORD FOR [email protected] = PASSWORD('MyN3wpassw0rd'); ## mysqlroot account password
DELETE FROM user WHERE NOT (host = "localhost" AND user = "mydbadmin");

# httpd auto start and start httpd services
chkconfig httpd on
/etc/init.d/httpd start

# Create Zabbix database and import table
mysql -uroot -p # input mysql root password 'MyN3wpassw0rd'
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to [email protected] identified by 'zabbix'; # set zabbix database password
mysql> exit
cd /usr/share/doc/zabbix-server-mysql-2.0.6/create/
mysql -uroot -p zabbix < schema.sql # input mysql root password 'MyN3wpassw0rd'
mysql -uroot -p zabbix < images.sql # input mysql root password 'MyN3wpassw0rd'
mysql -uroot -p zabbix < data.sql # input mysql root password 'MyN3wpassw0rd'

# Edit database configuration in zabbix_server.conf
vi /etc/zabbix/zabbix_server.conf

# Auto start and start zabbix server services
chkconfig zabbix-server on
/etc/init.d/zabbix-server start

# Editing PHP configuration for Zabbix frontend and restart httpd services
vi /etc/httpd/conf.d/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 256M
php_value post_max_size 32M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone Asia/Jakarta

/etc/init.d/httpd restart

# Edit zabbix agent configuration files
vi /etc/zabbix/zabbix_agentd.conf
Hostname=Zabbix server

# Auto start and start zabbix agent services
chkconfig zabbix-agent on
/etc/init.d/zabbix-agent start

# Allow Nmap (for detect operating system)
# Comment out
Defaults    requiretty
# Add the follwing line (bottom)
zabbix ALL = (root) NOPASSWD: /usr/bin/nmap

# Access web URL http://zabbixip/zabbix
# default username : admin, password : zabbix

Continue with web installation