stanleyyylau / linux-project

第二阶段大作业
0 stars 0 forks source link

郑龙捷 操作记录 #3

Open stanleyyylau opened 7 years ago

stanleyyylau commented 7 years ago

机器:184 操作:安装zabbix监控

然后你做的啥操作,记录下载

机器:185 操作:安装数据库

然后你做的啥操作,记录下载

zhenglongjie commented 7 years ago

1下载指定版本(3.2) wget repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm 2安装zabbix的yum扩展源 rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm 3安装服务 yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql 4编译mysql安装(略) 5配置mysql vim /etc/my.cnf //需要增加配置 character_set_server = utf8 6进入mysql命令行,创建zabbix库: mysql> create database zabbix character set utf8; Query OK, 1 row affected (0.00 sec)

mysql> grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'zabbix'; Query OK, 0 rows affected (0.00 sec) 7导入自带数据库 cd /usr/share/doc/zabbix-server-mysql-3.2.7/ gzip -d create.sql.gz mysql -uroot zabbix < create.sql 8启动zabbix-server,和httpd服务 systemctl start zabbix-server systemctl start httpd 9配置开机启动 systemctl enable zabbix-server systemctl enable httpd 10修改zabbix配置文件 vim /etc/zabbix/zabbix_server.conf //修改或增加 DBHost=127.0.0.1 (在此写的是本地的mysql,但是线上的环境一般都有指定的mysql地址) DBName=zabbix DBUser=zabbix DBPassword=zabbix //在DBuser下面增加 11修改完配置文件重启zabbix服务 systemctl restart zabbix-server 12现在就可以去客户端访问web安装页面了,http://192.168.14.178/zabbix(提示php的timezone没有设置) vim /etc/php.ini //搜索timezone配置即可 date.timezone = Asia/Shanghai

zhenglongjie commented 7 years ago

更改密码!更改密码!更改密码!

Administration→Users→Admin→Change password(asd123asd)