2015 m. kovo 21 d., šeštadienis

CentOs Zabbix konfiguravimas

CentOS7
Pridedam repozitoriją. nano /etc/yum.repos.d/zabbix.repo
[Zabbix]
name=Zabbix
baseurl=http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/
gpgcheck=1
gpgkey=http://repo.zabbix.com/zabbix-official-repo.key
Diegiam zabbex ir kitas reikalingas programas. sudo yum -y install yum-utils
repoquery -qi zabbix
sudo yum -y  install epel-release
sudo yum -y install zabbix-server-mysql zabbix-agent zabbix-web-mysql mysql mariadb-server httpd php
sudo systemctl start mariadb
mysql_secure_installation
Konfiguruojam mysql.
mysql -u root -p
create database zabbix;
grant all privileges on zabbix.* to zabbix@localhost identified by 'secretpassword';
flush privileges;
exit
Ruošiam duomenų bazę. cd /usr/share/doc/zabbix-server-mysql-2.4.4/create/
mysql -u root -p zabbix < schema.sql
mysql -u root -p zabbix < images.sql
mysql -u root -p zabbix < data.sql
sed -i 's/^# DBPassword=.*/DBPassword=secretpassword/' /etc/zabbix/zabbix_server.conf
/etc/php.ini pakeitimai. sed -i 's/^max_execution_time.*/max_execution_time=600/' /etc/php.ini
sed -i 's/^max_input_time.*/max_input_time=600/' /etc/php.ini
sed -i 's/^memory_limit.*/memory_limit=256M/' /etc/php.ini
sed -i 's/^post_max_size.*/post_max_size=32M/' /etc/php.ini
sed -i 's/^upload_max_filesize.*/upload_max_filesize=16M/' /etc/php.ini
sed -i "s/^\;date.timezone.*/date.timezone=\'Europe\/Riga\'/" /etc/php.ini
sed -i "s/^\;date.timezone.*/date.timezone=\'Europe\/Brussels\'/" /etc/php.ini
Zabbix konfiguracinis dokumentas.
nano /etc/httpd/conf.d/zabbix.conf
Zabbix server pakeitimai. sed -i 's/^# CacheSize=.*/CacheSize=32M/' /etc/zabbix/zabbix_server.conf
sed -i 's/^# StartPingers=.*/StartPingers=5/' /etc/zabbix/zabbix_server.conf
Kaip pasileisti mysql, httpd, sshd ?
CentOS6
/etc/init.d/mysqld start
/etc/init.d/httpd start
/etc/init.d/sshd start
CentOS7
systemctl start zabbix-agent
systemctl start zabbix-server
systemctl start httpd
Kaip automatiškai įjungti mysql, apache, ssh, zabbix-server ?
Cent6
chkconfig mysqld on
chkconfig httpd on
chkconfig zabbix-server on
CentoS7
chkconfig mariadb on
chkconfig httpd on
chkconfig zabbix-server on
Svetainės adresas: http://localhost/zabbix

Rodo visus, kurie užsikrauna boot metu
chkconfig --list
Svetainės prisijungimas: Admin/zabbix

http://www.rackspace.com/knowledge_center/article/centos-apache-and-php-install - web+servisų konfigūravimas
 
Kaip atidaryti 80 portą?
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo service iptables save
Klaida:
Zabbix server is not running alert klaida
Sprendimas: httpd_can_network_connect --> off
setsebool httpd_can_network_connect on
getsebool httpd_can_network_connect

CentOS7 SeLinux Alert Browser siūlo:setsenool -P httpd_can_connect_zabbix 1
Literatūra:
centOs6 instaliiacijos gidai:
http://www.server-world.info/en/note?os=CentOS_6&p=zabbix

centos7 zabbix diegimo gidas:
http://jensd.be/?p=393