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

Centos_install_zabbix-3.2.6

时间:2017-06-23 00:44:51      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:alarm   word   table   help   bin   interface   recover   session   event   

[root@zabbix-server ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@zabbix-server ~]# uname -r
3.10.0-327.el7.x86_64

 

[root@template ~]# hostname zabbix-server

[root@template ~]# hostnamectl set-hostname zabbix-server

[root@template ~]# hostname
zabbix-server

[root@template ~]# vi /etc/hosts

[root@template ~]# cd /home/nulige/tools/

[root@zabbix-server tools]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

[root@zabbix-server tools]# ll /etc/yum.repos.d/
total 44
-rw-r--r--. 1 root root 2573 May 15 2015 CentOS-Base.repo
-rw-r--r--. 1 root root 1664 Dec 9 2015 CentOS-Base.repo.backup
-rw-r--r--. 1 root root 1309 Dec 9 2015 CentOS-CR.repo
-rw-r--r--. 1 root root 649 Dec 9 2015 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 290 Dec 9 2015 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 Dec 9 2015 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Dec 9 2015 CentOS-Sources.repo
-rw-r--r--. 1 root root 1952 Dec 9 2015 CentOS-Vault.repo
-rw-r--r--. 1 root root 957 Dec 28 01:37 epel.repo
-rw-r--r--. 1 root root 1056 Dec 28 01:37 epel-testing.repo
-rw-r--r-- 1 root root 410 Sep 14 2016 zabbix.repo

 

[root@zabbix-server tools]# yum install zabbix-server-mysql zabbix-web-mysql -y


[root@zabbix-server tools]# rpm -qa |grep mariadb
mariadb-libs-5.5.44-2.el7.centos.x86_64

 

[root@zabbix-server tools]# yum install mariadb-server -y


[root@zabbix-server tools]# systemctl start mariadb


[root@zabbix-server tools]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>

 

 

#创建数据库
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by ‘<123456>‘;
flush privileges;

MariaDB [(none)]> exit
Bye

 

#zabbix password
<123456>‘

 

#导入数据库
[root@zabbix-server tools]# zcat /usr/share/doc/zabbix-server-mysql-3.2.6/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:

#查看数据库
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
| zabbix |
+--------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]> use zabbix
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| application_template |
| applications |
| auditlog |
| auditlog_details |
| autoreg_host |
| conditions |
| config |
| corr_condition |
| corr_condition_group |
| corr_condition_tag |
| corr_condition_tagpair |
| corr_condition_tagvalue |
| corr_operation |
| correlation |
| dbversion |
| dchecks |
| dhosts |
| drules |
| dservices |
| escalations |
| event_recovery |
| event_tag |
| events |
| expressions |
| functions |
| globalmacro |
| globalvars |
| graph_discovery |
| graph_theme |
| graphs |
| graphs_items |
| group_discovery |
| group_prototype |
| groups |
| history |
| history_log |
| history_str |
| history_text |
| history_uint |
| host_discovery |
| host_inventory |
| hostmacro |
| hosts |
| hosts_groups |
| hosts_templates |
| housekeeper |
| httpstep |
| httpstepitem |
| httptest |
| httptestitem |
| icon_map |
| icon_mapping |
| ids |
| images |
| interface |
| interface_discovery |
| item_application_prototype |
| item_condition |
| item_discovery |
| items |
| items_applications |
| maintenances |
| maintenances_groups |
| maintenances_hosts |
| maintenances_windows |
| mappings |
| media |
| media_type |
| opcommand |
| opcommand_grp |
| opcommand_hst |
| opconditions |
| operations |
| opgroup |
| opinventory |
| opmessage |
| opmessage_grp |
| opmessage_usr |
| optemplate |
| problem |
| problem_tag |
| profiles |
| proxy_autoreg_host |
| proxy_dhistory |
| proxy_history |
| regexps |
| rights |
| screen_user |
| screen_usrgrp |
| screens |
| screens_items |
| scripts |
| service_alarms |
| services |
| services_links |
| services_times |
| sessions |
| slides |
| slideshow_user |
| slideshow_usrgrp |
| slideshows |
| sysmap_element_url |
| sysmap_url |
| sysmap_user |
| sysmap_usrgrp |
| sysmaps |
| sysmaps_elements |
| sysmaps_link_triggers |
| sysmaps_links |
| task |
| task_close_problem |
| timeperiods |
| trends |
| trends_uint |
| trigger_depends |
| trigger_discovery |
| trigger_tag |
| triggers |
| users |
| users_groups |
| usrgrp |
| valuemaps |
+----------------------------+
127 rows in set (0.00 sec)

MariaDB [zabbix]> exit
Bye

#配置database
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<123456>

#启动服务
systemctl start zabbix-server
systemctl enable zabbix-server

 

[root@zabbix-server tools]# cp /etc/php.ini /etc/php.ini.bak
[root@zabbix-server tools]# vi /etc/php.ini
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
always_populate_raw_post_data = -1
date.timezone = Asia/Shanghai


[root@zabbix-server tools]# getsebool
getsebool: SELinux is disabled

 

#启动apache
[root@zabbix-server tools]# systemctl start httpd

#访问网站
http://192.168.30.137/zabbix/setup.php

 技术分享

下一步,

技术分享

下一步,

技术分享

下一步,

技术分享

下一步,

技术分享

下一步,

技术分享

完成

技术分享

用户名:Admin

密码:zabbix

 

Centos_install_zabbix-3.2.6

标签:alarm   word   table   help   bin   interface   recover   session   event   

原文地址:http://www.cnblogs.com/nulige/p/7067817.html

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