一、Zabbix安装

Zabbix安装(一)
 
1、操作系统:centos7.4 X86_64(1708)
2、操作系统优化:
(1)关闭seLinux和防火墙
vi /etc/sysconfig/selinux把enforcing改成disabled,保存
SELINUX=disabled
[root@moban ~]# getenforce
Enforcing
[root@moban ~]# setenforce 0
[root@moban ~]# getenforce
 
chkconfig iptables off
chkconfig ip6tables off
/etc/init.d/iptables stop
/etc/init.d/ip6tables stop
3、安装LAMP、LNMP环境
(1)安装apache(httpd):
[root@moban init.d]# yum install httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.sohu.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-67.el7.centos will be updated
--> Processing Dependency: httpd = 2.4.6-67.el7.centos for package: mod_session-2.4.6-67.el7.centos.x86_64
---> Package httpd.x86_64 0:2.4.6-67.el7.centos.6 will be an update
--> Processing Dependency: httpd-tools = 2.4.6-67.el7.centos.6 for package: httpd-2.4.6-67.el7.centos.6.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-67.el7.centos will be updated
---> Package httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 will be an update
---> Package mod_session.x86_64 0:2.4.6-67.el7.centos will be updated
---> Package mod_session.x86_64 0:2.4.6-67.el7.centos.6 will be an update
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Updating:
httpd x86_64 2.4.6-67.el7.centos.6 updates 2.7 M
Updating for dependencies:
httpd-tools x86_64 2.4.6-67.el7.centos.6 updates 88 k
mod_session x86_64 2.4.6-67.el7.centos.6 updates 58 k
 
Transaction Summary
======================================================================================================================================
Upgrade 1 Package (+2 Dependent packages)
 
