本文介绍了根据CentOS7.6系统的zabbix4.04安装文本文件的关键细节。文中对子流程的详细介绍非常详细,具有一定的参考和使用价值,有需要的盆友可以参考一下。
1安装前提前准备:
1.1安装JDK
卸载openjdk
#rpm-qa|grepjava #yumremovejava-1.8.0-openjdk #yumremovejava-1.8.0-openjdk-headless安装JDK软件包
#rpm-IVHJDK-8u191-Linux-x64.rpm
1.2安装依赖包
#yuminstall-ynet-snmpnet-snmp-develOpenIPMI-devellibssh2-developenldap-developenldap-clientslibxml2-devellibcurl-develgccmsyql-devellibevent-develphp-mysqlphp-gdphp-mbstringphp-bcmathlibjpeg-develfreetype-devellibpng-develphp-xmlkeyutils-libs-develkrb5-devellibcom_err-devellibkadm5libselinux-devellibsepol-developenssl-develpcre-develzlib-develDVD1中不包括以下三个包。如果您配备了本地yum源,则必须独立安装它们。
#yuminstall-ylibevent-devel-2.0.21-4.el7.x86_64.rpm #yuminstall-ylibssh2-devel-1.4.3-12.el7.x86_64.rpm #yuminstall-yOpenIPMI-devel-2.0.23-2.el7.x86_64.rpm安装完依赖包后,您可以应用以下说明来检查所有安装是否成功。
#rpm-qanet-snmpnet-snmp-develOpenIPMI-devellibssh2-developenldap-developenldap-clientslibxml2-devellibcurl-develgccmsyql-devellibevent-develphp-mysqlphp-gdphp-mbstringphp-bcmathlibjpeg-develfreetype-devellibpng-develphp-xmlkeyutils-libs-develkrb5-devellibcom_err-devellibkadm5libselinux-devellibsepol-developenssl-develpcre-develzlib-devel1.3安装MySQL
详细的MySQL安装文本文档
1.4安装nginx
#tar-zxvfnginx-1.14.0.tar.gz-C/home #cd/home/nginx-1.14.0/ #./configure #make&makeinstall1.5安装PHP
#yuminstall-yphp #yuminstall-yphp-fpm-5.4.16-46.el7.x86_64.rpm2安装服务项目:
2.1编译器安装zabbix
#groupadd--systemzabbix #useradd--system-gzabbix-d/usr/lib/zabbix-s/sbin/nologinzabbix #tar-zxvfzabbix-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-ssh2--with-openipmi--enable-java--with-openssl #makeinstall2.2数据库的建立
#mysql-uroot-p<password> mysql>createdatabasezabbixcharactersetutf8collateutf8_bin; mysql>grantallprivilegesonzabbix.*tozabbix@"serverip"identifiedby'<password>'; mysql>quit #cd/home/zabbix-4.0.4/database/mysql #mysql-uzabbix-p<password>zabbix<schema.sql #mysql-uzabbix-p<password>zabbix<images.sql #mysql-uzabbix-p<password>zabbix<data.sql2.3更换设备
#vim/usr/local/zabbix/etc/zabbix_server.conf DBPassword=<password>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:加载共享库时出错:libmysqlclient.so.20:无法打开共享对象文件:没有这样的文件或目录
关于不正确的解决方案:
#find/-namelibmysqlclient.so.20 /home/mysql/lib/libmysqlclient.so.20 #echo"/home/mysql/lib">>/etc/ld.so.conf #ldconfig然后重新启动服务项目。
3安装前端开发:
3.1配备nginx
#vim/usr/local/nginx/conf/nginx.conf server{ listen80; server_namelocalhost; proxy_buffer_size129k; proxy_buffers3232k; client_header_buffer_size64k; large_client_header_buffers8129k; access_log/usr/local/nginx/logs/zabbix.access.logmain; error_log/usr/local/nginx/logs/zabbix.error.logerror; location/{ roothtml; indexindex.phpindex.htm; } error_page500502503504/50x.html; location=/50x.html{ roothtml; } location~\.php${ fastcgi_buffer_size129k; fastcgi_buffers3232k; fastcgi_passunix:/var/run/php-fpm/php-fpm.sock; fastcgi_indexindex.php; fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name; includefastcgi_params; includefastcgi.conf; } }注意:去掉上面log_format的注释。
3.2配备PHP
#vim/etc/php.ini max_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: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=353.3复制静态数据文档
#rm-rf/usr/local/nginx/html/* #cp-rf/home/zabbix-4.0.4/frontends/php/*/usr/local/nginx/html/ #chown-Rnobody.nobody/usr/local/nginx/html3.4配备前端开发
浏览已部署服务的详细网址。
请安装缺失的控制模块进行检查。在DVD2中查找相对rpm包进行安装,重启PHP-fpm(kill-usr2PHP-fpm:master的pid)。
配有数据库查询
配备网络服务器
进行安装。
默认登录名:Admin,登录密码:zabbix
摘要
以上是我给大家详细介绍的zabbix4.04安装文本文档(根据CentOS7.6)的示例教程的详细讲解。我期待着给你一些帮助。如果你有任何感兴趣的人在我的留言板上留言,我会立即回复你。在此,我也要感谢大家对你们网站的申请!
如果觉得文章对你有帮助,热烈欢迎删减,请注明出处,谢谢!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)