:
1. Install Apache, PHP, MySQL from package:# yum -y install httpd mod_sslStart services:# service httpd start# service mysqld start
Change root's password in MySQL:
# mysqladmin -u root password 'pass_string'2. Install zabbix in accordance with the instructions:
Install repository configuration package:
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Install zabbix:
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agentCreate database:
Import data (you can find *.sql use next command "find / -name 'schema.sql' 2>/dev/null"):# mysql -uroot -pPass_strmysql> create database zabbix character set utf8 collate utf8_bin;mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';mysql> exit
# cd /usr/share/doc/zabbix-server-mysql-2.4.7/create# mysql -uroot zabbix < schema.sql# mysql -uroot zabbix < images.sql# mysql -uroot zabbix < data.sql
Edit configuration fie /etc/zabbix/zabbix_server.conf:
DBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbix
Start services zabbix-server and zabbix-agent :
# service zabbix-server start# service zabbix-agent start
Change timezone in /etc/httpd/conf.d/zabbix.conf:
php_value date.timezone Europe/Samara
Enable autostart services:# chkconfig httpd on# chkconfig mysqld on# chkconfig zabbix-server on# chkconfig zabbix-agent on
3. Change iptables and selinux settings:
If you use selinux, change settings:
# iptables -I INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
# iptables -I OUTPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
# iptables -I INPUT -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
# iptables -I OUTPUT -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
# iptables -I INPUT -p tcp -m state --state NEW,ESTABLISHED -m tcp --dport 10051 -j ACCEPT
# iptables -I OUTPUT -p tcp --sport 10051 -m state --state ESTABLISHED -j ACCEPT
# service iptables save
# semanage port -a -t http_port_t -p tcp 10051
# setsebool -P httpd_can_network_connect true
#setsebool -P zabbix_can_network=trueRestart service httpd:
# service httpd restart
Now, you can open your zabbix web interface, go to http://your_ip/zabbix/
Monday, January 18, 2016
Установка Zabbix на CentOs/RHEL/Oracle linux 6.
Ярлыки:
CentOs
,
iptables
,
Linux
,
monitoring
,
Oracle Linux
,
RedHat Linux
,
RHEL
,
selinux
,
Zabbix
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment