zabbix-proxy安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zabbix-proxy安装相关的知识,希望对你有一定的参考价值。
groupadd zabbix
useradd -g zabbix zabbix -s /sbin/nologin
groupadd mysql
useradd -g mysql mysql -s /sbin/nologin
安装mysql
yum -y install net-snmp net-snmp-devel cmake libxml2 libxml2-devel ncurses ncurses-devel curl curl-devel
cd mysql-5.5.40
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.5.49 -DDEFAULT_CHARSET=utf8 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/mysql/data3306 -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DDEFAULT_COLLATION=utf8_general_ci
make
make install
mkdir -p /var/run/mysqld/
mkdir -p /usr/local/mysql5.5.49/multi_log/
chown mysql.mysql /var/run/mysqld/
vim .bashrc
PATH=/usr/local/mysql/bin:"$PATH"
export PATH
source .bashrc
/usr/local/mysql5.5.49/scripts/mysql_install_db --basedir=/usr/local/mysql5.5.49 --datadir=/usr/local/mysql5.5.49/data3306 --user=mysql
/usr/local/mysql5.5.49/bin/mysqld_multi --defaults-extra-file=/usr/local/mysql5.5.49/my.cnf start 6
/usr/local/mysql5.5.49/bin/mysql --socket=/usr/local/mysql5.5.49/data3306/mysql.sock
>create database zabbix default charset utf8;
> grant all on zabbix.* to [email protected] identified by ‘zabbix123456‘;
>flush privileges;
>exit
导入数据库中的表
cd /root/zabbix-2.2.0/database/mysql
mysql -uzabbix -p --socket=/usr/local/mysql/data3306/mysql.sock zabbix < /data/zabbix-3.0.3/database/mysql/schema.sql (proxy端只需要这一步,不需要数据)
编译安装(proxy)
cd /root/zabbix-2.2.0
./configure --enable-agent --enable-proxy --with-mysql=/usr/local/mysql5.5.49/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --prefix=/usr/local/zabbix
make && make install
ln -s /usr/local/mysql5.5.49/lib/libmysqlclient.so.18 /usr/lib64/
本文出自 “不抛弃!不放弃” 博客,请务必保留此出处http://thedream.blog.51cto.com/6427769/1793717
以上是关于zabbix-proxy安装的主要内容,如果未能解决你的问题,请参考以下文章