php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #76459
Patch Admin revision 2018-09-11 07:20 UTC by maocp_2014 at 163 dot com

Patch Admin for *General Issues Bug #76459

Patch version 2018-09-11 07:20 UTC

Return to Bug #76459 | Download this patch
Patch Revisions:

Developer: maocp_2014@163.com

查看进程占用的端口
netstat -tunlp | grep nginx

echo "nameserver 114.114.114.114" >> /etc/resolv.conf

yum -y install libpcap mysql-devel libnet gcc wget libnet-devel libpcap-devel libevent libevent-devel
 
wget https://github.com/redis/hiredis/archive/v0.13.3.tar.gz && tar zxvf v0.13.3.tar.gz && cd hiredis-0.13.3/ && make && make install


采集
root
Huawei@123

# timedatectl list-timezones # 列出所有时区

# timedatectl set-local-rtc 1 # 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间
# timedatectl set-timezone Asia/Shanghai # 设置系统时区为上海
其实不考虑各个发行版的差异化, 从更底层出发的话, 修改时间时区比想象中要简单:

# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


普通机器 
root  
root123

公网 
root 
Greennet#2018


cmpp3.0相关接入参数如下:
         企业代码:918620 服务代码:10658228*
         用户名:918620 密码:LS_mw12#$
         限制接入IP地址:10.154.247.142 10.154.247.143 10.154.247.144
         协议版本:CMPP3.0 可信任
         网关接入地址:10.154.164.93
         端口:7891(下行)/7911(上行)



proxychains4 yum install mariadb-server mariadb -y
proxychains4 yum install zabbix-server-mysql zabbix-web-mysql -y
  
  
255.255.255.192

route add -net 10.154.0.0 gw 10.154.247.129 netmask 255.255.0.0 

echo "10.154.0.0/16 via 10.154.247.129 dev eth1" > /etc/sysconfig/network-scripts/route-eth1
systemctl start NetworkManager
nmcli dev disconnect eth1 && nmcli dev connect eth1



目录规则
├── collector
│   ├── bin
│   │   ├── collector
│   │   ├── ct.ini
│   │   ├── nohup.out
│   ├── logs
│   │   └── collector.log
│   └── run.sh
├── radius
│   ├── bin
│   │   ├── nohup.out
│   │   ├── radius
│   │   └── rds.ini
│   ├── logs
│   │   └── radius.log
│   └── run.sh
├── msc
│   ├── bin
│   │   ├── licence
│   │   ├── licence.file
│   │   ├── msc
│   │   ├── msc.ini
│   │   └── nohup.out
│   ├── logs
│   │   └── msc.log
│   └── run.sh
├── appserver
│   ├── nohup.out
│   ├── serverapp
│   └── server.cfg
│   └── server.log
│   └── run.sh


路由
route add -net 0.0.0.0/24 gw 172.16.10.1 dev eth0
route del -net 0.0.0.0/24 gw 172.16.10.161 dev eth0

Greennet#2018
Huawei@123

hostnamectl set-hostname CT-East231
tar zxvf collector.tar.gz -C /usr/
vi /usr/server/collector/bin/ct.ini

设置dns
echo "nameserver 114.114.114.114" >> /etc/resolv.conf

rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.0-1.el7.x86_64.rpm  安装失败

zabbix源
scp root@172.16.10.131:/etc/yum.repos.d/zabbix.repo /etc/yum.repos.d/zabbix.repo
key文件
scp root@172.16.10.131:/etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 /etc/pki/rpm-gpg/
安装命令
yum -y install zabbix-agent

agent配置命令(下面配置是被动模式,server去agent拉取数据,所以需要开启端口)
sed -i 's#ServerActive=127.0.0.1#\#ServerActive=127.0.0.1#g' /etc/zabbix/zabbix_agentd.conf && \
sed -i 's#Server=127.0.0.1#Server=172.16.10.161#g' /etc/zabbix/zabbix_agentd.conf
sed -i 's#Hostname=Zabbix server#Hostname=dbserver-1#g' /etc/zabbix/zabbix_agentd.conf
egrep -v '^#|^$' /etc/zabbix/zabbix_agentd.conf

关闭seLinux和开放端口
setenforce 0 && sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config && getenforce
firewall-cmd --add-port=10050/tcp --permanent --zone=public && firewall-cmd --reload && firewall-cmd --list-ports

启动agent
systemctl start zabbix-agent

东片区235已安装agent


Zabbix Server : Template App Zabbix Server, Template OS Linux (Template App Zabbix Agent)


发现问题:
1、是否需要NTP服务
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 06:01:32 2024 UTC