Total download size: 2.8 M
Is this ok [y/d/N]: y
Downloading packages:
updates/7/x86_64/prestodelta | 752 kB 00:00:00
Delta RPMs reduced 2.8 M of updates to 261 k (91% saved)
(1/3): httpd-2.4.6-67.el7.centos_2.4.6-67.el7.centos.6.x86_64.drpm | 198 kB 00:00:00
httpd-tools-2.4.6-67.el7.cento FAILED ==========- ] 0.0 B/s | 198 kB --:--:-- ETA
http://mirror.lzu.edu.cn/centos/7.4.1708/updates/x86_64/drpms/httpd-tools-2.4.6-67.el7.centos_2.4.6-67.el7.centos.6.x86_64.drpm: [Errno 14] curl#56 - "Recv failure: Connection reset by peer"
Trying other mirror.
(2/3): httpd-tools-2.4.6-67.el7.centos_2.4.6-67.el7.centos.6.x86_64.drpm | 35 kB 00:00:00
(3/3): mod_session-2.4.6-67.el7.centos_2.4.6-67.el7.centos.6.x86_64.drpm | 28 kB 00:00:00
Finishing delta rebuilds of 3 package(s) (2.8 M)
--------------------------------------------------------------------------------------------------------------------------------------
Total 75 kB/s | 261 kB 00:00:03
warning: /var/cache/yum/x86_64/7/updates/packages/mod_session-2.4.6-67.el7.centos.6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-4.1708.el7.centos.x86_64 (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : httpd-tools-2.4.6-67.el7.centos.6.x86_64 1/6
Updating : httpd-2.4.6-67.el7.centos.6.x86_64 2/6
Updating : mod_session-2.4.6-67.el7.centos.6.x86_64 3/6
Cleanup : mod_session-2.4.6-67.el7.centos.x86_64 4/6
Cleanup : httpd-2.4.6-67.el7.centos.x86_64 5/6
Cleanup : httpd-tools-2.4.6-67.el7.centos.x86_64 6/6
Verifying : mod_session-2.4.6-67.el7.centos.6.x86_64 1/6
Verifying : httpd-2.4.6-67.el7.centos.6.x86_64 2/6
Verifying : httpd-tools-2.4.6-67.el7.centos.6.x86_64 3/6
Verifying : mod_session-2.4.6-67.el7.centos.x86_64 4/6
Verifying : httpd-2.4.6-67.el7.centos.x86_64 5/6
Verifying : httpd-tools-2.4.6-67.el7.centos.x86_64 6/6
 
Updated:
httpd.x86_64 0:2.4.6-67.el7.centos.6
 
Dependency Updated:
httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 mod_session.x86_64 0:2.4.6-67.el7.centos.6
 
Complete!
(2)安装PHP
[root@moban init.d]# yum install php
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: centosx4.centos.org
* updates: mirrors.cqu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-43.el7_4 for package: php-5.4.16-43.el7_4.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-43.el7_4 for package: php-5.4.16-43.el7_4.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-common.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-43.el7_4.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
php x86_64 5.4.16-43.el7_4 updates 1.4 M
Installing for dependencies:
libzip x86_64 0.10.1-8.el7 base 48 k
php-cli x86_64 5.4.16-43.el7_4 updates 2.7 M
php-common x86_64 5.4.16-43.el7_4 updates 565 k
 
Transaction Summary
======================================================================================================================================
Install 1 Package (+3 Dependent packages)
 
Total download size: 4.7 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): php-5.4.16-43.el7_4.x86_64.rpm | 1.4 MB 00:00:00
(2/4): php-common-5.4.16-43.el7_4.x86_64.rpm | 565 kB 00:00:01
(3/4): libzip-0.10.1-8.el7.x86_64.rpm | 48 kB 00:00:02
(4/4): php-cli-5.4.16-43.el7_4.x86_64.rpm | 2.7 MB 00:00:10
--------------------------------------------------------------------------------------------------------------------------------------
Total 435 kB/s | 4.7 MB 00:00:11
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libzip-0.10.1-8.el7.x86_64 1/4
Installing : php-common-5.4.16-43.el7_4.x86_64 2/4
Installing : php-cli-5.4.16-43.el7_4.x86_64 3/4
Installing : php-5.4.16-43.el7_4.x86_64 4/4
Verifying : php-cli-5.4.16-43.el7_4.x86_64 1/4
Verifying : php-common-5.4.16-43.el7_4.x86_64 2/4
Verifying : php-5.4.16-43.el7_4.x86_64 3/4
Verifying : libzip-0.10.1-8.el7.x86_64 4/4
 
Installed:
php.x86_64 0:5.4.16-43.el7_4
 
Dependency Installed:
libzip.x86_64 0:0.10.1-8.el7 php-cli.x86_64 0:5.4.16-43.el7_4 php-common.x86_64 0:5.4.16-43.el7_4
 
Complete!
(3)安装PHP-GD
[root@moban init.d]# yum install php-gd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.cqu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-43.el7_4.x86_64
--> Running transaction check
---> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
php-gd x86_64 5.4.16-43.el7_4 updates 127 k
Installing for dependencies:
t1lib x86_64 5.1.2-14.el7 base 166 k
 
Transaction Summary
=====================================================================================================================================================
Install 1 Package (+1 Dependent package)
 
Total download size: 293 k
Installed size: 734 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): php-gd-5.4.16-43.el7_4.x86_64.rpm | 127 kB 00:00:00
(2/2): t1lib-5.1.2-14.el7.x86_64.rpm | 166 kB 00:00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------
Total 268 kB/s | 293 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : t1lib-5.1.2-14.el7.x86_64 1/2
Installing : php-gd-5.4.16-43.el7_4.x86_64 2/2
Verifying : t1lib-5.1.2-14.el7.x86_64 1/2
Verifying : php-gd-5.4.16-43.el7_4.x86_64 2/2
 
Installed:
php-gd.x86_64 0:5.4.16-43.el7_4
 
Dependency Installed:
t1lib.x86_64 0:5.1.2-14.el7
 
