一、安装mysql

1.[root@iZ28gvqe4biZ ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

获取http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-release-el7-5    ################################# [100%]
 
2.查看mysql可安装资源
[root@localhost ~]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64       MySQL Connectors Community           60
mysql-tools-community/x86_64            MySQL Tools Community                69
mysql56-community/x86_64                MySQL 5.6 Community Server          412
3. yum 安装mysql 
 yum -y install mysql-community-server
 
4.加入开机启动
systemctl enable mysqld
 
5.启动mysql服务进程

 systemctl start mysqld

6.重置密码
[root@iZ28gvqe4biZ ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none):
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation. Set root password? [Y/n] y [设置root用户密码]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y [删除匿名用户]
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n [禁止root远程登录]
... skipping. By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y [删除test数据库]
- Dropping test database...
ERROR (HY000) at line : Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y [刷新权限]
... Success! All done! If you've completed all of the above steps, your MySQL
installation should now be secure. Thanks for using MySQL! Cleaning up...

二、 安装zabbix

1. 下载zabbix yum 源

rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

2.安装zabbix-agent和zabbix-server

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

3.zabbix数据导入mysql数据库

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

4.Edit file /etc/zabbix/zabbix_server.conf

DBPassword=zabbix

5.Configure PHP for Zabbix frontend

Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.

php_value date.timezone Asia/Shanghai

6.启动zabbix-server和zabbix-agent服务

# systemctl restart zabbix-server zabbix-agent httpd

7.开机启动 zabbix-server和zabbix-agent 、httpd

systemctl enable zabbix-server zabbix-agent httpd

8.查看端口

[root@zabbix conf]# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd          
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1819/dnsmasq       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1624/sshd          
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1617/cupsd         
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      15512/zabbix_agentd
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      15432/zabbix_server
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      127795/php-fpm: mas
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd          
tcp6       0      0 :::80                   :::*                    LISTEN      15535/httpd        
tcp6       0      0 :::22                   :::*                    LISTEN      1624/sshd          
tcp6       0      0 ::1:631                 :::*                    LISTEN      1617/cupsd         
tcp6       0      0 :::443                  :::*                    LISTEN      15535/httpd        
tcp6       0      0 :::10050                :::*                    LISTEN      15512/zabbix_agentd
tcp6       0      0 :::10051                :::*                    LISTEN      15432/zabbix_server
tcp6       0      0 :::3306                 :::*                    LISTEN      109944/mysqld      
udp        0      0 0.0.0.0:47631           0.0.0.0:*                           1191/avahi-daemon: 
udp        0      0 192.168.122.1:53        0.0.0.0:*                           1819/dnsmasq       
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1819/dnsmasq       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           12200/dhclient     
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1191/avahi-daemon: 
udp        0      0 0.0.0.0:39777           0.0.0.0:*                           12200/dhclient     
udp6       0      0 :::19528                :::*                                12200/dhclient 

9.在浏览器输入

http://server_ip_or_name/zabbix

10 快速在配置zabbix

默认用户admin, 密码zabbix

 

修改中文

常见问题:

主机名没有发现

配置文件:

设置主机名命令:

hostnamectl  set-hostname zabbixServer

vim   zabbix_agentd.conf

ServerActive=192.168.1.28,zabbixServer

Hostname=zabbixServer

解决乱码问:

https://www.cnblogs.com/momoshouhu/p/8053631.html

 

centos7 安装zabbix的更多相关文章

  1. CentOS7安装Zabbix

    一.Zabbix简介 Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. Zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系 ...

  2. centos7安装zabbix server5.0

    安装zabbix源 1.rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarc ...

  3. Centos7 安装 Zabbix Server 4.0

    官方参考URL:https://www.zabbix.com/documentation/4.0/start 1. 安装 Apache 2.4(略) 注意系统时间/时区ntp server是否定时同步 ...

  4. centos7安装ZABBIX 3.0+ 邮件报警【OK】

    设置主机名: vi /etc/hosts 10.0.0.252 zabbix-server hostnamectl set-hostname   关闭防火墙: systemctl stop firew ...

  5. RHEL7/CentOS7 安装Zabbix

    1.添加 Zabbix 软件仓库 rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.n ...

  6. centos7安装zabbix server

    1.参照下列网址方法,打开端口:80,3306,443,22,10050,10051(可能实际不需要打开这么多) https://www.cnblogs.com/lw-2019forlinuxpyth ...

  7. centos7安装zabbix客户端并监控

    zabbxi-agent安装及配置 1.安装zabbxi-agent yum install zabbix-agent -y 2.配置zabbxi-agent grep -n '^'[a-Z] /et ...

  8. (二)centos7安装zabbix agentd端

    关闭防火墙和selinux systemctl stop firewalld systemctl disable firewalld sed -ri '/^SELINUX=/cSELINUX=disa ...

  9. Centos7 安装 zabbix 4.0

    参考文档: https://www.zabbix.com/download?zabbix=4.0&os_distribution=centos&os_version=7&db= ...

随机推荐

  1. React篇-子组件调用父组件方法,并传值

    react 中子组件调用父组件的方法,通过props: 父组件: isNote(data){} <div className="tabC01"> <FTab ta ...

  2. php5.6+Redis+Windows7安装 (phpstudy)

    Windows下为PHP安装redis扩展 1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本. 2.下载php_igbinary-2.0.1-7.0-ts-vc14-x64.z ...

  3. MySQL深入理解

    [存储引擎] InnoDB表引擎 默认事务型引擎,最重要最广泛的存储引擎,性能非常优秀. 数据存储在共享表空间,可以通过配置分开. 对主键查询的性能高于其他类型的存储引擎. 内部做了很多优化,从磁盘读 ...

  4. Ajax 传包含集合的JSON

    通过ajax给后台传json对象,当json中含对象集合时,如 $.ajax({ url : , type : "POST", dataType : "json" ...

  5. python自动化系列

    1.pytnon环境及IDE 文件还是txt的,是如何查找到python 的呢? 是通过path查找的,且还按以下打印出的内容逐步查找的 mac版

  6. JAVA_POI 操作Excel

    转自: http://rensanning.iteye.com/blog/1538591# Apache POI 是用Java编写的免费开源的跨平台的 Java API,Apache POI提供API ...

  7. 编写一种递归方法,它返回数N的二进制中表示1的个数。

    /** * 编写一种递归方法,它返回数N的二进制中表示1的个数.利用这样一个事实:N为奇数,其1的个数为N/2的二进制中1的个数加1. * @author wulei * */public class ...

  8. struts2.0自定义类型转换

    在Struts2.0框架中内置了类型转换器,可以很方便的实现在八大数据类型.Date类型之间的自动转换:此外也可以根据自己的需求自定义数据转换类.如下: 首先看一下项目工程中的目录 1.在新建的web ...

  9. spark2.2.1 sql001

    package sql import org.apache.spark.sql.SparkSession import org.apache.spark.SparkContext object Par ...

  10. spark 关联source

    IDEA就自动把jar包中的字节码反编译为Java源码,并且,我们可以直接下个断点调试程序,但是对于Scala,IDEA的反编译效果并不是很好,如下图所示: 2)提示“Source not found ...