zabbix 3.0.3安装

zabbix v3.0.3

Required:
mysql version: 5.0.3 or later
oracle version: 10g or later
php version: 5.4.0 or later
gd version: 2.0 or later
libXML version: 2.6.15 or later

官方说明:https://www.zabbix.com/documentation/3.0/manual/installation/requirements

installation:

[[email protected] ~]# useradd -s /sbin/nologin nginx
nginx安装略
[[email protected] ~]# yum -y install gcc gcc-c++ make
[[email protected] ~]# yum -y install libxml2 libxml2-devel libjpeg-devel libpng-devel bzip2-devel libcurl-devel gd-devel
[[email protected] ~]# tar -zxf php-5.5.0.tar.gz
[[email protected] ~]# cd php-5.5.0
[[email protected] php-5.5.0]# ./configure --prefix=/usr/local/php --with-bz2 --with-curl --enable-ftp --enable-sockets --enable-bcmath --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local/photo --with-png-dir=/usr/local/photo --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
[[email protected] php-5.5.0]# make
[[email protected] php-5.5.0]# make test
[[email protected] php-5.5.0]# make install
[[email protected] php-5.5.0]# cp php.ini-production /usr/local/php/lib/php.ini
[[email protected] ~]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf    
[[email protected] ~]# sed -i ‘/max_execution_time/s/30/300/‘ /usr/local/php/lib/php.ini
[[email protected] ~]# sed -i ‘/post_max_size/s/8/16/‘ /usr/local/php/lib/php.ini
[[email protected] ~]# sed -i ‘/max_input_time/s/60/300/‘ /usr/local/php/lib/php.ini
[[email protected] ~]# sed -i ‘/^;date.timezone/adate.timezone \= \"Asia\/Shanghai\"‘ /usr/local/php/lib/php.ini
[[email protected] ~]# sed -i ‘/run\/php-fpm.pid/s/^;//g‘ /usr/local/php/etc/php-fpm.conf
[[email protected] ~]# sed -i ‘/^;pm.min_spare_servers/s/^;//g‘ /usr/local/php/etc/php-fpm.conf
[[email protected] ~]# sed -i ‘/^;pm.max_spare_servers/s/^;//g‘ /usr/local/php/etc/php-fpm.conf
[[email protected] ~]# sed -i ‘/^;pm.start_servers/s/^;//g‘ /usr/local/php/etc/php-fpm.conf
[[email protected] ~]# /usr/local/php/sbin/php-fpm
[[email protected] ~]# echo "/usr/local/php/sbin/php-fpm" >>/etc/rc.local

php yum安装:

[[email protected] ~]# yum -y install php55w php55w-mysql php55w-gd libjpeg* php55w-imap php55w-ldap php55w-odbc php55w-pear php55w-xml php55w-xmlrpc php55w-mbstring php55w-mcrypt php55w-bcmath php55w-mhash libmcrypt libmcrypt-devel php55w-fpm php55w-cli php55w-pdo php55w-tidy php55w-pecl-memcache php55w-eaccelerator

mysql安装:

