Server-Side Environment readiness
Zabbix server needs to run on a Linux system such as CentOS, RedHat Linux, Debain and so on, with Rhel AS5 as the deployment environment.
The root user installs the necessary packages and recommends that Yum be configured to install the following packages through Yum to resolve package dependencies.
Lamp environment
#yum Install mysql-server httpd php
Other packages that need to be used:
#yum Install mysql-devel gcc net-snmp-devel curl-devel perl-dbi php-gd php-mysql php-bcmath php-mbstring php-xml
Download the latest Zabbix installation package (official website: http://www.zabbix.com) to local, unzip
#tar ZXVF zabbix-1.8.1.tar.gz
Adding Zabbix Users and Groups
#groupadd Zabbix
#useradd –g zabbix–m Zabbix
Database Preparation
To start the MySQL database:
#service mysqld Start
Modify the MySQL root user password (the default password is empty)
#mysqladmin –u root–p Password root
Test whether the database is logged in properly
#mysql –uroot–proot
Create a Zabbix database
Mysql> CREATE database Zabbix character set UTF8;
Import Database SQL script
#cd zabbix-1.8.1
# Cat./create/schema/mysql.sql |mysql-uroot-proot Zabbix
# Cat./create/data/data.sql |mysql-uroot-proot Zabbix
# Cat./create/data/images_mysql.sql |mysql-uroot-proot Zabbix
Compiling the installation
Configuration compilation, prefix is the post-installation program directory
#./configure--with-mysql--with-net-snmp--with-libcurl--enable-server--enable-agent--enable-proxy--prefix=/usr/ Local/zabbix
# make
# make Install
configuration file and Web front end file modification
Add the service port and add the following
# grep Zabbix/etc/services
Zabbix-agent 10050/tcp # Zabbix Agent
Zabbix-agent 10050/UDP # Zabbix Agent
Zabbix-trapper 10051/tcp # Zabbix Trapper
Zabbix-trapper 10051/UDP # Zabbix Trapper
Add a configuration file
# mkdir-p/etc/zabbix
# CP./misc/conf/*/etc/zabbix
# Chown-r Zabbix:zabbix/etc/zabbix
Modify the server configuration file
Basic without modification, with the default configuration, just modify a dbpassword= password
# vi/etc/zabbix/zabbix_server.conf
Modify the Agentd configuration file, change the host NAME to native hostname just fine.
#vi/etc/zabbix/zabbix_agentd.conf
Add a web front-end PHP file
# CD frontends/
# CP-RF php/var/www/html/
# cd/var/www/html
# mv PHP Zabbix
# chown-r Zabbix:zabbix Zabbix
Web front-End installation configuration
Modify PHP Related parameters
# Vi/etc/php.ini Find the following items, change to the following values, preceded by;
Max_execution_time = 300
Date.timezone = Asia/shanghai
Post_max_size = 32M
Memory_limit = 128M
Mbstring.func_overload = 2
Restart Apache
#service httpd Restart
Access Zabbis serve address on local browser start web front end configuration, Http://ServerIP/zabbix
Follow the prompts step by step next, where step 3 check of pre-requisites must be all items OK before you can continue with the configuration, if prompted fail, go to the server to check whether the package is installed or whether the configuration is changed as described above.
Step 4 fill in Zabbix Server login MySQL user and password host: native hostname user:root pass:123456
Step 7 Follow the prompts to download the configuration file to the server/var/www/html/zabbix/conf, the name must be zabbix.conf.php
After the configuration is complete, the login interface appears, the default user is: admin, Password: Zabbix
Start the server
After the installation is complete, the server program can be started directly under the/usr/local/zabbix/sbin/directory.
#/usr/local/zabbix/sbin/zabbix_server
In order to facilitate the start-stop server, we do some small configuration
Replication control Procedures
# CP./misc/init.d/redhat/zabbix_*/etc/init.d/
Modify the configuration directory to change basedir= in the following two files to/usr/local/zabbix, and the bin in the following two configurations to Sbin,zabbix_agentd,zabbix_suckerd
# Vi/etc/init.d/zabbix_server_ctl
# Vi/etc/init.d/zabbix_agentd_ctl
Join boot Start
# echo '/etc/init.d/zabbix_server_ctl start & ' >>/ETC/RC
# echo '/etc/init.d/zabbix_agentd_ctl start & ' >>/ETC/RC
Create a fast key mode
# ln-s/etc/init.d/zabbix_server_ctl/usr/bin/zabbix_server_ctl
# ln-s/etc/init.d/zabbix_agentd_ctl/usr/bin/zabbix_agentd_ctl
Start server and AGENTD (can be operated by start stop restart)
# Zabbix_agentd_ctl Start
# Zabbix_server_ctl Start
Check if startup is working, see if the process is up, sub-server and AGENTD
#ps –ef|grep Zabbix
If the process is not up, you can view the corresponding log error by default in/tmp/zabbix-*.log
Vi/etc/ld.so.conf
Add/usr/local/lib
Ldconfig
The installation of Zabbix server is now complete
More wonderful Linux video tutorials at 51CTO Academy: http://edu.51cto.com/course/courseList/id-48.html
Installation of Zabbix under Linux