#instalacija httpd
sudo yum install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
#instalacija mariadb i konfiguracija
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl enable mariadb.service
#instalacija PHP
sudo yum install php php-mysql php-gd php-xml php-bcmath
sudo systemctl restart httpd.service
#instalacija zabbix repository
#yum install http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#instalacija zabbix-a
yum install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent
mysql -u root -p
#rad u mysql - kreiranje mysql naloga zabbix i dbase zabbix
create database zabbix;
grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password';
grant all privileges on zabbix.* to zabbix@'%' identified by 'password';
flush privileges;
quit;
#kraj rada u mysq-u
#cd /usr/share/doc/zabbix-server-mysql-*/create - ovo je za stariju verziju zabbix-a
cd /usr/share/doc/zabbix-server-mysql-3.0.1/
gunzip create.sql.gz
#kreiranje tabela u bazi zabbix
#mysql -u root -p zabbix < schema.sql - ovo je za stariju verziju zabbix-a
#mysql -u root -p zabbix < images.sql - ovo je za stariju verziju zabbix-a
#mysql -u root -p zabbix < data.sql - ovo je za stariju verziju zabbix-a
mysql -u root -p zabbix < create.sql
#konfiguracija konekcije sa mysql bazom
vi /etc/zabbix/zabbix_server.conf
#rad u VI editoru
DBHost=localhost
DBName=zabbix
DBUser=zabbix #- ovaj parametar je vec ubacen!!!
DBPassword=password
#kraj rada u VI editoru
#restart zabbix servera
systemctl start zabbix-server
systemctl enable zabbix-server
#konfiguracija zabbix agenta
yum install zabbix-agent
vi /etc/zabbix/zabbix_agentd.conf
#rad u VI editoru
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=server.domen.com
#kraj rada u VI editoru
#restart zabbix agenta
systemctl start zabbix-agent
systemctl enable zabbix-agent
#podešavanje vremenske zone
vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Europe/Belgrade
#podešavanje php.ini
vi /etc/php.ini
# rad u VI editoru
max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Europe/Belgrade
# kraj rada u VI editoru
#podešavanje firewall-a ako je startovan
firewall-cmd --permanent --add-port=10050/tcp
firewall-cmd --permanent --add-port=10051/tcp
systemctl restart firewalld
#podešavanje SElinux-a
getsebool -a
setsebool httpd_can_connect_zabbix on
setsebool -P httpd_can_connect_zabbix on
setsebool zabbix_can_network 1
setsebool -P zabbix_can_network 1
#restart servisa i podešavanje da se startuju prilikom boot-a
systemctl start zabbix-server
systemctl start zabbix-agent
systemctl restart httpd
systemctl restart mariadb
systemctl enable zabbix-server
systemctl enable zabbix-agent
#pristup preko web-a
http://ip-address/zabbix
username: Admin
password zabbix
#dodavanje hosta preko SNMP interface-a
# podešavanje macro vrednosti
{$SNMP_COMMUNITY} public
#templete koji se bira za SNMP monitoring
Template SNMP Device
Nema komentara:
Objavi komentar