Complete!
(4)安装php-bcmath
[root@moban init.d]# yum install php-bcmath
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: ftp.nsc.ru
* updates: mirrors.sohu.com
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.4.16-43.el7_4 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
php-bcmath x86_64 5.4.16-43.el7_4 updates 57 k
 
Transaction Summary
=====================================================================================================================================================
Install 1 Package
 
Total download size: 57 k
Installed size: 58 k
Is this ok [y/d/N]: y
Downloading packages:
php-bcmath-5.4.16-43.el7_4.x86_64.rpm | 57 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php-bcmath-5.4.16-43.el7_4.x86_64 1/1
Verifying : php-bcmath-5.4.16-43.el7_4.x86_64 1/1
 
Installed:
php-bcmath.x86_64 0:5.4.16-43.el7_4
 
Complete!
(5)安装php-ctype(没找到这个包)
[root@moban init.d]# yum install php-ctype
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.cqu.edu.cn
Package php-common-5.4.16-43.el7_4.x86_64 already installed and latest version
Nothing to do
(6)安装php-xml
[root@moban etc]# yum install php-xml
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.sohu.com
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.4.16-43.el7_4 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
php-xml x86_64 5.4.16-43.el7_4 updates 125 k
 
Transaction Summary
=====================================================================================================================================================
Install 1 Package
 
Total download size: 125 k
Installed size: 325 k
Is this ok [y/d/N]: y
Downloading packages:
php-xml-5.4.16-43.el7_4.x86_64.rpm | 125 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php-xml-5.4.16-43.el7_4.x86_64 1/1
Verifying : php-xml-5.4.16-43.el7_4.x86_64 1/1
 
Installed:
php-xml.x86_64 0:5.4.16-43.el7_4
 
Complete!
(7)安装php-xmlreader(发布者自行提供)
[root@moban etc]# yum install xmlreader
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.sohu.com
No package xmlreader available.
Error: Nothing to do
(8)安装xmlwriter(发布者自行提供)
[root@moban etc]# yum install xmlwriter
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.cqu.edu.cn
No package xmlwriter available.
(9)安装php-session(发布者自行提供)
(10)安装sockets(无)
(11)安装php-mbstring
[root@moban etc]# yum install php-mbstring
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.sohu.com
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.4.16-43.el7_4 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
php-mbstring x86_64 5.4.16-43.el7_4 updates 505 k
 
Transaction Summary
=====================================================================================================================================================
Install 1 Package
 
Total download size: 505 k
Installed size: 1.3 M
Is this ok [y/d/N]: y
Downloading packages:
php-mbstring-5.4.16-43.el7_4.x86_64.rpm | 505 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php-mbstring-5.4.16-43.el7_4.x86_64 1/1
Verifying : php-mbstring-5.4.16-43.el7_4.x86_64 1/1
 
Installed:
php-mbstring.x86_64 0:5.4.16-43.el7_4
 
Complete!
[root@moban etc]# yum install php-ldap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.cqu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package php-ldap.x86_64 0:5.4.16-43.el7_4 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
php-ldap x86_64 5.4.16-43.el7_4 updates 52 k
 
Transaction Summary
=====================================================================================================================================================
Install 1 Package
 
Total download size: 52 k
Installed size: 57 k
Is this ok [y/d/N]: y
Downloading packages:
php-ldap-5.4.16-43.el7_4.x86_64.rpm | 52 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php-ldap-5.4.16-43.el7_4.x86_64 1/1
Verifying : php-ldap-5.4.16-43.el7_4.x86_64 1/1
 
Installed:
php-ldap.x86_64 0:5.4.16-43.el7_4
 
Complete!
 
(三)安装MYSQL
yum -y install mariadb mariadb-server mysql-devel php-mysql
(四)安装相关插件
yum install OpenIPMI libssh2 fping libiksemel libcurl libxml2 net-snmp
(五)初始化MYSQL
[root@moban etc]# systemctl start mariadb
[root@moban etc]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@moban init.d]# mysql_secure_installation
 
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
 
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, 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):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
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 MariaDB
root user without the proper authorisation.
 
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
 
 
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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
... skipping.
 
