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

安装zabbix

时间:2018-04-21 10:13:30      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:系统运维;Linux;云计算;

安装 zabbix
yum -y install zabbix-web zabbix-web-mysql zabbix-agent mariadb-server zabbix-get zabbix-server-mysql httpd
#chkconfig mysqld on
#service mysqld start
systemctl start mariadb
#mysqladmin -uroot password 123
#mysql -u root -p123
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘;
mysql> flush privileges;
mysql> \q

导入zabbix表
#cd /usr/share/doc/zabbix-server-mysql-2.4.6/create/
mysql -uzabbix -pzabbix zabbix < schema.sql
#mysql -uzabbix -pzabbix zabbix < images.sql
#mysql -uzabbix -pzabbix zabbix < data.sql
zcat create.sql.gz
zcat create.sql.gz | mysql -D zabbix
cd /usr/share/doc/zabbix-server-mysql-3.2.11/
#gunzip create.sql.gz
#mysql -u zabbix -pzabbix -D zabbix < create.sql

配置zabbix连接数据库
#vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

#service zabbix-server start
Starting Zabbix server: [ OK ]
chkconfig zabbix-server on
/bin/systemctl start zabbix-server.service

vim /etc/httpd/conf.d/zabbix.conf
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None

<IfModule mod_authz_core.c>
  # Apache 2.4
  Require all granted
</IfModule>

<IfModule !mod_authz_core.c>
  # Apache 2.2
  Order allow,deny
  Allow from all
 </IfModule>
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 date.timezone Asia/Shanghai

</Directory>

#service httpd restart
service zabbix-server restart

安装zabbix

标签:系统运维;Linux;云计算;

原文地址:http://blog.51cto.com/13553337/2106013

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