In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Install MySQL
Starting with the latest version of the linux system, the default is Mariadb instead of mysql!
Using the repos installation that comes with the system is simple:
# yum install-y mariadb mariadb-server
Start mariadb
# systemctl start mariadb
Previous service management commands can also be used
# service mariadb start
Set Boot self-boot
# systemctl enable mariadb
Secure initialization, setting root password, etc.
# mysql_secure_installation
Test login
# mysql-uroot-p123456
There is no password when you log in for the first time.
Under / etc/my.cnf
Add skip-grant-tables
Systemctl restart maridb
Mysql-uroot-p
After entering the database
Use mysql
Update mysql.user set password=PASSWORD ('YOUR_PASSWORD') where user='root'
Flush privileges
Delete skip-grant-tables under / etc/my.cnf
2. Install Zabbix
Install the zabbix official source
# rpm-ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
Install server and web side, based on mysql database
# yum install zabbix-server-mysql zabbix-web-mysql
3. Initialize zabbix DB
# mysql-uroot-p
Mysql > create database zabbix character set utf8 collate utf8_bin
Mysql > grant all privileges on zabbix.* to zabbix@localhost identified by''
Mysql > quit
# cd / usr/share/doc/zabbix-server-mysql-3.0.0
# gunzip create.sql.gz
Access to the database
Mysql-uroot-p
Use zabbix
Source / usr/share/doc/zabbix-server-mysql-3.0.0/create.sql
4. Modify the Zabbix Server configuration and start the Zabbix Server service
# vi / etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
Start the zabbix-server service
# systemctl start zabbix-server
Boot self-starting zabbix-server service
# systemctl enable zabbix-server
5. Launch the zabbix management interface
Edit PHP configuration
# vi / etc/httpd/conf.d/zabbix.conf
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 always_populate_raw_post_data-1
Php_value date.timezone Asia/Shanghai
Quick modify command
# sed-I "sbind # php_value date.timezone Europe\ / Riga/php_value date.timezone Asia\ / Shanghai/g" / etc/httpd/conf.d/zabbix.conf
Start the Apache service
# systemctl start httpd
Boot and start the Apache service
# systemctl enable httpd
6. Log in to the Zabbix management page http:// virtual machine IP/zabbix/, to display the Zabbix installation wizard.
Install zabbix-agent on the client side
Root@zabbix ~] # vi / etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=127.0.0.1
Include=/etc/zabbix/zabbix_agentd.d/
After the above configuration, when we add the monitoring machine on the zabbix web side, we only need to correspond the honst name to the hostname in the configuration file. As follows:
Server= server ip address
ServerActive= server ip address
Hostname= client ip address
Server passive ServerActive active
At this point, zabbix agent has been installed.
Start the client
[root@zabbix] # zabbix_agentd-c / etc/zabbix/zabbix_agentd.conf
[root@zabbix ~] # systemctl start zabbix-agent
[root@zabbix ~] # systemctl restart zabbix-agent
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.