码迷,mamicode.com
首页 > 其他好文 > 详细

Zabbix 服务端安装

时间:2017-08-04 10:07:02      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:php.ini   password   schema   rpm   root   class   config   ice   enforce   

1. 安装 Zabbix 服务端

rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum install -y mysql mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent           
service mysqld start
mysql -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.sql
mysql -uroot zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/data.sql
sed -i s/# DBPassword=/DBPassword=zabbix/g /etc/zabbix/zabbix_server.conf    
sed -i s#;date.timezone =#date.timezone = Asia/Shanghai#g /etc/php.ini
cat >> /etc/php.ini << EOF
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
EOF
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 服务端安装

标签:php.ini   password   schema   rpm   root   class   config   ice   enforce   

原文地址:http://www.cnblogs.com/pzk7788/p/7283103.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!