系統:CentOS Linux release 7.3.1611 (Core)
主機IP:192.168.204.130
zabbix版本:zabbix-3.2.5.tar.gz
搭建:
yum install httpd php php-devel php-mysql mariadb mariadb-server mariadb-devel php-gd gcc php-xml libcurl-devel curl-* net-snmp* libxml2* -y
tar xf zabbix-3.2.5.tar.gz
cd zabbix-3.2.5
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
make && make install
mkdir /var/www/html/zabbix
cp zabbix-3.2.5/frontends/php/* /var/www/html/zabbix/ -R
chown apache:apache /var/www/html/ -R
useradd zabbix -s /sbin/nologin
systemctl start mariadb
mysql_secure_installation
cd /etc/my.cnf.d
vim server.cnf
[mysqld]
character-set-server=utf8
vim client.cnf
[client]
default-character-set=utf8
systemctl restart mariadb
mysql -uroot -p
status
create database zabbix;
grant all on zabbix.* to zabbix@localhost identified by 'zabbix';
grant all on zabbix.* to zabbix@'192.168.204.130' identified by 'zabbix';
flush privileges;
mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/schema.sql
mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/p_w_picpaths.sql
mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/data.sql
ln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/
cp /root/zabbix-3.2.5/misc/init.d/tru64/zabbix_* /etc/init.d/
chmod +x /etc/init.d/zabbix_*
vim /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/tmp/zabbix_server.log
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
netstat -anptul (---查看是否有10050,10051)
systemctl start httpd
安裝
vim /etc/php.ini
修改
再安裝
zabbix搭建
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.