Installing Zabbix 2.4 on CentOS 6.5

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Installing Zabbix 2.4 on CentOS 6.5相关的知识,希望对你有一定的参考价值。

1: Download Package

# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm

技术分享

2: Install zabbix server packages

# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

技术分享

3: Install MySQL Database

# yum -y install mysql-server

技术分享

vi /etc/my.cnf

[mysqld]

symbolic-links=0

character-set-server=utf8

innodb_file_per_table=1

- Start mysql service with command “service mysqld start

技术分享

- Run the secure installation command “mysql_secure_installation” to set the root password:

- Enter current password for root (enter for none): <Press enterwithout password>

技术分享

– Set root password? [Y/n] <Enter Y>

技术分享

– Remove anonymous users? [Y/n] <Enter Y>

技术分享

– Disallow root login remotely? [Y/n] <Enter n>

技术分享

– Remove test database and access to it? [Y/n] <Enter Y>

技术分享

– Reload privilege tables now? [Y/n] <Enter Y>

技术分享

4: Create zabbix database

- Enter following commands to setup the database:

- # mysql -uroot -p<enter root password>

技术分享

– mysql> create database zabbix character setutf8;

技术分享

– mysql> grant all privileges on zabbix.* [email protected] identified by ‘M1o2n3itor’;

Note:passoword is M1o2n3itor.

技术分享

– mysql> exit

技术分享

5: Import initial schema and data

- # cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
– # mysql -uroot -p<enter root password> zabbix< schema.sql
– # mysql -uroot -p<enter root password> zabbix< images.sql
– # mysql -uroot -p<enter root password> zabbix< data.sql

技术分享

6: Edit database configuration inzabbix_server.conf

- # vi /etc/zabbix/zabbix_server.conf

Confirm following lines:

– DBHost=localhost (uncomment this line)
– DBName=zabbix
– DBUser=zabbix
– DBPassword=M1o2n3itor
(uncomment this line)

技术分享

7: Start zabbix server / agent services

- # service zabbix-serverstart

– # service zabbix-agentstart

技术分享

8: Change Timezone

- # vi /etc/httpd/conf.d/zabbix.conf

Uncomment below line and change to desired timezone

- # php_value date.timezone Asia/Shanghai

9: Restart the apache web server

- # service httpd restart

10: Set zabbix services to start on reboot

- # chkconfig zabbix-server on
– # chkconfig zabbix-agent on
– # chkconfig mysqld on
– # chkconfig httpd on

11: Configure Firewall

Before you can access the Front-end interface, you eitherdisable the Firewall (IPTABLES) or add rules for zabbix ports.

In Test Lab:

Only disable iptables firewall if testing this in a labby running the command ‘service iptables stop‘ to stop theservice and use ‘service iptables status‘ to confirm its not running

技术分享

chkconfig iptables off

In Production Environment:

Add the following lines in iptables for Trapper (10051); Client(10050) & httpd (80)

[code]
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
[/code]

Restart the Firewall

[code]service iptablesrestart[/code]

12: Configure Zabbix Web interface

-  Enter the following URL on a browser to access the zabbix webinterface http://<zabbix server hostname or ipaddress>/zabbix

技术分享

- Click Next and make sure all checks are OK

技术分享

- Change the Database username to ‘zabbix’andpassword to ‘M1o2n3itor’ and click Test connection to ensureconnection is established.

技术分享

- Leave host name and port as default

技术分享

- Confirm all settings are right

技术分享

- Click Finish to complete configuration

技术分享

Log into zabbix with default credentials (Username: Admin, Password: zabbix)

技术分享

- Click profile on top right hand corner, click Change password andcomplete the change password process

技术分享

There we are all done .

本文出自 “IT运维” 博客,请务必保留此出处http://itops.blog.51cto.com/2420369/1854008

以上是关于Installing Zabbix 2.4 on CentOS 6.5的主要内容,如果未能解决你的问题,请参考以下文章

Installing Intellij IDEA on Ubuntu

Installing IIS 8 on Windows Server 2012微软官方安装指导

[work] Installing Python 3 on Linux

[work] Installing Python 3 on Linux

Installing PHP5 on Ubuntu Server

Installing Selenium and ChromeDriver on Ubuntu