Centos7安装Zabbix
1、 Install and configure Zabbix server
#sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
#systemctl stop firewalld.service && systemctl disable firewalld.service
a. Install Repository with MySQL database
Centos7安装源
#rpm -i repo.zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.arch.rpm
Centos6.X安装源
#rpm -i repo.zabbix/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.arch.rpm
Debian9安装源
# wget repo.zabbix/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb
# dpkg -i zabbix-release_3.4-1+stretch_all.deb
# apt update
Ubuntu16.04
# wget repo.zabbix/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
# apt update
Ubuntu14.04
# wget repo.zabbix/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+trusty_all.deb
# dpkg -i zabbix-release_3.4-1+trusty_all.deb
# apt update
数据库源
#wget sql/arch.rpm
#yum localinstall -arch.rpm
#yum –y update
#yum install -y mysql-community-server
#systemctl start mysqld.service
#cat /var/log/mysqld.log |grep password查询mysql默认密码
修改mysql默认密码:ALTERUSER 'root'@'localhost' IDENTIFIED BY '新密码';
设置 MySQL 参数
vim /etc/myf
在文件最后添加以下内容:
innodb_file_per_table = 1
innodb_status_file = 1
innodb_buffer_pool_size = 6G
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 16M
innodb_log_file_size = 64M
innodb_support_xa = 0
default-storage-engine = innodb
bulk_insert_buffer_size = 8M
join_buffer_size = 16M
max_heap_table_size = 32M
tmp_table_size = 32M
max_tmp_tables = 48
read_buffer_size = 32M
read_rnd_buffer_size = 16M
key_buffer_size = 32M
thread_cache_size = 32
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_rollback_on_timeout = 1
query_cache_size = 16M
query_cache_limit = 16M
collation_server = utf8_bin
character_set_server = utf8
b. Install Zabbix server, frontend, agent
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
配置 zabbix 参数
vim /etc/zabbix/f
CacheSize=512M
HistoryCacheSize=128M
HistoryIndexCacheSize=128M
TrendCacheSize=128M
ValueCacheSize=256M
Timeout=30
如果需要监控VMware虚拟机,则还需要设置以下选项参数:
StartVMwareCollectors=2
VMwareCacheSize=256M手机app接口测试
VMwareTimeout=300
配置 Apache 中的 PHP 参数
sudo vim /etc/httpd/conf.f
php_value max_execution_time 600
php_value memory_limit 256M
php_value post_max_size 32M
php_value upload_max_filesize 32M
php_value max_input_time 600
php_value always_populate_raw_post_data -1
date.timezone 去掉注释符号#,并将值修改为 Asia/Shanghai
5号工字钢规格c. Create initial database
# mysql -uroot -ppassword
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
Import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/doc/zabbix-server-mysql*/ | mysql -uzabbix -p zabbix
logback log4j2d. Configure the database for Zabbix server
vim /etc/httpd/conf.f DBpassword=数据密码
e. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:
# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd
f. Configure PHP for Zabbix frontend
Edit file /etc/httpd/conf.f, uncomment and set the right timezone for you.
# php_value date.timezone Europe/Riga
在浏览器中输入 zbx监控服务器的IP地址/zabbix,进行 zabbix 的页面初始化配置
新手如何制作小程序
Zabbix frontend is ready! The default user name is Admin, password zabbix
安装客户端
sudo yum install zabbix-agent
配置客户端
vi /etc/zabbix/f 
 Server=192.168.92.8    //安装zabbix服务端的机器的IP
 ServerActive=192.168.92.8 //安装zabbix服务端的机器的IP
 Hostname=09          //随便起,我这以被监控的机器的ip作为Hostname
promise you什么意思 关闭 防火墙  stop firewalld.service
   关闭SELinux  setenforce 0 
centos和ubuntu 启动agent
   systemctl start zabbix-agent

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。