[zabbix] zabbix 서버 설치
9531 단어 zabbixzabbix 모니터링 소프트웨어
1) 소스 코드 컴 파일 설치
yum install -y pcre* openssl* gcc gcc-c++ automake zlib*
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx \
--with-http_stub_status_module --with-http_ssl_module \
--with http_gzip_static_module --with-pcre
make && make install
2) 시작 nginx
/usr/local/nginx/sbin/nginx -t
/usr/local/nginx/sbin/nginx
curl -s http://localhost
3) 권한
useradd nginx
nginx.conf nginx
chown -R nginx:nginx /usr/local/nginx
chmod 775 -R /usr/local/nginx/
php 설치
1) 소스 코드 컴 파일 설치
yum install libxml2-devel bzip2-devel libxml2 openldap-devel openldap
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc \
--with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 \
--with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local \
--with-freetype-dir=/usr/local --enable-gd-native-ttf \
--with-iconv-dir=/usr/local --enable-mbstring --enable-calendar \
--with-gettext --with-libxml-dir=/usr/local --with-zlib \
--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd \
--enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath \
--with-ldap
make && make install
2) 프로필 수정
cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/php-fpm.conf
vim php.ini
max_execution_times=300
memory_limit=128M
post_max_size=16
Mupload_max_filesize=2
Mmax_input_time=300
always_populate_raw_post_data=-1
date.timezone=Asia/Shanghai
3) php 재 부팅
/usr/local/php/sbin/php-fpm
netstat -antlp|grep php-fpm 9000 ,
4) 권한
php-fpm.conf :nginx
chown -R nginx:nginx /usr/local/php
chmod 775 -R /usr/local/php/
nginx 지원 php
1) 프로필
vim nginx.conf
location ~\.php${
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
include fastcgi_params;
}
location /{
root html;
index index.php index.html index.htm;
}
2) nginx 다시 시작
/usr/local/nginx/sbin/nginx -s reload
mysql 설치
1) mysql 녹색 버 전 다운로드
mysql http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
2) 컴 파일 설치
tar -zxf mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
useradd mysql
chown -R mysql:mysql mysql/
chmod -R 777 mysql/
./mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --user=mysql
cd mysql/support-files/
cp my-medium.cnf /etc/my.cnf
3) my. cnf 프로필
[client]
socket = /paic/mysql01/var/mysql.sock
port = 3306
[mysqld]
############ GENERAL #############
autocommit = ON
character_set_server = UTF8MB4
collation_server = UTF8MB4_bin
explicit_defaults_for_timestamp = ON
lower_case_table_names = 1
port = 3306
read_only = OFF
transaction_isolation = READ-COMMITTED
####### CACHES AND LIMITS #########
interactive_timeout = 600
max_allowed_packet = 32M
max_connect_errors = 10000
max_connections = 4000
max_user_connections = 2000
sort_buffer_size = 1M
table_definition_cache = 1400
table_open_cache = 2000
table_open_cache_instances = 4
thread_cache_size = 9
thread_stack = 256K
tmp_table_size = 32M
############# SAFETY ##############
local_infile = OFF
#plugin-load = validate_password.so
skip_name_resolve = ON
#sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
############# LOGGING #############
general_log = 0
log_queries_not_using_indexes = ON
log_slow_admin_statements = ON
log_warnings = 2
long_query_time = 1
slow_query_log = OFF
############# REPLICATION #############
binlog_checksum = CRC32
binlog_format = row
binlog_rows_query_log_events = ON
#enforce_gtid_consistency = ON
expire_logs_days = 5
#gtid_mode = ON
#log_slave_updates = ON
master_info_repository = TABLE
master_verify_checksum = ON
max_binlog_size = 256M
relay_log_info_repository = TABLE
server_id = 9001
skip_slave_start = ON
slave_net_timeout = 4
slave_sql_verify_checksum = ON
sync_binlog = 0
sync_master_info = 10000
sync_relay_log = 10000
sync_relay_log_info = 10000
slave_skip_errors=1032,1062
############### PATH ##############
basedir = /paic/mysql
datadir = /paic/mysql01/data
tmpdir = /paic/mysql01/tmp
socket = /paic/mysql01/var/mysql.sock
pid_file = /paic/mysql01/var/mysql.pid
innodb_data_home_dir = /paic/mysql01/data
log_error = /paic/mysql01/log/error.log
general_log_file = /paic/mysql01/log/general.log
slow_query_log_file = /paic/mysql01/log/slow.log
log_bin = /paic/mysql01/log/mysql-bin
log_bin_index = /paic/mysql01/log/mysql-bin.index
relay_log = /paic/mysql01/log/relay-log
relay_log_index = /paic/mysql01/log/relay-log.index
############# INNODB #############
innodb_file_format = barracuda
innodb_flush_method = O_DIRECT
innodb_buffer_pool_size = 204G
#innodb_log_file_size = 256M
innodb_log_file_size=33554432
innodb_log_files_in_group=3
#innodb_log_files_in_group = 4
innodb_flush_log_at_trx_commit = 2
innodb_support_xa = ON
innodb_strict_mode = ON
#innodb_data_file_path=ibdata1:12M:autoextend
innodb_data_file_path = ibdata1:256M;ibdata2:16M:autoextend
#innodb_checksum_algorithm = strict_crc32
innodb_io_capacity = 8000
innodb_io_capacity_max = 10000
[mysql]
############# CLIENT #############
max_allowed_packet = 32M
socket = /paic/mysql01/var/mysql.sock
[mysqldump]
max_allowed_packet = 256M
[mysqld_safe]
ledir=/paic/mysql/bin
zabbix 서버 설치
1) 소스 코드 설치
yum install -y net-snmp-devel libxml2-devel libcurl-devel
libevent(zabbix 3.4) libssh2
./configure --prefix=/usr/local/zabbix_server --with-mysql --with-net-snmp --with-libcurl
--enable-server --enable-agent --enable-proxy --with-ssh2 --enable-java --with-ldap
make && make install
2) 데이터베이스 인증
useradd zabbix
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>grant all privileges on zabbix.* to zabbix@' ip' identified by'zabbix123';
mysql>flush priviledges;
mysql>quit
proxy , schema.sql
mysql -uzabbix -p zabbix123 zabbix
3)server
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBPort=3306
DBHost= ip
4) 서버 재 부팅/usr/local/zabbix_server/sbin/zabbix_server
libevent , ldconfig
5) 전단 파일 복사cp -rp frontend/php/* nginx , nginx:nginx 775
5) 에이전트 프로필LogFile=/tmp/zabbix_agentd.log
Server=zabbix_proxy01.prd.zj,zabbix_proxy02.prd.zj,zabbix_proxy03.prd.zj,zabbix_proxy04.prd.zj,zabbix_proxy05.prd.zj,zabbix_proxy06.prd.zj
ServerActive=zabbix_proxy01.prd.zj:10051,zabbix_proxy02.prd.zj:10051,zabbix_proxy03.prd.zj:10051,zabbix_proxy04.prd.zj:10051,zabbix_proxy05.prd.zj:10051,zabbix_proxy06.prd.zj:10051
# , server
Hostname=Zabbix server
# agent
StartAgents=10
#actove ,
RefreshActiveChecks=300
# buffer
BufferSend=300
# , server
BufferSize=1000
# log ,
MaxLinesPerSecond=500
Timeout=30
Include=/wls/wls81/zabbix-agent-3.4.1/etc/zabbix_agentd.conf.d/
설치 에 문제 가 생 겼 습 니 다.
1) fping 설치http://www.fping.org/dist/fping-3.5.tar.gz
tar zxvf fping-3.5.tar.gz
./configure --prefix=/opt/fping
make && make install
vi /usr/local/zabbix_server/etc/zabbix_server.conf
FpingLocation=/opt/fping/sbin/fping
chown root.zabbix /opt/fping/sbin/fping
chmod 4710 /opt/fping/sbin/fping
fping -s localhost
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ESP-WROOM-02에서 Zabbix 서버로 Zabbix sender 프로토콜로 데이터 보내기zabbix_sender 명령에서 서버로 데이터를 전송하는 데 사용되는 프로토콜은 비교적 간단하며 네트워크에 연결할 수있는 마이크로 컴퓨터이면 충분히 구현할 수 있습니다. 이 프로토콜을 ESP-WROOM-02인 모듈...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.