基于LNMP的Zabbbix之Zabbix Server源码详细安装,但不给图
2016-09-01 09:56
543 查看
Zabbix Server安装
看到那里有错或者有什么问题的话,求指点
邮箱:losbyday@163.com
上一篇PHP源码安装参见基于LNMP的Zabbbix之PHP源码安装:https://i.cnblogs.com/EditPosts.aspx?postid=5828058
关于zabbix详细:http://www.iyunv.com/thread-179791-1-1.html
Begin
#建立一个用于zabbix的用户
#到官网找到Zabbix Server源码安装包
#MySQL导入SQL语句
#按照SQL语句顺序导入SQL:
#修改/usr/local/zabbix/etc/zabbix_server.conf
#修改php.ini ------PHP option
#重启php-fpm服务
#zabbix提供init.d脚本
#将前端文件拷贝到nginx站点目录下
#修改Nginx的配置文件
我的nginx.conf如下
install java-jdk for linux
------------------------MySQL导入SQL语句错误 3----------------------------------------
#Warning: Using a password on the command line interface can be insecure.
#ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
------------------------打开网页出现403错误 4----------------------------------------
403有很多原因,查看logs有( FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream)
错误解决方法:在Nginx配置文件中找到定义调用脚本文件的地方
提示:$document_root 代表当前请求在root指令中指定的值。
------------------------nginx日志中还看到下面那个错误 5-------------------------------
open() “/usr/local/nginx/html/favicon.ico” failed (2: No such file or directory)
只需要关闭 favicon.ico 的 log:
-----------------------nginx日志中还看到下面那个错误 6-------------------------------
-2016/09/01 11:05:15 [error] 118206#118206: *1 FastCGI sent in stderr: "PHP message: PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/index.php on line 2" while reading response header from upstream, client: 192.168.1.209, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/phpfpm.sock:", host: "192.168.1.5"
解决方法:
在php.ini里加上
date.timezone = "Asia/Shanghai"(去掉前面的;)
-----------------------zabbix 服务启动错误 7-------------------------------
[root@localhost mysql]# /usr/local/zabbix/sbin/zabbix_server
/usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries:
libmysqlclient.so.18: cannot open shared object file: No such file or directory
------------------------Nginx 错误汇总:http://blog.csdn.net/cjfeii/article/details/49511829
------------------------zabbix密码修改:http://www.361way.com/zabbix-change-passord/3652.html
------------------------本文参考:
记录一次基于LNMP环境下的Zabbix3.0部署:http://www.tuicool.com/articles/ZJfYzyF
Zabbix安装图解教程:http://www.osyunwei.com/archives/7984.html
看到那里有错或者有什么问题的话,求指点
邮箱:losbyday@163.com
上一篇PHP源码安装参见基于LNMP的Zabbbix之PHP源码安装:https://i.cnblogs.com/EditPosts.aspx?postid=5828058
关于zabbix详细:http://www.iyunv.com/thread-179791-1-1.html
Begin
#建立一个用于zabbix的用户
useradd zabbix passwd zabbix #我的密码123看个人
#到官网找到Zabbix Server源码安装包
wget http://120.52.73.49/tenet.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.3/zabbix-3.0.3.tar.gz tar -zxvf zabbix-3.0.3.tar.gz cd zabbix-3.0.3 ./configure --prefix=/usr/local/zabbix/ --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --enable-java make && make install
#MySQL导入SQL语句
mysql -uroot -e"create database zabbix character set utf8 collate utf8_bin;" mysql -uroot -e"grant all privileges on zabbix.* to zabbix@'%' identified by 'losnau';" mysql -uroot -e"flush privileges;"
#按照SQL语句顺序导入SQL:
mysql -uzabbix -plosnau zabbix < /usr/local/setup/zabbix-3.0.3/database/mysql/schema.sql mysql -uzabbix -plosnau zabbix < /usr/local/setup/zabbix-3.0.3/database/mysql/images.sql mysql -uzabbix -plosnau zabbix < /usr/local/setup/zabbix-3.0.3/database/mysql/data.sql
#修改/usr/local/zabbix/etc/zabbix_server.conf
DBName=zabbix #数据库名称 DBUser=zabbix #数据库用户名 DBPassword=losnau #数据库密码 ListenIP=192.168.1.5 #数据库ip地址 AlertScriptsPath=${datadir}/zabbix/alertscripts #zabbix运行脚本存放目录
#修改php.ini ------PHP option
post_max_size 16M max_execution_time 300 max_input_time = 300 # zone Asia/Shanghai
#重启php-fpm服务
ps aux |grep php #查看php-fpm是否开启 #如果开启就 ps aux |grep php-fpm |xargs kill -9 # 关闭啦 cp /usr/local/php/sbin/php-fpm /usr/bin #^_^ php-fmp #启动php-fpm服务
#zabbix提供init.d脚本
cp misc/init.d/tru64/zabbix_* /etc/init.d/ chmod +x /etc/init.d/zabbix_*
#将前端文件拷贝到nginx站点目录下
cd /usr/local/setup/zabbix-3.0.3/frontends #进入zabbix解压缩目录 cp -rf php /www #将解压缩的zabbix里面php文件拷贝到nginx的root目录下
#修改Nginx的配置文件
我的nginx.conf如下
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz mkdir /usr/local/java tar zxvf jdk-8u20-linux-x64.tar.gz -C /usr/local/java/ echo "JAVA_HOME=/usr/local/java/jdk1.8.0_20/ JRE_HOME=/usr/local/java/jre PATH=\$JAVA_HOME/bin:\$PATH:\$JRE_HOME/bin CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar:\$JRE_HOME/lib export JAVA_HOME JRE_HOME PATH CLASSPATH" >> /etc/profile source /etc/profile java -version
install java-jdk for linux
------------------------MySQL导入SQL语句错误 3----------------------------------------
#Warning: Using a password on the command line interface can be insecure.
#ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
mysql -uroot -e"delete from user where user=' ';" mysql -uroot -e"flush privileges;"
------------------------打开网页出现403错误 4----------------------------------------
403有很多原因,查看logs有( FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream)
错误解决方法:在Nginx配置文件中找到定义调用脚本文件的地方
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; #注释 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #添加
提示:$document_root 代表当前请求在root指令中指定的值。
------------------------nginx日志中还看到下面那个错误 5-------------------------------
open() “/usr/local/nginx/html/favicon.ico” failed (2: No such file or directory)
只需要关闭 favicon.ico 的 log:
location = /favicon.ico { log_not_found off; access_log off; }
-----------------------nginx日志中还看到下面那个错误 6-------------------------------
-2016/09/01 11:05:15 [error] 118206#118206: *1 FastCGI sent in stderr: "PHP message: PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/index.php on line 2" while reading response header from upstream, client: 192.168.1.209, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/phpfpm.sock:", host: "192.168.1.5"
解决方法:
在php.ini里加上
date.timezone = "Asia/Shanghai"(去掉前面的;)
-----------------------zabbix 服务启动错误 7-------------------------------
[root@localhost mysql]# /usr/local/zabbix/sbin/zabbix_server
/usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries:
libmysqlclient.so.18: cannot open shared object file: No such file or directory
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/ # 如果是32位系统需要做连接到/usr/lib/下 64位放到lib64
------------------------Nginx 错误汇总:http://blog.csdn.net/cjfeii/article/details/49511829
------------------------zabbix密码修改:http://www.361way.com/zabbix-change-passord/3652.html
------------------------本文参考:
记录一次基于LNMP环境下的Zabbix3.0部署:http://www.tuicool.com/articles/ZJfYzyF
Zabbix安装图解教程:http://www.osyunwei.com/archives/7984.html
相关文章推荐
- 基于LNMP的Zabbbix之Zabbix Agent源码详细安装,但不给图
- 基于LNMP的Zabbbix之PHP源码安装
- zabbix监控之Centos基于LNMP环境安装
- 基于LNMP环境的Zabbix监控安装
- lnmp源码编译安装zabbix
- 一键源码安装,支持多版本LNMP_Server_install_scripts 源码安装
- 源码编译安装LNMP环境及配置基于域名访问的多虚拟主机
- lnmp环境下源码安装zabbix-3.0.1
- linux源码安装zabbix_server
- 基于Ubuntu14.04 Zabbix2.2.15(版本) Server端 安装
- centOS6.5 源码编译安装zabbix-server
- 脚本安装zabbix2.4(#2.2),基于centos6.6 basic server
- 从源码安装使用Oracle数据库的Zabbix_server
- 1、zabbix 3.2.6 server端(源码包)安装部署 (一)
- 基于centos5.8源码安装nginx之LNMP
- Zabbix2.2+LNMP源码安装
- Zabbix源码安装(LNMP)
- Zabbix3.0.4源码安装(server端与agent端)
- 源码安装zabbix LNMP源码安装
- CentOS7 源码编译安装稳定LNMP环境 支持Zabbix