In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Turn off selinux:
Vi / etc/selinux/config
SELINUX=disabled
First add an official yum source for zabbix
Rpm-ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Install dependent component packages
Yum-y install iksemel libssh3 zabbix-server-mysql zabbix-web-mysql mysql-server zabbix-agent install net-snmp-devel net-snmp-libs net-snmp-perl net-snmp-utils net-snmp
For the specific role of each component package, please directly name the Baidu software package. It will not be explained in detail here.
The database version installed using the yum source here should be Mysql 5.1.73, the initial password is empty, be sure to set the root user password!
3-1.
Login to the database:
Mysql-u root
3-2.
Change the database password:
Set password for root@localhost=password ('suiyi')
The password I set here is "suiyi". Just change it to the password you want to set.
3-3.
Create a database for zabbix:
Create database zabbixdb character set utf8 collate utf8_bin
The name of the database I created here is zabbixdb, which you can define by yourself, but you should also try your own database name for subsequent operations.
In order to support Chinese, the database character set uses utf8
The Chinese support here does not refer to the Chinese web management interface, but you can use the Chinese name when defining and adding devices.
3-4.
The user and password that authorize the zabbix system to access the Mysql database:
Grant all privileges on zabbixdb.* to zabbixuser@localhost identified by 'zabbixpass'
Zabbixdb.* refers to accessing all the tables in the zabbixdb library. The user I define here is zabbixuser password zabbixpass, which should also be changed to your own.
3-5.
Import zabbix database table structure
Mysql- uroot-psuiyi zabbixdb < / usr/share/doc/zabbix-server-mysql-2.4.1/create/schema.sql
Mysql- uroot-psuiyi zabbixdb < / usr/share/doc/zabbix-server-mysql-2.4.1/create/p_w_picpaths.sql
Mysql- uroot-psuiyi zabbixdb < / usr/share/doc/zabbix-server-mysql-2.4.1/create/data.sql
All three tables should be imported.
Remember the first part of each instruction
Mysql-uroot-psuiyi zabbixdb
Mysql database operation master instruction
-uroot logged in as root user
-psuiyi the suiyi here is the root password set by you in step 3-2 (note here that there is no space between-p and the password, just enter the password directly or you will report an error)
The name of the database created by zabbixdb for steps 3-3
The three sql files in the / usr/share/doc/zabbix-server-mysql-2.4.1/create/ directory are automatically created when the zabbix software is installed
Edit the configuration file for zabbix
Vi / etc/zabbix/zabbix_server.conf
Find the four keywords DBHost DBName DBUser DBPassword in turn
Modify it to what you defined above:
DBHost=localhost refers to accessing the native database.
The database name of the zabbix created by DBName=zabbixdb 3-3
DBUser=zabbixuser 3-4 user name that authorizes access to the database
DBPassword=zabbixpass 3-4 password for authorizing access to the database
Edit the PHP environment profile:
Vi / etc/httpd/conf.d/zabbix.conf
The corresponding modifications are as follows
Php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Shanghai
In fact, zabbix has been set up for you, only the last item needs you to change, remove the previous #
Time zone is set to Asia/Shanghai
Add fixed service ports for post-monitoring and firewall monitoring
Edit / etc/services file
Vi / etc/services
Skip to the end of the file (skip uppercase G directly) and append the following:
Zabbix-agent 10050/tcp # zabbix-agent-tcpzabbix-agent 10050/udp # zabbix-agent-udpzabbix-trapper 10051/tcp # zabbix-trapper-tcpzabbix-trapper 10051/udp # zabbix-trapper-udp
Open the firewall port (tcp\ 80 udp 10050 udp 10051)
Of course, you can turn off the firewall directly, but it is strongly recommended that you do not do so in the production environment!
Iptables-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT
Iptables-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 10050-j ACCEPT
Iptables-An INPUT-m state-- state NEW-m udp-p udp-- dport 10050-j ACCEPT
Iptables-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 10051-j ACCEPT
Iptables-An INPUT-m state-- state NEW-m udp-p udp-- dport 10051-j ACCEPT
Service iptables save
Set the required services to start automatically: (httpd,mysqld,snmpd,snmptrapd,zabbix-agent,zabbix-server)
Chkconfig httpd on; service httpd start
Chkconfig mysqld on; service mysqld start
Chkconfig snmpd on; service snmpd start
Chkconfig snmptrapd on; service snmptrapd start
Chkconfig zabbix-agent on; service zabbix-agent start
Chkconfig zabbix-server on; service zabbix-server start
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.