日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

zabbix 3.0 完全安装全解!

發(fā)布時間:2023/11/27 生活经验 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 zabbix 3.0 完全安装全解! 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
  • 環(huán)境準備:
    • centos 6.5 x86_x64
  • 安裝依賴庫文件
    • yum -y install mysql-devel net-snmp-devel curl curl-devel?gcc pcre-devel libpng-devel libjpeg-devel?libxml2-devel?freetype-devel
  • 準備軟件
    • nginx-1.11.5.tar ,php-5.4.101 ,zabbix-3.2.1.tar ,freetype-2.5.3.tar
  • 安裝軟件
[root@localhost ~]#groupadd mysql
[root@localhost ~]#useradd -g mysql mysql -M -s /sbin/nologin 
  • 安裝mysql:

?

yum -y install mysql-server php-mysql

?

  • 添加nginx用戶:

?

[root@localhost ~]#groupadd nginx
[root@localhost ~]#useradd -g nginx nginx -M -s /sbin/nologin

?

  • 安裝nginx:  
[root@localhost ~]# cd /tmp/
[root@localhost tmp]# tar zxvf nginx-1.11.5.tar.gz 
[root@localhost tmp]# cd nginx-1.11.5
[root@localhost nginx-1.11.5]# ./configure --prefix=/usr/local/nginx  --user=nginx --group=nginx
[root@localhost nginx-1.11.5]#make && make install
  • 安裝freetype:
[root@localhost tmp]# tar zxvf freetype-2.5.3.tar.gz
[root@localhost tmp]# cd freetype-2.5.3
[root@localhost freetype-2.5.3]# ./configure --prefix=/usr/local/freetype
[root@localhost freetype-2.5.3]# make && make install
  • 安裝php:
[root@localhost tmp]# tar zxvf php-5.4.101.tar
[root@localhost php-5.4.10]# ./configure --prefix=/usr/local/php --enable-fpm \--enable-mbstring --with-gettext \--with-zlib --enable-sockets \--with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli \--with-gd --with-jpeg-dir --enable-bcmath --with-freetype-dir=/usr/local/freetype/[root@localhost php-5.4.10]# make && make install
  • 安裝zabbix

?

[root@localhost tmp]# tar zxvf zabbix-3.2.1.tar.gz 
[root@localhost tmp]#./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
[root@localhost tmp]#make && make install
  • 編輯修改zabbix配置文件,配置zabbix_server?

?

[root@localhost zabbix-3.2.1]# vim /usr/local/zabbix/etc/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
Timeout=30
[root@localhost zabbix-3.2.1]# vim /usr/local/zabbix/etc/zabbix_agentd.conf
Server=zabbix-server
ServerActive=zabbix-server
Hostname=zabbix-server   #必須與web頁面添加主機名一致

  

?

?

  • 建立zabbix數(shù)據(jù)庫并導入數(shù)據(jù)文件

?

[root@localhost zabbix-3.2.1]# service mysqld start
mysql  進入MySQL控制臺 
create database zabbix character set utf8; #創(chuàng)建數(shù)據(jù)庫zabbix,并且數(shù)據(jù)庫編碼使用utf8 
GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY 'zabbix' WITH GRANT OPTION; #新建賬戶zabbix,密碼zabbix
flush privileges; #再次刷新系統(tǒng)授權(quán)表 
grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix' with grant option; #允許賬戶zabbix能從本機連接到數(shù)據(jù)庫zabbix 
flush privileges; #再次刷新系統(tǒng)授權(quán)表 
use zabbix #進入數(shù)據(jù)庫,并刷新數(shù)據(jù)庫,一定要按照sql文件順序 
source  /tmp/zabbix-3.2.1/database/mysql/schema.sql #導入腳本文件到zabbix數(shù)據(jù)庫 
source  /tmp/zabbix-3.2.1/database/mysql/images.sql #導入腳本文件到zabbix數(shù)據(jù)庫 
source  /tmp/zabbix-3.2.1/database/mysql/data.sql #導入腳本文件到zabbix數(shù)據(jù)庫
  • 建立web站點目錄配置
[root@localhost mysql]# mkdir -p /var/www/html/zabbix
[root@localhost mysql]# cd /tmp/zabbix-3.2.1/frontends/
[root@localhost frontends]# cp -rf php/* /var/www/html/zabbix/
  • 配置PHP.conf
[root@localhost sbin]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
  • 啟動服務[root@localhost sbin]# /usr/local/php/sbin/php-fpm  [root@localhost sbin]#/usr/local/nginx/sbin/nginx  配置nginx的conf文件
  •  1 [root@localhost sbin]#vim /usr/local/nginx/conf/nginx.conf
     2     location / {
     3     root /var/www/html/zabbix;
     4     index index.html index.htm index.php;
     5     }
     6     location ~ \.php$ {
     7     fastcgi_buffer_size 128k;
     8     fastcgi_buffers 32 32k;
     9     root /var/www/html/zabbix;
    10     fastcgi_pass 127.0.0.1:9000;
    11     fastcgi_index index.php;
    12     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    13     include fastcgi_params;
    14 }   #注:紅色部分表示修改部分
    View Code 
  • 添加php.ini
  • [root@localhost sbin]# cp /tmp/php-5.4.10/php.ini-production /usr/local/php/lib/php.ini

指定zabbix的配置配置文件

  • [root@localhost sbin]#/usr/local/zabbix/sbin/zabbix_server -c ?/usr/local/zabbix/etc/zabbix_server.conf
  • [root@localhost sbin]#/usr/local/zabbix/sbin/zabbix_agentd -c ?/usr/local/zabbix/etc/zabbix_agentd.conf

?

轉(zhuǎn)載于:https://www.cnblogs.com/powpoia/p/5991221.html

總結(jié)

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

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