centos中zabbix2.2安装配置介绍

作者:袖梨 2022-06-30

 1、先安装lnmp这里就不讲了
2、安装必要组件

yum -y install mysql-devel libcurl-devel net-snmp-devel

3、添加用户

groupadd zabbix
useradd zabbix -g zabbix

4、建数据库

create database zabbix character set utf8;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

5、安装编译zabbix

wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.7/zabbix-2.2.7.tar.gz
tar zxvf zabbix-2.2.7.tar.gz
cd zabbix-2.2.7
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent \
--with-mysql --with-net-snmp --with-libcurl
make install

6、导入数据库

mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/schema.sql
mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/images.sql
mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/data.sql

7、修改配置文件
 
cp misc/init.d/fedora/core/zabbix_server /etc/init.d/
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
cp -R frontends/php /home/wwwroot/default/zabbix #这个目录根据自己网站目录调整
sed -i 's/^DBUser=.*$/DBUser=zabbix/g' /usr/local/zabbix/etc/zabbix_server.conf #数据库用户名
sed -i 's/^.*DBPassword=.*$/DBPassword=zabbix/g' /usr/local/zabbix/etc/zabbix_server.conf #数据库密码
sed -i 's/# DBSocket=\/tmp\/mysql.sock/DBSocket=\/tmp\/mysql.sock/g' /usr/local/zabbix/etc/zabbix_server.conf
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_server
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_agentd

8、启动服务

/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
echo "/etc/init.d/zabbix_server start" >> /etc/rc.local
echo "/etc/init.d/zabbix_agentd start" >> /etc/rc.local

9、安装web端,访问http://ip/zabbix

 


 点击查看原图


 

点击查看原图


 

点击查看原图


 

点击查看原图


 

点击查看原图


 

点击查看原图


 

点击查看原图

 

默认用户名密码是  admin:zabbix

 

10,语言调整,汉化

 

打开/include/locales.inc.php

 

把'zh_CN' => array('name' => _('Chinese (zh_CN)'),        'display' => false)中的false修改true

 

在zabbix右上角点击Profile,Language中选择Chinese (zh_CN)


 把C:/Windows/Fonts/simkai.ttf(下面有下载连接) 上传到zabbix的fonts目录

 

修改配置文件:

 

# cd /home/wwwroot/default/zabbix/ # 我zabbix安装目录     # sed -i 's/DejaVuSans/simkai/g' ./include/defines.inc.php

相关文章

精彩推荐