Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix2.4 installation and problem summary (1)

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Zabbix2.4 installation and problem summary (1)

First, install the development package

Yum-y groupinstall "Development Tools"

Second, install the required dependency packages

Yum-y install httpd mysql mysql-server php php-mysqlphp-common php-mbstring php-gd php-odbc php-pear curl curl-devel net-snmpnet-snmp-devel perl-DBI php-xml ntpdate php-bcmath gcc*

Third, synchronization time

Ntpdate pool.ntp.org

You can synchronize the time server at will here, and there is no limit to this one.

4. Turn off the firewall and selinux

Service iptables stop

Chkconfig iptables off

Vi / etc/sysconfig/selinux

SELINUX=disabled

Or command replacement

Sed-I "s/SELINUX\ = enforcing/SELINUX\ = disabled/g" / etc/sysconfig/selinux

Reboot

Create the users and groups needed for the zabbix service to run

Groupadd-g 201zabbix

Useradd-g zabbix-u 201-m zabbix

Initialize the mysql server and set the mysql login user and password

/ etc/init.d/mysqld stop stop mysql database

/ usr/bin/mysqld_safe & start the mysql database

# mysql enters mysql database

Mysql > use mysql; uses mysql database

Mysql > UPDATE user SET password=password ("dj20160321") WHERE user='root'

(set login root username and password;)

Mysql > flush privileges; refresh the database

Mysql > exit

7. Create the database and user rights needed for zabbix to run

Mysql-u root-p logs in to mysql with the root user

Create databasezabbix character set utf8

Use zabbix

Grant all privileges on zabbix.* toroot@localhost identified by'

Click next:

Confirm that the red circle is normal, and click next; fill in the corresponding information above, the database host had better write localhost;, otherwise the zabbix not running error message will be caused by the meeting. Then click test connection to test, and the completion of the test will prompt you.

Click next:

If the host is local, do not change it. The port number is default. Enter the local ip address for the name. Next.

Next step:

Display normal, click finish Finish

Installation is complete, and then you can log in

Default user name: admin password: zabbix

18. Set the service to boot and start

Chkconfig--level 35 httpd on

Chkconfig--level 35 mysqld on

Chkconfig--level 35 zabbix_server on

XIX. Modify Chinese language support

The picture can be enlarged:

Enable self-monitoring

21. Configure the monitoring itself

Cat/etc/zabbix/zabbix_agentd.conf | grep-v "^ #" | grep-v "^ $"

Check the contents, replace it with the following command, or modify it by vi

Sed-I "s/Server\ = 127.0.0.1/Server\ = 127.0.0.1192.168.137.3" / etc/zabbix/zabbix_agentd.conf

Sed-I "s/ServerActive\ = 127.0.0.1/ServerActive\ = 192.168.137.3 purl 10051gamma g" / etc/zabbix/zabbix_agentd.conf

Sed-I "s#tmp/zabbix_agentd.log#var/log/zabbix/zabbix_agentd.log#g" / etc/zabbix/zabbix_agentd.conf

Sed-I "# UnsafeUserParameters=0#aUnsafeUserParameters=1\ n" / etc/zabbix/zabbix_agentd.conf

Wait a few minutes after the addition, and the graphics will appear.

22, client installation

Groupaddzabbix-g 201

Useradd-g zabbix-u 201-m zabbix

Cd/usr/local/src/

Tar xvfzabbix-2.4.7.tar.gz

Cdzabbix-2.4.7

. / configure--prefix=/usr/local/zabbix-- enable-agent

Make&& make install

Mkdir/var/log/zabbix

Chownzabbix.zabbix / var/log/zabbix

Cp misc/init.d/fedora/core/zabbix_agentd/etc/init.d/

Chmod 755/etc/init.d/zabbix_agentd

Sed-I "s#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix#g" / etc/init.d/zabbix_agentd

Ln-s / usr/local/zabbix/etc / etc/zabbix

Ln-s / usr/local/zabbix/bin/* / usr/bin/

Ln-s / usr/local/zabbix/sbin/* / usr/sbin/

Vi/etc/services; adds the following

Zabbix-agent 10050/tcp # Zabbix Agent

Zabbix-agent 10050/udp # Zabbix Agent

Zabbix-trapper 10051/tcp # Zabbix Trapper

Zabbix-trapper 10051/udp # Zabbix Trappe

Cat/etc/zabbix/zabbix_agentd.conf | grep-v "^ #" | grep-v "^ $"

Vi/etc/zabbix/zabbix_agentd.conf

Add or modify the following:

Server=127.0.0.1192.168.1.191

ServerActive=192.168.1.191:10051

UnsafeUserParameters=1

Or replace it with the following command

Sed-I "s/Server\ = 127.0.0.1/Server\ = 127.0.0.1192.168.137.3" / etc/zabbix/zabbix_agentd.conf

Sed-I "s/ServerActive\ = 127.0.0.1/ServerActive\ = 192.168.137.3 purl 10051gamma g" / etc/zabbix/zabbix_agentd.conf

Sed-I "s#tmp/zabbix_agentd.log#var/log/zabbix/zabbix_agentd.log#g" / etc/zabbix/zabbix_agentd.conf

Sed-I "# UnsafeUserParameters=0#aUnsafeUserParameters=1\ n" / etc/zabbix/zabbix_agentd.conf

Cat/etc/zabbix/zabbix_agentd.conf | grep-v "^ #" | grep-v "^ $"

Chkconfig--add zabbix_agentd

Chkconfigzabbix_agentd on

Service zabbix_agentdstart

22. Log in to the zabbix server-side web interface to add hosts and corresponding templates for monitoring.

Zabbix2.4 installation and problem summary (2): http://506554897.blog.51cto.com/2823970/1766150

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report