Zabbix配置
Posted 一只木头
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zabbix配置相关的知识,希望对你有一定的参考价值。
①环境准备:
cd /usr/local/src #设定文件下载路径
yum install openssh-server #安装ssh
编辑/etc/ssh下的配置文件sshd_config 将以下注释符号删除
1.关闭防火墙:
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
:wq! #保存退出
systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
3.关闭SELINUX
vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq! #保存退出
②软件库准备:
1、下载nginx(目前稳定版)
http://nginx.org/download/nginx-1.6.0.tar.gz
2、下载mysql
http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.19.tar.gz
3、下载php
http://cn2.php.net/distributions/php-5.5.14.tar.gz
4、下载pcre (支持nginx伪静态)
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz
5、下载openssl(nginx扩展)
http://www.openssl.org/source/openssl-1.0.1h.tar.gz
6、下载zlib(nginx扩展)
http://zlib.net/zlib-1.2.11.tar.gz
7、下载cmake(MySQL编译工具)
http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz
8、下载libmcrypt(php扩展)
http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
9、下载yasm(php扩展)
http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
10、t1lib(php扩展)
ftp://sunsite.unc.edu/pub/Linux/libs/graphics/t1lib-5.1.2.tar.gz
11、下载gd库安装包
https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz
12、libvpx(gd库需要)
https://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
13、tiff(gd库需要)
http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz
14、libpng(gd库需要)
ftp://ftp.simplesystems.org/pub/png/src/libpng16/libpng-1.6.12.tar.gz
15、freetype(gd库需要)
http://ring.u-toyama.ac.jp/archives/graphics/freetype/freetype2/freetype-2.5.3.tar.gz
16、jpegsrc(gd库需要)
http://www.ijg.org/files/jpegsrc.v9a.tar.gz
③安装编译工具及库文件(使用yum命令安装)
yum install -y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libxml* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel
以上是关于Zabbix配置的主要内容,如果未能解决你的问题,请参考以下文章