首页 > 代码库 > Zabbix 服务端安装

Zabbix 服务端安装

1. 安装 Zabbix 服务端

rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmyum install -y mysql mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent           service mysqld startmysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;"                  mysql -uroot -e "grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘;" mysql -uroot zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/schema.sql               mysql -uroot zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/images.sqlmysql -uroot zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/data.sqlsed -i s/# DBPassword=/DBPassword=zabbix/g /etc/zabbix/zabbix_server.conf    sed -i s#;date.timezone =#date.timezone = Asia/Shanghai#g /etc/php.inicat >> /etc/php.ini << EOFphp_value max_execution_time 300php_value memory_limit 128Mphp_value post_max_size 16Mphp_value upload_max_filesize 2Mphp_value max_input_time 300EOF
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate us.pool.ntp.org
chkconfig httpd on
chkconfig mysqld on
chkconfig zabbix-server on
chkconfig zabbix-agent on
/etc/init.d/zabbix-server start
/etc/init.d/zabbix-agent start
/etc/init.d/httpd start
iptables -F
setenforce 0

 

2. 安装 Zabbix 控制台

访问:http://yourIP/zabbix

 

Zabbix 服务端安装