Configure Zabbix in RedHat 6.2
Zabbix Server Installation
1. Build a local YUM source.
# Yum-y install httpd php-mysql-server mysql-client curl-devel net-snmp-devel perl-DBI php-gd php-xml php-bcmath zlib-devel mysql-devel glibc-devel gcc automake libidn-devel openssl-devel net-snmp-devel rpm-devel OpenIPMI-devel php-mbstring
2. Add a user
[Root @ rhel src] # useradd zabbix
[Root @ rhel src] # passwd zabbix
3. Configure the MYSQL database of zabbix
# Service mysqld start
[Root @ rhel src] # mysql-u root-p
Mysql> create database zabbix;
Query OK, 1 row affected (0.02 sec)
Mysql> grant all on zabbix. * to zabbix @ localhost identified by 'zabbix ';
Query OK, 0 rows affected (0.08 sec)
Mysql> quit
Decompress the zabbix source code package.
# Tar zxvf zabbix-1.8.13.tar.gz
# Cd zabbix-1.8.13
# Mysql-u root zabbix <create/schema/mysql. SQL
# Mysql-u root zabbix <create/data. SQL
# Mysql-u root zabbix <create/data/images_mysql. SQL
4. Installation
#. /Configure-prefix =/opt/zabbix -- enable-server -- with-mysql -- with-net-snmp -- with-jabber =/usr/local/-- with-libcurl --- openipmi -- enable-agent
Jabber errors may be reported.
Solution: Install iksemel.
# Wget http://iksemel.googlecode.com/files/iksemel-1.4.tar.gz
# Tar zxvf iksemel-1.4.tar.gz
# Cd iksemel-1.4
#./Configure
# Make
# Make install
Execute again
#. /Configure-prefix =/opt/zabbix -- enable-server -- with-mysql -- with-net-snmp -- with-jabber =/usr/local/-- with-libcurl --- openipmi -- enable-agent
# Make install
A prompt is displayed when the installation is successful.
5. Modify the/etc/services file
# Cat>/etc/services <EOF
Zabbix-trapper 10051/tcp Zabbix Trapper
Zabbix-trapper 10051/udp Zabbix Trapper
EOF
6. Configure zabbix
# Cd zabbix-1.8.13
6.1
# Cp misc/init. d/RedHat/zabbix_server_ctl/etc/init. d/zabbix_server
# Mkdir/etc/zabbix
# Cp misc/conf/*/etc/zabbix/
# Vi/etc/zabbix/zabbix_server.conf
DBName = zabbix
DBUser = zabbix
DBPassword = zabbix
6.2 copy php web Applications
# Mkdir/var/www/html/zabbix
# Cp-r frontends/php/*/var/www/html/zabbix
6.3 Modify/etc/zabbix/zabbix_server.conf
PidFile =
Variables in/etc/init. d/zabbix_server
PIDFILE =
Consistency. You must pay attention to the permission to save the directory before generating the pid file. Otherwise, the start, stop, and restart services cannot work properly.
6.4 add to startup service:
Edit the/etc/init. d/zabbix_server file in the file header #! Add the following two rows under/bin/sh:
# Chkconfig: 35 95 95
# Description: zabbix server
Run
# Chkconfig -- add zabbix_server
7. Start Zabbix Server
# Service zabbix_server start
An error may be reported during startup:
Libiksemel. so.3: cannot open shared object file: No such file or directory
Solution:
# Updatedb
# Locate libiksemel. so.3
# Ldd zabbix_server
8. visit http: // <Server ip address>/zabbix to configure the page. Zabbix uploads the configuration file to the conf directory of the zabbix WEB application. You can.
Problems may occur.
Php-mbstring is not OK
Solution: Install
# Yum install php-mbstring
9. For http: // <Server ip>/zabbix, the logon username and password are admin/zabbix.
Client installation
1. Directly download the agent package installation process
Zabbix_agents_1.8.5.linux2_6.amd64.tar.gz
1.
# Groupadd zabbix
# Useradd zabbix-g zabbix
2.
# Mkdir/usr/local/zabbix/
# Tar-zxvf zabbix_agents_1.8.5.linux2_6.amd64.tar.gz-C/usr/local/zabbix/
Or download the source code package, decompress the package, and run
#./Configure -- prefix =/usr/local/zabbix -- enable-agent
# Make
# Make install
3. Configure zabbix
* Service port definition:
Edit/etc/services and append the following content:
# Cat>/etc/services <EOF
Zabbix-agent 10050/tcp Zabbix Agent
Zabbix-agent 10050/udp Zabbix Agent
EOF
* Copy the configuration file:
# Mkdir/etc/zabbix
Copy zabbix. agentd. conf from zabbix Server
* Install the Startup Script
# Download and copy the startup script zabbix_agentd to the/etc/init. d directory.
# Chmod a + x/etc/init. d/zabbix_agentd
* Modify the definition of the/etc/init. d/zabbix_agentd variable:
BASEDIR =/usr/local/zabbix
* Modify/etc/zabbix. agentd. conf
PidFile =
Variables in/etc/init. d/zabbix_agentd
PIDFILE =
Consistency. You must pay attention to the permission to save the directory before generating the pid file. Otherwise, the start, stop, and restart services cannot work properly.
* Add to startup service:
Edit the/etc/init. d/zabbix_agentd file in the file header #! Add the following two rows under/bin/sh:
# Chkconfig: 35 95 95
# Description: zabbix Agent server
Run
# Chkconfig -- add zabbix_agentd
* Start Zabbix Agentd
/Etc/init. d/zabbix_agentd start
Some Zabbix Tutorials:
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3
ZABBIX details: click here
ZABBIX: click here
This article permanently updates the link address: