In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install zabbix4.04 in CentOS7.6. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1 prepare before installation:
1.1 install JDK
Uninstall openjdk
# rpm-qa | grep java# yum remove java-1.8.0-openjdk# yum remove java-1.8.0-openjdk-headless
Install JDK package
# rpm-ivh jdk-8u191-linux-x64.rpm
1.2 install dependency packages
# yum install-y net-snmp net-snmp-devel OpenIPMI-devel libssh3-devel openldap-devel openldap-clients libxml2-devel libcurl-devel gcc msyql-devel libevent-devel php-mysql php-gd php-mbstring php-bcmath libjpeg-devel freetype-devel libpng-devel php-xml keyutils-libs-devel krb5-devel libcom_err-devel libkadm5 libselinux-devel libsepol-devel openssl-devel pcre-devel zlib-devel
The following three packages are not included in DVD1. If you configure a local yum source, you need to install them separately.
# yum install-y libevent-devel-2.0.21-4.el7.x86_64.rpm# yum install-y libssh3-devel-1.4.3-12.el7.x86_64.rpm# yum install-y OpenIPMI-devel-2.0.23-2.el7.x86_64.rpm
After installing the dependency packages, you can use the following command to check whether they are all installed successfully
# rpm-qa net-snmp net-snmp-devel OpenIPMI-devel libssh3-devel openldap-devel openldap-clients libxml2-devel libcurl-devel gcc msyql-devel libevent-devel php-mysql php-gd php-mbstring php-bcmath libjpeg-devel freetype-devel libpng-devel php-xml keyutils-libs-devel krb5-devel libcom_err-devel libkadm5 libselinux-devel libsepol-devel openssl-devel pcre-devel zlib-devel
1.3 install MySQL
See the MySQL installation documentation for details
1.4 install nginx
# tar-zxvf nginx-1.14.0.tar.gz-C / home# cd / home/nginx-1.14.0/#. / configure # make & make install
1.5 install PHP
# yum install-y php# yum install-y php-fpm-5.4.16-46.el7.x86_64.rpm
2 installation service:
2.1 compile and install zabbix
# groupadd-system zabbix# useradd-system-g zabbix- d / usr/lib/zabbix-s / sbin/nologin zabbix# tar-zxvf zabbix-4.0.4.tar.gz-C / home# cd / home/zabbix-4.0.4/#. / configure-- prefix=/usr/local/zabbix/-- enable-server-- enable-agent-- with-mysql-- with-net-snmp-- with-libcurl-- with-libxml2-- with-ldap-- with-ssh3- -with-openipmi-enable-java-with-openssl# make install
2.2 create a database
# mysql-uroot-pmysql > create database zabbix character set utf8 collate utf8_bin;mysql > grant all privileges on zabbix.* to zabbix@ "serverip" identified by'; mysql > quit# cd / home/zabbix-4.0.4/database/mysql# mysql-uzabbix-p zabbix
< schema.sql# mysql -uzabbix -p zabbix < images.sql# mysql -uzabbix -p zabbix < data.sql 2.3 修改配置 # vim /usr/local/zabbix/etc/zabbix_server.confDBPassword= 2.4 启动服务 # /usr/local/zabbix/sbin/zabbix_server -c /usr/local/zabbix/etc/zabbix_server.conf # /usr/local/zabbix/sbin/zabbix_agentd -c /usr/local/zabbix/etc/zabbix_agentd.conf # /usr/local/zabbix/sbin/zabbix_java/startup.sh 注:/usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory 报以上错误的处理方案: # find / -name libmysqlclient.so.20/home/mysql/lib/libmysqlclient.so.20# echo "/home/mysql/lib" >> / etc/ld.so.conf# ldconfig
Then restart the service
3 install the front end:
3.1Configuring nginx
# vim / usr/local/nginx/conf/nginx.confserver {listen 80; server_name localhost; proxy_buffer_size 128k; proxy_buffers 32 32k; client_header_buffer_size 64k; large_client_header_buffers 8 128k; access_log / usr/local/nginx/logs/zabbix.access.log main; error_log / usr/local/nginx/logs/zabbix.error.log error; location / {root html Index index.php index.htm;} error_page 500 502 503 504 / 50x.htl; location = / 50x.html {root html;} location ~\ .php$ {fastcgi_buffer_size 128k; fastcgi_buffers 32 32k; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME / scripts$fastcgi_script_name Include fastcgi_params; include fastcgi.conf;}}
Note: remove the comments on log_format above
3.2 configure PHP
# vim / etc/php.inimax_execution_time = 300 memory_limit = 128m post_max_size = 16m upload_max_filesize = 2m max_input_time = 300 date.timezone = Asia/Shanghai# vim / etc/php-fpm.d/www.conf [www] listen = 127.0.0.1 listen 9000 listen = / var/run/php-fpm/php-fpm.sock listen.mode = 0666 user = nobody group = nobody pm = dynamic pm.max_children = 50 pm.start_servers = 5 pm .min _ spare_servers = 5 pm.max_spare_servers = 35
3.3 copy static files
# rm-rf / usr/local/nginx/html/*# cp-rf / home/zabbix-4.0.4/frontends/php/* / usr/local/nginx/html/# chown-R nobody.nobody / usr/local/nginx/html
3.4 configure the front end
Access the web address of the deployed service
Detect dependencies. Please install the missing modules. Find the appropriate rpm package in DVD2 to install, and restart php-fpm (pid of kill-USR2 php-fpm:master)
Configuration database
Configure the server
Complete the installation.
Default user name: Admin, password: zabbix
Thank you for reading! This is the end of the article on "how to install zabbix4.04 in CentOS7.6". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.