Zabbix Installation Manual (Centos 5)
Zabbix Installation Manual (Centos 5)
NOTE: This manual is for clean install of Zabbix 1.6.7 or Zabbix 1.8. Don’t use it to upgrade the current
installation.
5. Configuring SSH to use only SSH 2 for extra security (if the server has a real IP address)
Open the SSH configuration file for editing.
shell>vi /etc/ssh/sshd_config
Search for “#Protocol 2,1” and change it to “Protocol 2”. Click INS to be able to edit/modify. To save, Press
ESC and then type :w and to exit type :q
8. Installing Fping. FPING is a utility that allows the system to ping multiple hosts at once.
a. if using 64bit OS
Downloading the 64bit rpm package
shell>wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.x86_64.rpm
Installing FPING 64bit
shell>rpm -Uvh fping-2.4-1.b2.2.el5.rf.x86_64.rpm
Changing access permissions to the FPING folder
shell>chown root:zabbix /usr/sbin/fping
shell>chmod 710 /usr/sbin/fping
shell>chmod ug+s /usr/sbin/fping
b. if using 32bit OS
Downloading the 32bit rpm package
shell>wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.i386.rpm
Installing FPING 32bit
shell>rpm -Uvh fping-2.4-1.b2.2.el5.rf.i386.rpm
Changing ownership and access permissions to the FPING
shell>chown root:zabbix /usr/sbin/fping
shell>chmod 710 /usr/sbin/fping
shell>chmod ug+s /usr/sbin/fping
12. Set a password for MySQL login (replace yourrootsqlpassword with the root account password)
shell>mysqladmin -u root password yourrootsqlpassword
15. Starting Apache. Apache's default document root is /var/www/html on Linux 5, and the configuration file is
/etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory
shell>service httpd start
16. Install phpMyAdmin 3.2.3 to manage the MySQL database through web interface (This step is optional)
Installing necessary components
shell>yum -y install php-mcrypt php-mbstring
Changing directory to /usr/share
shell>cd /usr/share/
Downloading phpMyAdmin 2.11.9.6 to use it with PHP 5 available on CentOS 5.4
shell>wget
http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.9.6/phpMyAdmin-
2.11.9.6-all-languages.tar.gz
Extracting the files
shell>tar xvfz phpMyAdmin-2.11.9.6-all-languages.tar.gz
Changing the extracted folder name to phpmyadmin
shell>mv phpMyAdmin-2.11.9.6-all-languages.tar.gz phpmyadmin
Deleting the downloaded file.
shell>rm phpMyAdmin-2.11.9.6-all-languages.tar.gz
Going into the phpmyadmin folder
shell>cd phpmyadmin
Copying the config file
shell>cp config.sample.inc.php config.inc.php
Editing the config file. Press INS to be able to edit/modify. To save, Press ESC and then type :w and to exit
type :q
shell>vi config.inc.php
17. To download and install Zabbix 1.8, please read the notes at the end of the document (Page 6) before
proceeding. To download and install Zabbix 1.6.7 do the following
Go to the tmp folder
shell>cd /tmp
Editing the Zabbix_server.conf to reflect the current configuration. Search for the values mentioned and
change them as shown below. Press INS to be able to edit/modify. To save, Press ESC and then type :w and
to exit type :q
shell>vi zabbix_server.conf
Search for and change the following
PidFile=/var/run/zabbix-server/zabbix_server.pid
LogFile=/var/log/zabbix-server/zabbix_server.log
AlertScriptsPath=/etc/zabbix/alert.d/
DBUser=root
DBPassword=<root_password>
FpingLocation=/usr/sbin/fping
Fping6Location=/usr/sbin/fping6
Editing the Zabbix_agentd.conf to reflect the current configuration. Search for the values mentioned and
change them as shown below. Press INS to be able to edit/modify. To save, Press ESC and then type :w and
to exit type :q
shell>vi zabbix_agentd.conf
Search for and change the following
EnableRemoteCommands=1
PidFile=/var/run/zabbix-agent/zabbix_agentd.pid
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
Timeout=10
Changing directory to /etc/init.d
shell>cd /etc/init.d
Creating a backup copy of zabbix_server
shell>cp zabbix_server zabbix_server.org
Creating a backup copy of zabbix_agentd
shell>cp zabbix_agentd zabbix_agentd.org
Editing the zabbix_server to reflect the current configuration. Search for the values mentioned and change
them as shown below. Press INS to be able to edit/modify. To save, Press ESC and then type :w and to exit
type :q
shell>vi zabbix_server
Search for and change the following
progdir="/usr/local/sbin/"
Editing the zabbix_agentd to reflect the current configuration. Search for the values mentioned and change
them as shown below. Press INS to be able to edit/modify. To save, Press ESC and then type :w and to exit
type :q
shell>vi zabbix_agentd
Search for and change the following
progdir="/usr/local/sbin/"
26. Starting Zabbix server at startup. This step is to get Zabbix server service to start after the MySQL service has
been started.
shell>vi /etc/rc.d/rc.local
Add the following line then save and exit. Press INS to be able to edit/modify. To save, Press ESC
and then type :w and to exit type :q
service zabbix_server start
Restarting the system
shell>reboot
27. Start the web installation procedure from the browser and then use WinSCP to copy the configuration file to the
proper location
a. Default username and password are
i. Username: admin
ii. Password: zabbix
NOTE: The procedure above will work also to install Zabbix 1.8 with few modifications. These modifications are
1. Zabbix 1.8 will not work on CentOS 5.4 without upgrading PHP 5.1.6 to PHP 5.2.9. To do that on CentOS
5.4, follow the below steps.
2. Install and configure the following PHP module
a. Installing php-mbstring module
shell>yum –y install php-mbstring
b. Editing the PHP.ini file to enable certain funtions
shell>vi /etc/php.ini
i. Search for “mbstring.func_overload” and modify it to “mbstring.func_overload = 2”
ii. Search for “memory_limit” and make sure it is 128M at least.
iii. Search for “post_max_size” and make sure it is 16M at least.
c. Restarting the Apache web server.
shell>service httpd restart
3. Adding the official CentOS test repository and upgrading PHP
a. Importing the PGP key for the CentOS test library (all official CentOS test library updates are certified
and already on their way to production phase)
shell>rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
b. Changing the directory to the repository directory
shell>cd /etc/yum.repos.d
c. Getting the testing repository
shell>wget http://dev.centos.org/centos/5/CentOS-Testing.repo
d. Downloading and updating the current PHP version and all its components to PHP 5.2.9 ONLY from
the test library.
shell>yum --disablerepo=* --enablerepo=c5-testing update php*
e. Deleting the testing repository
shell>rm /etc/yum.repos.d/CentOS-Testing.repo
4. Restarting the Apache web server.
shell>service httpd restart
5. Replace Zabbix-1.6.7 with Zabbix-1.8 in the rest of the document.