By default, MariaDB 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
- Dropping test database...
... Success!
- 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!
 
Cleaning up...
 
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
 
Thanks for using MariaDB!
(七)设置数据库字符编码防止乱码
vi /etc/my.cnf 在[mysqld]段里添加如下内容下
character-set-server=utf8
重启mysql数据库systemctl restart mariadb
登陆数据库:mysql -uroot -pS@haw123 成功后退出
(八)创建安装ZABBIX的帐号并安装ZABBIX部署包
shell#groupadd zabbix -g 201
shell#useradd -g zabbix -u 201 -m zabbix
vi /etc/udoers加入zabbix ALL=(ALL) ALL
 
[zabbix@moban ~]$ sudo rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
 
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
 
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
 
[sudo] password for zabbix:
warning: /var/tmp/rpm-tmp.uAptmB: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
[zabbix@moban ~]$ yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
Loaded plugins: fastestmirror, langpacks
You need to be root to perform this command.
[zabbix@moban ~]$ sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
Loaded plugins: fastestmirror, langpacks
zabbix | 2.9 kB 00:00:00
zabbix-non-supported | 951 B 00:00:00
zabbix/x86_64/primary_db | 56 kB 00:00:01
zabbix-non-supported/x86_64/primary | 1.6 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: centosx4.centos.org
* updates: mirrors.sohu.com
zabbix-non-supported 4/4
Resolving Dependencies
--> Running transaction check
---> Package zabbix-agent.x86_64 0:3.4.6-1.el7 will be installed
---> Package zabbix-server-mysql.x86_64 0:3.4.6-1.el7 will be installed
--> Processing Dependency: fping for package: zabbix-server-mysql-3.4.6-1.el7.x86_64
--> Processing Dependency: libiksemel.so.3()(64bit) for package: zabbix-server-mysql-3.4.6-1.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: zabbix-server-mysql-3.4.6-1.el7.x86_64
---> Package zabbix-web-mysql.noarch 0:3.4.6-1.el7 will be installed
--> Processing Dependency: zabbix-web = 3.4.6-1.el7 for package: zabbix-web-mysql-3.4.6-1.el7.noarch
--> Running transaction check
---> Package fping.x86_64 0:3.10-1.el7 will be installed
---> Package iksemel.x86_64 0:1.4-2.el7.centos will be installed
---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be installed
---> Package zabbix-web.noarch 0:3.4.6-1.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
zabbix-agent x86_64 3.4.6-1.el7 zabbix 361 k
zabbix-server-mysql x86_64 3.4.6-1.el7 zabbix 2.0 M
zabbix-web-mysql noarch 3.4.6-1.el7 zabbix 6.5 k
Installing for dependencies:
fping x86_64 3.10-1.el7 zabbix-non-supported 40 k
iksemel x86_64 1.4-2.el7.centos zabbix-non-supported 49 k
unixODBC x86_64 2.3.1-11.el7 base 413 k
zabbix-web noarch 3.4.6-1.el7 zabbix 2.5 M
 
Transaction Summary
======================================================================================================================================
Install 3 Packages (+4 Dependent packages)
 
