Last active
March 23, 2019 17:04
-
-
Save coder4web/f5a0c97ee0208a23facd56e11f43b43d to your computer and use it in GitHub Desktop.
Zabbix setup (CentOS. RHEL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------ | |
# agent | |
# ------------------------ | |
sudo rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm | |
sudo yum list zabbix-agent | |
sudo yum install zabbix-agent | |
sudo firewall-cmd --zone=public --add-port=10050/tcp | |
sudo firewall-cmd --zone=public --add-port=10050/tcp --permanent | |
sudo semanage permissive -a zabbix_agent_t | |
sudo systemctl enable zabbix-agent.service | |
tail /var/log/zabbix/zabbix_agentd.log | |
# ------------------------ | |
# telnet to agent | |
# ------------------------ | |
telnet HOST 10050 | |
system.cpu.load[,avg1] | |
# ------------------------ | |
# permanent tunnel to agent via PROXY_IP | |
# ------------------------ | |
autossh -M 0 -f -N -L PROXY_IP:10150:localhost:10050 [email protected] | |
sudo firewall-cmd --zone=public --add-port=10150/tcp | |
sudo firewall-cmd --zone=public --add-port=10150/tcp --permanent | |
# ------------------------ | |
# UNSORTED! | |
# ------------------------ | |
wget http://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb | |
dpkg -i zabbix-release_3.4-1+stretch_all.deb | |
apt-get update | |
apt-get install zabbix-server-mysql zabbix-frontend-php | |
#mysql | |
#https://www.zabbix.com/documentation/3.4/manual/appendix/install/db_scripts | |
create database zabbix_s1 character set utf8 collate utf8_bin; | |
grant all privileges on zabbix_S1.* to zabbix@localhost identified by 'chaesh6aez2eeMai'; | |
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix_s1 | |
nano /etc/zabbix/zabbix_server.conf | |
DBName= | |
DBPassword= | |
#service zabbix-server start | |
systemctl enable zabbix-server.service | |
systemctl start zabbix-server.service | |
systemctl status zabbix-server.service | |
cp /usr/share/zabbix /srv/sites/php/ | |
nano /etc/zabbix/zabbix_agentd.conf | |
Server=94.142.141.230 | |
ServerActive=94.142.141.230 | |
Hostname=example.com | |
sudo firewall-cmd --add-port=10050/tcp | |
sudo firewall-cmd --add-port=10050/tcp --permanent | |
systemctl enable zabbix-agent.service | |
systemctl start zabbix-agent.service | |
systemctl status zabbix-agent.service | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment