开始安装
64位 Ubuntu 14.04.5 LTS \n \l
安装zabbix的源,以下操作在root下进行
1 # wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-1+trusty_all.deb 2 # dpkg -i zabbix-release_3.0-1+trusty_all.deb 3 # apt-get update
安装完成之后创建zabbix数据库
1 shell> MysqL -uroot -p123456 2 MysqL> create database zabbix character set utf8 collate utf8_bin; 3 MysqL> grant all privileges on zabbix.* to zabbix@localhost identified by @H_502_55@'@H_502_55@678910@H_502_55@'; 4 MysqL> quit;
初始化
配置/etc/zabbix/zabbix_server.conf
1 配置后的情况如下 2 root@ubuntu:~# cat /etc/zabbix/zabbix_server.conf |grep -v ^$|grep -v ^# 3 LogFile=/var/log/zabbix/zabbix_server.log 4 LogFileSize=0 5 PidFile=/var/run/zabbix/zabbix_server.pid 6 DBHost=localhost 7 DBName=zabbix 8 DBUser=zabbix 9 DBPassword=678910 10 Timeout=4 11 AlertScriptsPath=/usr/lib/zabbix/alertscripts 12 ExternalScripts=${datadir}/zabbix/externalscripts 13 ExternalScripts=/usr/lib/zabbix/externalscripts 14 FpingLocation=/usr/bin/fping 15 Fping6Location=/usr/bin/fping6 16 LogSlowQueries=3000
启动服务
1 # service zabbix-server start 2 # update-rc.d zabbix-server enable
PHP configuration for Zabbix frontend注意设置时钟
1 如下,主要修改下时钟设置 2 root@ubuntu:~# cat /etc/zabbix/apache.conf|grep -v ^$|grep -v ^# 3 <IfModule mod_alias.c> 4 Alias /zabbix /usr/share/zabbix 5 </IfModule> 6 <Directory @H_502_55@"@H_502_55@/usr/share/zabbix@H_502_55@"> 7 Options FollowSymLinks 8 AllowOverride None 9 Order allow,deny 10 Allow from all 11 <IfModule mod_PHP5.c> 12 PHP_value max_execution_time 300 13 PHP_value memory_limit 128M 14 PHP_value post_max_size 16M 15 PHP_value upload_max_filesize 2M 16 PHP_value max_input_time 300 17 PHP_value always_populate_raw_post_data -1 18 # PHP_value date.timezone Europe/Riga 19 PHP_value date.timezone Asia/Shanghai 20 </IfModule> 21 <IfModule mod_PHP7.c> 22 PHP_value max_execution_time 300 23 PHP_value memory_limit 128M 24 PHP_value post_max_size 16M 25 PHP_value upload_max_filesize 2M 26 PHP_value max_input_time 300 27 PHP_value always_populate_raw_post_data -1 28 # PHP_value date.timezone Europe/Riga 29 PHP_value date.timezone Asia/Shanghai 30 </IfModule> 31 </Directory> 32 <Directory @H_502_55@"@H_502_55@/usr/share/zabbix/conf@H_502_55@"> 33 Order deny,allow 34 Deny from all 35 <files *.PHP> 36 Order deny,allow 37 Deny from all 38 </files> 39 </Directory> 40 <Directory @H_502_55@"@H_502_55@/usr/share/zabbix/app@H_502_55@"> 41 Order deny,allow 42 Deny from all 43 <files *.PHP> 44 Order deny,allow 45 Deny from all 46 </files> 47 </Directory> 48 <Directory @H_502_55@"@H_502_55@/usr/share/zabbix/include@H_502_55@"> 49 Order deny,allow 50 Deny from all 51 <files *.PHP> 52 Order deny,allow 53 Deny from all 54 </files> 55 </Directory> 56 <Directory @H_502_55@"@H_502_55@/usr/share/zabbix/local@H_502_55@"> 57 Order deny,allow 58 Deny from all 59 <files *.PHP> 60 Order deny,allow 61 Deny from all 62 </files> 63 </Directory>
以上完成之后可以安装了
安装访问http://<server_ip_or_name>/zabbix
如下
安装zabbix_get命令,便于我们检测zabbix_agent端
apt search zabbix apt-get install zabbix_get
客户端安装zabbix-agent(本机的),其他机器也可
# apt-get install zabbix-agent # service zabbix-agent start
监控本机,zabbix-server端安装好之后默认自己配置好了本机监控,你只是需要打开即可
如下,等下看看时候正常即可
原文链接:https://www.f2er.com/ubuntu/351760.html