标签:emctl 开机 row c++ com shadow cacti dmi unsigned
linux监控平台介绍[root@akuilinux01 ~]# rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm
警告:zabbix-release-3.2-1.el7.noarch.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:zabbix-release-3.2-1.el7 ################################# [100%]
yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql
mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.34 sec)
mysql> grant all on zabbix.* to ‘zabbix‘@‘127.0.0.1‘ identified by ‘s5381561‘;
Query OK, 0 rows affected (0.05 sec)
[root@akuilinux01 ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.11/
[root@akuilinux01 zabbix-server-mysql-3.2.11]# ls
AUTHORS ChangeLog COPYING create.sql.gz NEWS README
[root@akuilinux01 zabbix-server-mysql-3.2.11]# gzip -d create.sql.gz
[root@akuilinux01 zabbix-server-mysql-3.2.11]# ls
AUTHORS ChangeLog COPYING create.sql NEWS README
[root@akuilinux01 zabbix-server-mysql-3.2.11]# mysql -uroot -ps5381561 zabbix < create.sql
Warning: Using a password on the command line interface can be insecure.
如果有nginx服务需要先停掉并禁掉开机启动
[root@akuilinux01 ~]# systemctl stop nginx
[root@akuilinux01 ~]# chkconfig nginx off
[root@akuilinux01 ~]# systemctl start httpd
[root@akuilinux01 ~]# systemctl enable httpd
[root@akuilinux01 ~]# systemctl start zabbix-server
[root@akuilinux01 ~]# systemctl enable zabbix-server
[root@akuilinux01 ~]# ps aux |grep zabbix
zabbix 2048 0.0 0.1 254588 3496 ? S 22:56 0:00 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
root 2154 0.0 0.0 112676 984 pts/0 S+ 23:01 0:00 grep --color=auto zabbix
[root@akuilinux01 ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=s5381561
[root@akuilinux01 ~]# systemctl restart zabbix-server
[root@akuilinux01 ~]# netstat -lntp |grep zabbix
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 2176/zabbix_server
tcp6 0 0 :::10051 :::* LISTEN 2176/zabbix_server
[root@akuilinux01 ~]# vim /etc/php.ini
date.timezone = Asia/Shanghai
[root@akuilinux01 ~]# systemctl restart httpd
Server=127.0.0.1修改为Server=192.168.21.128 //定义服务端的ip(被动模式)
ServerActive=127.0.0.1修改为ServerActive=192.168.21.128 //定义服务端的ip(主动模式)
Hostname=Zabbix server修改为Hostname=Zabbix server //这是自定义的主机名,一会还需要在web界面下设置同样的主机名
[root@akuilinux02 ~]# systemctl start zabbix-agent
[root@akuilinux02 ~]# systemctl enable zabbix-agent
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
[root@akuilinux01 ~]# mysql -uroot -ps5381561
mysql> use zabbix
mysql> desc users; #密码存在users表里
+----------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------------+------+-----+---------+-------+
| userid | bigint(20) unsigned | NO | PRI | NULL | |
| alias | varchar(100) | NO | UNI | | |
| name | varchar(100) | NO | | | |
| surname | varchar(100) | NO | | | |
| passwd | char(32) | NO | | | |
| url | varchar(255) | NO | | | |
| autologin | int(11) | NO | | 0 | |
| autologout | int(11) | NO | | 900 | |
| lang | varchar(5) | NO | | en_GB | |
| refresh | int(11) | NO | | 30 | |
| type | int(11) | NO | | 1 | |
| theme | varchar(128) | NO | | default | |
| attempt_failed | int(11) | NO | | 0 | |
| attempt_ip | varchar(39) | NO | | | |
| attempt_clock | int(11) | NO | | 0 | |
| rows_per_page | int(11) | NO | | 50 | |
+----------------+---------------------+------+-----+---------+-------+
16 rows in set (0.00 sec)
mysql> update users set passwd=md5(‘5381561‘) where alias=‘Admin‘; #更改Admin用户密码
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from users; #目前有俩个用户
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
| userid | alias | name | surname | passwd | url | autologin | autologout | lang | refresh | type | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page |
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
| 1 | Admin | Zabbix | Administrator | 8735d2f54dde47455a2558e0f138dc89 | | 1 | 0 | zh_CN | 30 | 3 | default | 0 | | 0 | 50 |
| 2 | guest | | | d41d8cd98f00b204e9800998ecf8427e | | 0 | 900 | en_GB | 30 | 1 | default | 0 | | 0 | 50 |
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
2 rows in set (0.00 sec)
linux监控平台介绍,zabbix监控介绍,zabbix安装,忘记Admin密码如何做
标签:emctl 开机 row c++ com shadow cacti dmi unsigned
原文地址:http://blog.51cto.com/akui2521/2137391