2016年11月2日 星期三

電腦-Zabbix 安裝 (centos 7)

CentOS-Zabbix 安裝 (centos 7)

yum install php-php-gettext net-snmp-devel

yum install libdbi-dbd-mysql net-snmp-devel curl-devel net-snmp libcurl-devel libxml2-devel

wget http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm


rpm -ivh zabbix-release-3.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql

Creating initial database
Create zabbix database and user on MySQL.

shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;



shell> cd database/mysql
shell> mysql -uzabbix -pzabbix zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -pzabbix zabbix < images.sql
shell> mysql -uzabbix -pzabbix zabbix < data.sql


Then import initial schema and data.

# cd /usr/share/doc/zabbix-server-mysql-3.0.4
# zcat create.sql.gz | mysql -uroot zabbix -p


Starting Zabbix server process
 
Edit database configuration in zabbix_server.conf

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

Start Zabbix server process.

# systemctl start zabbix-server

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 Asia/Taipei
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.

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。