Installation zabbix from packages (rhel7)

zabbix_server

Installing repository configuration package

2  Installing Zabbix packages
Install Zabbix packages. Example for Zabbix server and web frontend with mysql database
# yum install zabbix-server-mysql zabbix-web-mysql

installing Zabbix agent only
# yum install zabbix-agent

Creating initial database

install database (mysql)
yum install mysql-community-server

A superuser account  'root'@'localhost  is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command:
# grep 'temporary password' /var/log/mysqld.log
# mysql -uroot -p temporary password
修改root用户的密码:
# ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'


Create zabbix database and user on MySQL. For instructions on doing that, see database creation scripts for MySQL.
Then import initial schema and data.
# cd /usr/share/doc/zabbix-server-mysql-3.0.0
# zcat create.sql.gz | mysql -uroot zabbix

Starting Zabbix server process

Edit database configuration in zabbix_server.conf

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix


Start Zabbix server process.
# systemctl start zabbix-server
设置开机启动
chkconfig zabbix-server on
5 Editing PHP configuration for Zabbix frontend

Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP settings are already configured.

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 always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga


It's necessary to uncomment the “date.timezone” setting and set the right timezone for you. After changing the configuration file restart the apache web server.

# systemctl start httpd

Zabbix frontend is available at  http://zabbix-frontend-hostname/zabbix  in the browser. Default username/password is Admin/zabbix.



zabbix_agent:

Installing repository configuration package

2  Installing Zabbix packages

installing Zabbix agent only
# yum install zabbix-agent


3 /etc/zabbix/zabbix_agentd.conf
# sed -i "s/Server=127.0.0.1/Server=172.16.171.155/" zabbix_agentd.conf
# sed -i "s/ServerActive=127.0.0.1/ServerActive=172.16.171.155:10051/" zabbix_agentd.conf 
# sed -i "s/# UnsafeUserParameters=0/UnsafeUserParameters=1/" zabbix_agentd.conf

4 # service zabbix-agent start
   # chkconfig zabbix-agent on


如果zabbix-agent服务无法开启,报错 cannot set resource limit: [13] Permission denied
需要关闭selinux服务,方法如下:
#sed -i  "s/SELINUX=enforcing/SELINUX=disabled/“ /etc/selinux/config
# setenforce 0 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值