码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix部署

时间:2018-08-03 14:14:31      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:fastcgi   rip   make   zab   sql   freetype   def   post   string   

1 nginx

./configure --prefix=/app/nginx --with-http_ssl_module --with-http_stub_status_module --with-pcre
make && make install
location ~ \.php$ {
    root           /data/jab.com/;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
}
#修改conf配置

  

2 mariadb

yum -y install mariadb mariadb-serve
mysqladmin -uroot password root
 create database zabbix default charset utf8;

  

3 php

yum install -y bzip* *libxml2* libjpeg-devel libpng-devel freetype-devel libcurl*
./configure  --prefix=/app/php-5.6.36 --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath
cp php.ini-development /app/php-5.6.36/lib/php.ini
cd /app/php-5.6.36/etc
cp php-fpm.conf.default php-fpm.conf
 max_execution_time = 300
 memory_limit = 128M
 post_max_size = 16M
 upload_max_filesize = 2M
 max_input_time = 300
 date.timezone PRC
 always_populate_raw_post_data = -1
#php.ini中zabbix的配置要求

  

 

4 zabbix

yum install net-snmp-devel mysql-devel libevent* -y
./configure --prefix=/app/zabbix/ --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml
groupadd zabbix
useradd -g zabbix zabbix
mysql -uroot -proot zabbix < database/mysql/schema.sql
mysql -uroot -proot zabbix < database/mysql/images.sql
mysql -uroot -proot zabbix < database/mysql/data.sql
DBName=zabbix
DBUser=root
DBPassword=root
DBPort=3306
#修改zabbix服务端配置文件
cp -a /data/zabbix-3.4.11/frontends/php/* /app/nginx/html/
#把前端文件cp到nginx

 

5 部署zabbix

进ip/index.php就可以进行配置了。

 

zabbix部署

标签:fastcgi   rip   make   zab   sql   freetype   def   post   string   

原文地址:https://www.cnblogs.com/jabbok/p/9413391.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!