日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

Centos6.6安装zabbix server 3.2

發(fā)布時間:2025/7/14 79 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Centos6.6安装zabbix server 3.2 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

2019獨角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>

Centos6.6安裝zabbix server 3.2

mysql,php,tengine 安裝包和表分區(qū)腳本下載:https://pan.baidu.com/s/1o80fF8A

1.服務(wù)器信息

ip:192.168.106.149

關(guān)閉selinux,iptables

# setenforce 0

# service iptables stop && chkconfig iptables off

安裝epel源

# yum install epel-release -y

安裝依賴包

# yum install mysql-devel libcurl-devel libxml2-devel net-snmp-devel java-1.8.0-openjdk java-1.8.0-openjdk-devel -y

修改時區(qū)

# \cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

2. 安裝zabix server 3.2.3

下載并編譯安裝 zabbix server 3.2.3

# mkdir -p /data/packages && cd /data/packages && wget https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.3/zabbix-3.2.3.tar.gz && tar xzvf zabbix-3.2.3.tar.gz && cd zabbix-3.2.3

# ./configure --prefix=/data/app/zabbix3.2.3/ --with-mysql --enable-server --enable-agent --enable-java --with-net-snmp --with-libcurl --with-libxml2

# make install

# cp misc/init.d/fedora/core5/zabbix_server /etc/init.d/

# chmod 755 /etc/init.d/zabbix_server

# sed -i 's/\/usr\/local\/sbin\/zabbix_server/\/data\/app\/zabbix3.2.3\/sbin\/zabbix_server/' /etc/init.d/zabbix_server

添加zabbix用戶

# useradd -s /sbin/nologin zabbix

修改zabbix server配置文件

# vi /data/app/zabbix3.2.3/etc/zabbix_server.conf

略,請執(zhí)行調(diào)整修改

啟動zabbix server

# service zabbix_server start

查看zabbix server狀態(tài)

# service zabbix_server status

zabbix_server (pid 82433 82432 82431 82430 82425 82424 82423 82422 82418 82417 82416 82415 82414 82411 82410 82409 82408 82407 82406 82405 82404 82403 82402 82401 82400 82399 82398 82396) is running...

安裝mysql 5.6

# tar xzvf mysql-5.6_install_scripts.tar.gz && cd mysql-5.6

# sh install.sh

# mysql -e "create database zabbix"

# mysql -e "grant all privileges on *.* to zabbix@'%' identified by 'zabbixpassword';"

依次導(dǎo)入結(jié)構(gòu)和數(shù)據(jù)

# mysql zabbix < /data/packages/zabbix-3.2.3/database/mysql/schema.sql

# mysql zabbix < /data/packages/zabbix-3.2.3/database/mysql/images.sql

# mysql zabbix < /data/packages/zabbix-3.2.3/database/mysql/data.sql

修改root密碼

# mysql mysql -e "update user set password=password('password') where user='root';flush privileges;"

安裝前端

# cp -a /data/packages/zabbix-3.2.3/frontends/php /data/app/zabbix3.2.3/

上傳tengine和php安裝包,不要使用yum安裝,yum安裝php版本過低,不受支持

# tar xzvf php.tar.gz

# tar xzvf tengine-2.1.tar.gz

# cd php-5.6.10/ && sh install-php-5.6.10.sh

# cd .. && tar xzvf tengine-2.1.tar.gz && install.sh

# ldconfig

# cd /data/app/tengine/conf/vhost/

配置nginx站點,注意根據(jù)訪問的域名修改server_name

# vi zabbix.conf

server{listen 80;server_name 192.168.106.149;access_log /data/app/tengine/logs/zabbix.access;error_log /data/app/tengine/logs/zabbix.error error;location ~ .php$ {root /data/app/zabbix3.2.3/php;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}location / {root /data/app/zabbix3.2.3/php;index index.php;} }

啟動php-fpm

# php-fpm

啟動nginx

# nginx -t && nginx

訪問http://192.168.106.149/安裝前端 發(fā)現(xiàn)報了一堆php參數(shù)錯誤

修改php.ini中如下參數(shù)

# vi /data/app/php/etc/php.ini

post_max_size = 16M max_execution_time = 300 max_input_time = 300 date.timezone = Asia/Shanghai always_populate_raw_post_data = -1

重啟php-fpm

# killall php-fpm && php-fpm

繼續(xù)配置zabbix前端

###表分區(qū)

執(zhí)行腳本生成創(chuàng)建表分區(qū)sql

# sh showsql.sh

crontab腳本每天自動去創(chuàng)建分區(qū)

# sh add_partition.sh

轉(zhuǎn)載于:https://my.oschina.net/u/1791060/blog/814077

總結(jié)

以上是生活随笔為你收集整理的Centos6.6安装zabbix server 3.2的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。