Install packages
# yum install zabbix zabbix-agent zabbix-docs zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql
# yum install mysql-server httpd curl-devel net-snmp net-snmp-devel iksemel iksemel-devel
Enable mysqld, httpd, zabbix-agent and zabbix-server boot up automatically
# systemctl enable mysqld.service
# systemctl enable httpd.service
# chkconfig zabbix-agent on
# chkconfig zabbix-server on
Start mysqld and httpd service
# service mysqld start
# service httpd start
Set MySQL root password and import database
# mysqladmin -u root password [whateverpasswd]
# mysql -uroot -p
mysql> create database zabbix;
mysql> quit
# cd /usr/share/doc/zabbix-server-mysql-1.8.10/create/schema
# mysql -u root -p[whateverpasswd] zabbix < mysql.sql
# cd ../data
# mysql -u root -p[whateverpasswd] zabbix < data.sql
# mysql -u root -p[whateverpasswd] zabbix < images_mysql.sql
Change items in configuration files
# vi /etc/zabbix/zabbix_agent.conf
# vi /etc/zabbix/zabbix_agentd.conf
change from “LogFileSize=0″ to “LogFileSize=1024″
change from “# DebugLevel=3″ to “DebugLevel=4″
# vi /etc/zabbix/zabbix_server.conf
change from “LogFileSize=0″ to “LogFileSize=1024″
change from “# DebugLevel=3″ to “DebugLevel=4″
change from “# DBPassword=” to “DBPassword=[whateverdbpasswd]“
Create zabbix user and grant its privileges
# mysql -uroot -p
mysql> create user ‘zabbix’@'localhost’ identified by ‘[whateverdbpasswd]‘;
mysql> grant all privileges on zabbix.* to ‘zabbix’@'localhost’ with grant option;
NOTE: The websites I read did not mention this step. If you ignore it, you will see the following errors in the log file.
3548:20120127:115321.384 Database is down. Reconnecting in 10 seconds.
3548:20120127:115331.384 [Z3001] connection to database ‘zabbix’ failed: [1045] Access denied for user ‘zabbix’@'localhost’ (using password: YES)
The errors will occur on Fedora 14:
1830:20120111:202637.548 In DBconnect() flag:1
1830:20120111:202637.549 [Z3001] connection to database ‘zabbix’ failed: [1044] Access denied for user ”@’localhost’ to database ‘zabbix’
1830:20120111:202637.549 Cannot connect to the database. Exiting…
Start zabbix-agent and zabbix-server services
# service zabbix-agent start
# service zabbix-server start
Configure PHP
# vi /etc/php.ini
change from “;date.timezone =” to “date.timezone = “America/Toronto”"
change from “memory_limit = 128M” to “memory_limit = 256M”
change from “post_max_size = 8M” to “post_max_size = 32M”
change from “upload_max_filesize = 2M” to “upload_max_filesize = 16M”
change from “max_execution_time = 30″ to “max_execution_time = 600″
change from “max_input_time = 60″ to “max_input_time = 600″
Restart httpd service
# service httpd restart
Installation from browser
Open Firefox browser and input “http://[serverIP]/zabbix”.
If you can connect to the server, close the firewall
# iptables -F
Click “Next”

Click “I agree” and click “Next”

Input password, click “Test connection” and click “Next”

Click “Finish” and you can see the login page
Input “Admin”, and its default password “zabbix”, and then you can enter.
Change default Admin password
# mysql -uroot -p
mysql> use zabbix;
mysql> update users set passwd=md5(‘[wahteverpasswd]‘) where alias=”Admin”;
mysql> quit
After everything is ok, you can adjust DebugLevel back
# vi /etc/zabbix/zabbix_agentd.conf
change from “DebugLevel=4″ to “DebugLevel=3″
# vi /etc/zabbix/zabbix_server.conf
change from “DebugLevel=4″ to “DebugLevel=3″
# service zabbix-server restart
# service zabbix-agent restart
Disable SELinux, when you use zabbix
When I used Fedora 14 as server before, I found it occurred the below measages
fclose() expects parameter 1 to be resource, boolean given [api/classes/class.cscript.php:626]
Error Description: Permission denied
After I set SELinux, the problem was solved
# setsebool -P httpd_can_network_connect 1
But on Fedora 16, it didn’t work, so I did “setenforce=0″ temporarily.
Reference
http://www.zabbix.com/





I want to THANK-YOU most sincerely for this post. I have been searching for a detailed installation of Zabbix on FC for a while and this post is EXCELLENT.
I now have Zabbix working on my FC 14 Server, thanks to this post.
Stephan
By: stephanjusypiw on February 13, 2012
at 4:23 pm