CentOs7下Zabbix安装教程——准备工作

CentOs7下安装zabbix
关闭selinux
1.临时关闭(不用重启机器):
setenforce 0 设置SELinux 成为permissive模式
setenforce 1 设置SELinux 成为enforcing模式
2.修改配置文件需要重启机器:
Vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可

安装yum源
执行

rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

安装mysql
执行

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server

安装完成后重启mysql服务
systemctl restart mysqld.service
初次安装MySql,root账户没有密码

[root@localhost ~]# mysql -u root 
mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

设置密码

mysql> set password for 'root'@'localhost' =password('123456');
Query OK, 0 rows affected (0.03 sec)

退出

mysql> quit
Bye

修改mysql编码
mysql配置文件为/etc/my.cnf
vi /etc/my.cnf
最后加上编码配置
[mysql]
default-character-set =utf8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值