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