Instalação ZABBIX DEBIAN 8 (Jessie)

zabbix_logo_500x131

$apt-get install make flex gcc gpp php-net-socket libpq5 libpq-dev snmp apache2 libapache2-mod-php5 php5-gd php5-curl libcurl4-openssl-dev php5-mysql php5-snmp php-pear perl-base liburi-perl libapache2-mod-perl2 libwww-perl libtool libextutils-pkgconfig-perl pkg-config libsnmp-dev libcurl3 rcconf libgd-text-perl php5-cgi perl-modules libpdf-api2-perl libssh2-1-dev mysql-server libmysql++-dev libmysqlclient-dev snmpd libsnmp-dev curl libiksemel-dev libiksemel-utils fping lm-sensors libsysfs2 phpmyadmin –y

*não instalar phpmyadmin – deixar sistema limpo

$ aptitude install libsnmp-dev

$apt-get update & apt-get upgrade

Criando banco e usuário

$apt-get install mysql-server

$mysql –u root –p123

>show databases;

>create database zabbix character set UTF8;

>grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix’;

>show databases;

>use zabbix;

>show tables;

>quit;

Adicionar no repositório

$nano /etc/apt/sources.list

deb http://ftp.br.debian.org/debian/ jessie main

deb-src http://ftp.br.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main contrib

deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as ‘volatile’

deb http://ftp.br.debian.org/debian/ jessie-updates main contrib

deb-src http://ftp.br.debian.org/debian/ jessie-updates main contrib

#repositorio php

deb http://packages.dotdeb.org wheezy-php55 all

deb-src http://packages.dotdeb.org wheezy-php55 all

#repositorio zabbix

#deb http://repo.zabbix.com/zabbix/2.2/debian wheezy main

#deb http://repo.zabbix.com/zabbix/2.2/rhe rhe main

#deb http://http.debian.net/debian/ jessie-backports main contrib non-free

deb http://ftp.br.debian.org/debian stable main

#deb http://repo.zabbix.com/zabbix/2.0/debian squeeze main

deb http://repo.zabbix.com/zabbix/2.4/debian jessie main

$ wget http://repo.zabbix.com/zabbix/2.4/debian/pool/main/z/zabbix-release/zabbix-release_2.4-1+jessie_all.deb

$dpkg -i zabbix-release_2.4-1+jessie_all.deb

$apt-get update

$apt-get install zabbix-server-mysql

$apt-get install zabbix-frontend-php

$apt-get install zabbix-agent

$grep -ni “Debug” /etc/zabbix/zabbix_agentd.conf

$grep -ni “Server” /etc/zabbix/zabbix_agentd.conf

$grep -ni “Agents” /etc/zabbix/zabbix_agentd.conf

$ nano /etc/zabbix/zabbix_agentd.conf

*Alterar

Debug Level = 3

Server = IP_DO_SERVIDOR

StartAgents = 5

$ /etc/init.d/zabbix-server restart

$/etc/init.d/zabbix-agent restart

$/etc/init.d/apache2 restart

$locate php.ini

$ nano /etc/php5/apache2/php.ini

*Alterar

php_value max_execution_time 300

php_value memory_limit 128M

php_value post_max_size 16M

php_value upload_max_filesize 2M

php_value max_input_time 300

php_value date.timezone America/Sao_Paulo

$grep -ni “populate” /etc/php5/apache2/php.ini

$nano /etc/php5/apache2/php.ini

*Somente descomentar a linha e deixar setado como -1

always_populate_raw_post_data

$service apache2 restart

Colocando dados no Banco

$locate schema.sql

$ cd /usr/share/zabbix-server-mysql/

$cat schema.sql | mysql -u zabbix -pzabbix zabbix

$cat images.sql | mysql -u zabbix -pzabbix zabbix

$ cat data.sql | mysql -u zabbix -pzabbix zabbix

$nano /etc/zabbix/zabbix_server.conf

Alterar

DBPassword=zabbix

$curl http://localhost/zabbix/

Agora só entrar pelo browser http://localhost/zabbix/.

Rodolfo

Rodolfo

Rodolfo Cr é Engenheiro da Computação, especialista em Pentester em aplicações e Proteção em Servidores Linux e programador em algumas Linguagens. Membro da Roothc com intuito de divulgar e acrescentar conhecimento na área da computação com foco em segurança da informação.
Rodolfo

Latest posts by Rodolfo (see all)