[[email protected] ~]# yum -y install mysql mysql-server mysql-devel
[[email protected] ~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
[[email protected] ~]# chkconfig mysqld on
[[email protected] ~]# /etc/init.d/mysqld start
[[email protected] ~]# mysqladmin -uroot password "redhat"
[[email protected] ~]# mysql_secure_installation
[[email protected] ~]# yum -y install net-snmp net-snmp-devel libxml2-devel libcurl-devel
[[email protected] ~]# tar -zxf zabbix-3.0.3.tar.gz
[[email protected] ~]# cd zabbix-3.0.3
[[email protected] zabbix-3.0.3]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2  --enable-java
[[email protected] zabbix-3.0.3]# make && make install
[[email protected] zabbix-3.0.3]# useradd -s /sbin/nologin zabbix
[[email protected] ~]# mysql -uroot -predhat
mysql> create database zabbix default charset utf8;
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
mysql> flush privileges;
[[email protected] zabbix-3.0.3]# mysql -uzabbix -pzabbix zabbix < database/mysql/schema.sql
[[email protected] zabbix-3.0.3]# mysql -uzabbix -pzabbix zabbix < database/mysql/images.sql
[[email protected] zabbix-3.0.3]# mysql -uzabbix -pzabbix zabbix < database/mysql/data.sql
[[email protected] zabbix-3.0.3]# cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
[[email protected] zabbix-3.0.3]# chmod 775 /etc/init.d/zabbix_*
[[email protected] zabbix-3.0.3]# sed -i ‘/LogFile/s/tmp/var\/log\/zabbix/‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i ‘/^DBUser\=/s/root/zabbix/‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i ‘/DBPassword\=$/s/^#//g‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i ‘/DBPassword\=$/s/^[ \t]//g‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i ‘/DBPassword\=$/s/\=/&zabbix/g‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i -e ‘/DBPort\=/s/^#//g‘ /usr/local/zabbix/etc/zabbix_server.conf -e ‘/DBPort\=/s/^[ \t]//g‘ /usr/local/zabbix/etc/zabbix_server.conf
[[email protected] zabbix-3.0.3]# sed -i ‘/^Server/s/127.0.0.1/192.168.70.193/g‘ /usr/local/zabbix/etc/zabbix_agentd.conf
[[email protected] zabbix-3.0.3]# sed -i "/^ServerActive/s/127.0.0.1/192.168.70.193:10051/g" /usr/local/zabbix/etc/zabbix_agentd.conf
[[email protected] zabbix-3.0.3]# sed -i "/^Hostname/s/Zabbix server/192.168.70.193/g" /usr/local/zabbix/etc/zabbix_agentd.conf
[[email protected] zabbix-3.0.3]# mkdir /usr/local/nginx-1.6.3/html/zabbix -p
[[email protected] zabbix-3.0.3]# cp frontends/php/* /usr/local/nginx-1.6.3/html/zabbix/ -r
[[email protected] zabbix-3.0.3]# chown zabbix:zabbix /usr/local/nginx-1.6.3/html/zabbix/ -R
[[email protected] zabbix-3.0.3]# chmod o+w /usr/local/nginx-1.6.3/html/zabbix/conf
[[email protected] zabbix-3.0.3]# ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/
[[email protected] zabbix-3.0.3]# mkdir -p /var/log/zabbix
[[email protected] zabbix-3.0.3]# touch /var/log/zabbix/zabbix_server.log
[[email protected] zabbix-3.0.3]# chown zabbix:zabbix /var/log/zabbix/ -R
[[email protected] ~]# /etc/init.d/zabbix_server start
Starting zabbix_server:                                    [  OK  ]
[[email protected] ~]# /etc/init.d/zabbix_agentd start
Starting zabbix_agentd:                                    [  OK  ]
[[email protected] ~]#
[[email protected] ~]# chkconfig --add zabbix_server && chkconfig zabbix_server on
[[email protected] ~]# chkconfig --add zabbix_agentd && chkconfig zabbix_agentd on

zabbix nginx配置:

[[email protected] ~]# touch /usr/local/nginx-1.6.3/logs/zabbix_access.log
        location /zabbix {
                root /usr/local/nginx-1.6.3/html;
                index index.php;
                access_log      /usr/local/nginx-1.6.3/logs/zabbix_access.log;
                try_files $uri $uri/ /index.php?$args;
        }
        location ~ ^(.+.php)(.*)$ {
                root /usr/local/nginx-1.6.3/html;
                fastcgi_buffer_size 128k;
                fastcgi_buffers 32 32k;
                fastcgi_split_path_info ^(.+.php)(.*)$;
                include fastcgi.conf;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param  PATH_INFO          $fastcgi_path_info;
        }

配置完成后,启动php、mysql、zabbix、nginx

访问http://IP/zabbix/index.php

如果点下一步浏览器没反映,nginx和zabbix都未报错,可以通过修改配置文件绕过安装向导

[[email protected] ~]# cd /opt/server/nginx-1.2.5/html/zabbix/conf

[[email protected] conf]# cp zabbix.conf.php.example zabbix.conf.php

然后修改里面的配置,再次打开时就可以直接登录了,默认密码是admin/zabbix

安装完成.

时间: 2024-12-12 14:35:46

zabbix 3.0.3安装的相关文章

zabbix 3.0快速安装简介

zabbix快速安装 系统版本:centos 7 通过yum方法安装Zabbix3.0,安装源为阿里云 yum源配置 rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm 安装 yum install zabbix-server zabbix-agent zabbix-web zabbix-server-mysql zabbix-web-mysq

zabbix 3.0 编译安装到 oracle 数据库中 &nbsp; centos 6.6

基于centos 6.6  编译安装zabbix 3.0  数据存储到oracle中 因为服务器多了以后, 依赖mysql为后台的zabbix 性能明显会下降.那么我们将其安装到oracle中,以下是安装文档. 基础 : zabbix3.0.1 版本, php5.5     centos 6.6   oracle 11.204 安装httpd yum install httpd. 1. 要用 php55. https://oss.oracle.com/projects/php/files/EL6

zabbix 3.0.0beta1安装-centos6.8版本

zabbix 3.0安装 zabbix最低需要mysql 5.5 php5.3 查询mysql版本yum list installed | grep mysql##mysql-libs.x86_64 5.1.73-5.el6_6 @anaconda-CentOS-201508042137.x86_64/6.7 卸载mysqlyum remove mysql* 指定mysql源rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6

zabbix 3.0 完全安装全解!

环境准备: 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 安装软件 [[email pr

zabbix 3.0.3 安装

1:安装nginx 复制 zabbix 包下的 zabbix-3.0.3/frontends/php 到nginx 执行的程序目录 2:安装php php.ini: max_execution_time = 300max_input_time = 300 post_max_size = 16M always_populate_raw_post_data = -1 date.timezone = Asia/Shanghai extension_dir = "/opt/app/php/lib/php

zabbix 3.0.3 安装graphtree

1. 备份目前使用的/data/zabbix cp –a /data/zabbix /data/zabbix-backp 2. 下载graphtree,并上传到服务器/mnt/soft/zabbix-3.0.3/frontends/php/ https://raw.githubusercontent.com/OneOaaS/graphtrees/master/graphtree3-0-1.patch 3. 打补丁 cd /mnt/soft/zabbix-3.0.3/frontends/php/

zabbix 2.0.X安装

file /sbin/init #查看32/64位机器 uname -r#查看linxu版本 yum -y install gcc gcc-c++ autoconf httpd php mysql lrzsz mysql-server php-mysql httpd- manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php- xmlrpc php-bcmath mysql-c

CentOS6上编译安装ZABBIX 3.0

0x00  实验环境 系统:CentOS-6.8-x86_64 httpd:2.4.20 mysql:5.6.31 php:5.6.22 IP:10.0.0.4 0x01  编译安装zabbix3.0 1.下载zabbix源码包 [[email protected] src]# cd /usr/local/src/ [[email protected] src]# wget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Late

docker安装zabbix 4.0.1版本

容器化zabbix. 容器部署zabbix更简单 准备两台机器:192.168.22.200 zabbix-server192.168.22.8 zabbix-agent 软件版本:docker: 18.06.1-cezabbix: 4.0.1 安装docker可以使用阿里镜像源的repo安装:https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 开始部署zabbix:192.168.22.200上操作: [[email