Total download size: 5.3 M
Installed size: 22 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/zabbix-non-supported/packages/fping-3.10-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY ETA
Public key for fping-3.10-1.el7.x86_64.rpm is not installed
(1/7): fping-3.10-1.el7.x86_64.rpm | 40 kB 00:00:01
(2/7): iksemel-1.4-2.el7.centos.x86_64.rpm | 49 kB 00:00:01
(3/7): unixODBC-2.3.1-11.el7.x86_64.rpm | 413 kB 00:00:02
warning: /var/cache/yum/x86_64/7/zabbix/packages/zabbix-agent-3.4.6-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY0:56 ETA
Public key for zabbix-agent-3.4.6-1.el7.x86_64.rpm is not installed
(4/7): zabbix-agent-3.4.6-1.el7.x86_64.rpm | 361 kB 00:00:14
(5/7): zabbix-server-mysql-3.4.6-1.el7.x86_64.rpm | 2.0 MB 00:01:27
(6/7): zabbix-web-mysql-3.4.6-1.el7.noarch.rpm | 6.5 kB 00:00:00
(7/7): zabbix-web-3.4.6-1.el7.noarch.rpm | 2.5 MB 00:01:56
-----------------------------------------------------------------------------------------------------------------------------------------------------
Total 42 kB/s | 5.3 MB 00:02:11
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Importing GPG key 0x79EA5ED4:
Userid : "Zabbix SIA <packager@zabbix.com>"
Fingerprint: fbab d5fb 2025 5eca b22e e194 d13d 58e4 79ea 5ed4
Package : zabbix-release-3.4-2.el7.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
Importing GPG key 0xA14FE591:
Userid : "Zabbix LLC <packager@zabbix.com>"
Fingerprint: a184 8f53 52d0 22b9 471d 83d0 082a b56b a14f e591
Package : zabbix-release-3.4-2.el7.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : zabbix-web-mysql-3.4.6-1.el7.noarch 1/7
Installing : zabbix-web-3.4.6-1.el7.noarch 2/7
Installing : iksemel-1.4-2.el7.centos.x86_64 3/7
Installing : unixODBC-2.3.1-11.el7.x86_64 4/7
Installing : fping-3.10-1.el7.x86_64 5/7
Installing : zabbix-server-mysql-3.4.6-1.el7.x86_64 6/7
Installing : zabbix-agent-3.4.6-1.el7.x86_64 7/7
Verifying : fping-3.10-1.el7.x86_64 1/7
Verifying : zabbix-server-mysql-3.4.6-1.el7.x86_64 2/7
Verifying : zabbix-web-3.4.6-1.el7.noarch 3/7
Verifying : unixODBC-2.3.1-11.el7.x86_64 4/7
Verifying : iksemel-1.4-2.el7.centos.x86_64 5/7
Verifying : zabbix-agent-3.4.6-1.el7.x86_64 6/7
Verifying : zabbix-web-mysql-3.4.6-1.el7.noarch 7/7
 
Installed:
zabbix-agent.x86_64 0:3.4.6-1.el7 zabbix-server-mysql.x86_64 0:3.4.6-1.el7 zabbix-web-mysql.noarch 0:3.4.6-1.el7
 
Dependency Installed:
fping.x86_64 0:3.10-1.el7 iksemel.x86_64 0:1.4-2.el7.centos unixODBC.x86_64 0:2.3.1-11.el7 zabbix-web.noarch 0:3.4.6-1.el7
 
Complete!
(九)创建ZABBIX初始数据库
[zabbix@moban ~]$ mysql -uroot -pS@haw123
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.56-MariaDB MariaDB Server
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> grant all privileges on zabbix.* to moban@localhost identified by 'S@haw123';
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]>
MariaDB [(none)]> status;
--------------
mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
 
Connection id: 3
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 5.5.56-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 57 min 5 sec
导入ZABBIX数据库结构;
Import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
d. Configure the database for Zabbix server
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password
e. Start Zabbix server and agent processes
 
Start Zabbix server and agent processes and make it start at system boot:
# systemctl start zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd
安装Zabbix Web 1、浏览器访问,并进行安装 http://192.168.119.131/zabbix/
用户名:Admin
密码:zabbix
处理ZABBIX WEB页面字体乱码。将WINDOWS操作系统中windows/Fonts下,仿宋常规安体simfang.ttf 上传到ZABBIX服务器/usr/share/fonts/dejavu/目录下重命名为DejaVuSans.ttf,退出WEB重登陆就OK了。另外点右上角用户图标设置中文
 
 
posted @ 2018-05-31 11:40  信是有缘  阅读(977)  评论(0编辑  收藏  举报