zhangleivod 发表于 2017-10-12 16:00:46

zabbix3.4 安装步骤

Zabbix3.4 安装步骤

static/image/hrline/4.gifstatic/image/hrline/4.gif

内容摘录至zabbix官网文档 (https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/rhel_centos)


测试系统环境:CentOS Linux release 7.3.1611 (Core)


安装步骤如下:

Repository installation


# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm   rpm安装zabbix的yum源


Server installation


# yum install zabbix-server-mysql zabbix-web-mysql
# yum install mariadb-server -y                            安装mariadb数据库
# mysqladmin -uroot password '<password>'                设置数据库的root密码
# mysql -uroot -p<password>                                               
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit
#zcat /usr/share/doc/zabbix-server-mysql-3.4.0/create.sql.gz | mysql -uzabbix -p zabbix   导入zabbix所需要的表


Configure database for Zabbix server
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>


#systemctl start zabbix-server
注意关闭selinux,否则启动报错
关闭selinux:
# setenforce 0
vi /etc/sysconfig/selinux
        # This file controls the state of SELinux on the system.
        # SELINUX= can take one of these three values:
        #   enforcing - SELinux security policy is enforced.
        #   permissive - SELinux prints warnings instead of enforcing.
        #   disabled - No SELinux policy is loaded.
        SELINUX=permissive                            将此处的SELINUX=enforcing为permissive
        # SELINUXTYPE= can take one of three two values:
        #   targeted - Targeted processes are protected,
        #   minimum - Modification of targeted policy. Only selected processes are protected.
        #   mls - Multi Level Security protection.
        SELINUXTYPE=targeted
查看是否修改成功:
getenforce(sestatus),如:
        # sestatus
        # sestatus
        SELinux status:               enabled
        SELinuxfs mount:                /sys/fs/selinux
        SELinux root directory:         /etc/selinux
        Loaded policy name:             targeted
        Current mode:                   permissive
        Mode from config file:          permissive
        Policy MLS status:            enabled
        Policy deny_unknown status:   allowed
        Max kernel policy version:      28




PHP configuration for Zabbix frontend


        php_value max_execution_time 300
        php_value memory_limit 128M
        php_value post_max_size 16M
        php_value upload_max_filesize 2M
        php_value max_input_time 300
        php_value always_populate_raw_post_data -1
        php_value date.timezone Asia/Shanghai      此处为自己修改的时区


#systemctl start httpd


http://<server_ip_or_name>/zabbix 进行前端配置安装,zabbix默认的用户为Admin,密码为zabbix


Agent installation   (不要忘记此处需要安装Agent,Agent使用监控主机的代理服务)
# yum install zabbix-agent
# service zabbix-agent start

注意:在后面的创建Item过程中,选择Key时,要将选择的system.cpu.load[<cpu>,<mode>]的key值修改成system.cpu.load,否则会报Invalid first parameter的错误。

IT继续民工 发表于 2017-10-14 14:29:41

现在运维的网络中用的是3.2,学习了

genricky 发表于 2017-10-16 10:48:47

谢谢楼主分享

zhangleivod 发表于 2018-1-25 10:55:46

yum install -y httpd mysql mysql-server mysql-devel php php-mysql php-common php-mbstring php-gd php-odbc php-xml php-pear libXpm php-bcmath php-gd t1lib

2008小周 发表于 2018-10-19 17:34:22

谢谢楼主分享!
页: [1]
查看完整版本: zabbix3.4 安装步骤