CentOS7安装配置Zabbix3.4

阅读更多

mini安装CentOS7 && 基本配置

yum -y install net-tools wget lrzsz lsof
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup  
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo  
yum clean all  
yum makecache  
yum -y update
yum -y install pcre pcre-devel openssl openssl-devel gcc-c++
yum -y remove selinux*
systemctl stop firewalld.service  
systemctl disable firewalld.service
hostnamectl set-hostname zabbix

 

安装zabbix

cd /home/
wget https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm 
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

 

安装mysql

cd /home/
wget http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-release-el7-7.noarch.rpm
rpm -ivh mysql-community-release-el7-7.noarch.rpm 
yum -y install mysql-community-server
systemctl start  mysqld
mysql_secure_installation 

 

创建数据库,添加用户,付权,导入数据库

mysql -uroot -p12qwaszx
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '12qwaszx';
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p12qwaszx zabbix

 

配置zabbix配置文件

vi /etc/zabbix/zabbix_server.conf

DBPassword=12qwaszx

 

配置php时间区域

vi /etc/httpd/conf.d/zabbix.conf

php_value date.timezone Asia/Shanghai

 

启动所有服务

systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd

 

查看启动进程

netstat -tpln

tcp    0  0 0.0.0.0:10050       0.0.0.0:*       LISTEN    2419/zabbix_agentd  
tcp    0  0 0.0.0.0:10051       0.0.0.0:*       LISTEN    2426/zabbix_server  
tcp    0  0 0.0.0.0:22          0.0.0.0:*       LISTEN    884/sshd            
tcp    0  0 127.0.0.1:25        0.0.0.0:*       LISTEN    1121/master         
tcp6   0  0 :::10050            :::*            LISTEN    2419/zabbix_agentd  
tcp6   0  0 :::10051            :::*            LISTEN    2426/zabbix_server  
tcp6   0  0 :::3306             :::*            LISTEN    2379/mysqld         
tcp6   0  0 :::80               :::*            LISTEN    2417/httpd          
tcp6   0  0 :::22               :::*            LISTEN    884/sshd            
tcp6   0  0 ::1:25              :::*            LISTEN    1121/master

 

 

图像乱码问题

cd /usr/share/zabbix/fonts/
cp /home/msyh.ttf ./
vi /usr/share/zabbix/include/defines.inc.php 
    define('ZBX_GRAPH_FONT_NAME',           'msyh'); 
    define('ZBX_FONT_NAME', 'msyh');

 

 

 

 

 

 

 

你可能感兴趣的:(CentOS7安装配置Zabbix3.4)