zabiix搭建
1.LAMP的安裝及配置、Zabbix的安裝及配置[*]操作系統的選擇
CentOS 6.8 建議使用minimal desktop。
[*]安裝mysql
yum install –y mysql-serve編輯vim /etc/my.confcharacter-set-server=uft8innodb_file_per_table=1 啟動服務chkconfig mysqld onservice mysqld startb.安裝zabbix官方源和epel源rpm -ivhhttp://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpmrpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm或者在/etc/yum.repo.d/創建自定義yum源,內容如下name=Zabbix Official Repository - $basearchbaseurl=http://repo.zabbix.com/zabbix/2.2/rhel/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
name=Zabbix Official Repository non-supported - $basearchbaseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIXgpgcheck=1c.安裝Zabbix-Server
yum install -y zabbix zabbix-getzabbix-server zabbix-web-mysql zabbix-web (zabbix-agent)d.Mysql的配置
創建zabbix的數據庫
createdatabase zabbixcharacterset utf8;
grant allprivileges on zabbix.* to zabbix@localhost identified by ‘zabbix’;
flush privileges;
設置mysql的root密碼 mysqladmin –uroot password admin導入zabbix-server數據庫腳本source/usr/share/doc/zabbix-server-mysql-2.2.14/create/schema.sqlsource/usr/share/doc/zabbix-server-mysql-2.2.14/create/images.sqlsource/usr/share/doc/zabbix-server-mysql-2.2.14/create/data.sql
e.配置PHP由於剛剛在安裝zabbix-server已經安裝了依賴關係,因此PHP無需安裝,在/etc/php.ini設定檔中添加 date.timezone =Asia/Shanghai max_execution_time = 300 post_max_size = 16M max_input_time=300 memory_limit = 128M mbstring.func_overload = 2f. apache的安裝yum install –y httpd注意事項
1.防火牆打開埠10050,10051,80,222.Selinux的設置
页:
[1]