福州网站建设价格,ip地址访问不了网站,跑腿app开发价格表,图片识别 在线识图2019独角兽企业重金招聘Python工程师标准 一般小公司大多将zabbix web端和zabbix server部署在同一台主机上#xff0c;其实二者是可以分开的#xff0c;web GUI配置连接到对应的数据库就行#xff0c;让zabbix server和MySQL数据库在同一台主机上便于数据快速… 2019独角兽企业重金招聘Python工程师标准 一般小公司大多将zabbix web端和zabbix server部署在同一台主机上其实二者是可以分开的web GUI配置连接到对应的数据库就行让zabbix server和MySQL数据库在同一台主机上便于数据快速处理。 这里在centos 7.2 x86_64上依赖LNMP源码编译安装zabbix3.2.7 1安装php7.1 yum install -y epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install -y php71w php71w-bcmath php71w-common php71w-cli php71w-mysql php71w-pdo php71w-gd php71w-fpm php71w-intl php71w-mbstring php71w-mcrypt php71w-xml php71w-xmlrpc php71w-opcache php71w-ldap php71w-pear sed -i s/post_max_size 8M/post_max_size 16M/g /etc/php.ini sed -i s/max_input_time 60/max_input_time 300/g /etc/php.ini sed -i s/max_execution_time 30/max_execution_time 300/g /etc/php.ini sed -i s/;cgi.fix_pathinfo1/cgi.fix_pathinfo0/g /etc/php.ini sed -i s/;date.timezone /date.timezone PRC/g /etc/php.ini systemctl enable php-fpm systemctl start php-fpm systemctl status php-fpm 2安装nginx1.12.1 rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install -y nginx 3,安装mysql5.7.19 rpm -Uvh http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm yum install -y mysql-community-server mysql-community-devel mysql的基础配置根据系统硬件配置my.cnf [client] port 3306 default-character-setutf8 [mysqld] port 3306 skip-name-resolve character-set-serverutf8 skip-external-locking max_connections1000 max_connect_errors10 default-storage-engineINNODB innodb_buffer_pool_size 512M innodb_log_file_size 128M innodb_log_buffer_size 8M innodb_flush_log_at_trx_commit 2 innodb_lock_wait_timeout 50 innodb_flush_methodO_DIRECT default-time-zone 8:00 event_schedulerON open_files_limit51200 systemctl enable mysqld systemctl start mysqld systemctl status mysqld grep temporary password /var/log/mysqld.log 获得临时密码 mysql -u root -p输入密码 ALTER USER rootlocalhost IDENTIFIED BY Uiop789; 修改为自己的root密码 4nginx和php的融合 mkdir -p /var/www/html/zabbix chown -R nginx:nginx /var/www/html vi /etc/nginx/conf.d/default.conf #location / { root /var/www/html; index index.php index.html index.htm; #} location ~ \.php$ { # root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcig_read_timeout 120; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } systemctl enable nginx systemctl start nginx echo ?php phpinfo(); ? /var/www/html/index.php http://IP检验lnmp是否安装成功 5安装zabbix server zabbix只会以普通用户运行如果root环境下运行zabbix会主动尝试以zabbix身份运行若系统没有zabbix用户需建立 groupadd zabbix useradd -g zabbix zabbix yum install -y net-snmp-devel curl curl-devel libxml2-devel wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.2.7/zabbix-3.2.7.tar.gz tar zxvf zabbix-3.2.7.tar.gz cd zabbix-3.2.7 ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 make install 导入数据结构 mysql -u root -p mysqlcreate database zabbix character set utf8 collate utf8_bin; mysqluse zabbix; mysqlsource /root/zabbix-3.2.7/database/mysql/schema.sql mysqlsource /root/zabbix-3.2.7/database/mysql/images.sql mysqlsource /root/zabbix-3.2.7/database/mysql/data.sql mysqlgrant all privileges on zabbix.* to zabbix% identified by Uiop!789; mysqlflush privileges; mysqlexit 修改zabbix server配置文件 vi /usr/local/etc/zabbix_server.conf DBNamezabbix DBUserzabbix DBPasswordUiop!789 DBSocket/var/lib/mysql/mysql.sock 启动zabbix_server cp /root/zabbix-3.2.7/misc/init.d/fedora/core5/zabbix_server /etc/init.d/ chkconfig --add zabbix_server chkconfig --list zabbix_server chkconfig --level 35 zabbix_server on service zabbix_server start/stop/restart 配置客户端监控sever本身 vi /usr/local/etc/zabbix_agentd.conf Server127.0.0.1 ServerActive127.0.0.1 HostnameZabbix server 启动zabbix agent cp /root/zabbix-3.2.7/misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/ chkconfig --add zabbix_agentd chkconfig --list zabbix_agentd chkconfig --level 35 zabbix_agentd on service zbbbix_agentd start/stop/restart 启动客户端客户端和服务端时间同步设置crontab0 0 * * * /usr/sbin/ntpdate -U 210.72.145.44 客户端独立安装zabbix_agentd(一般都是rpm包安装) wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.2.6/zabbix-3.2.6.tar.gz tar zxvf zabbix-3.2.6.tar.gz cd zabbix-3.2.6 ./configure --enable-agent make make install 简单安装 rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.7-1.el7.x86_64.rpm rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-sender-3.2.7-1.el7.x86_64.rpm 这样主机端安装部署就成功了随后是zabbix web端的事情了。 在zabbix server主机拷贝前端文件 cd /root/zabbix-3.2.7 cp -rp frontends/php/* /var/www/html/zabbix/ chown nginx.nginx -R /var/www/html/zabbix/ 根据以上设置直接http://IP/zabbix,即可看到前端配置提示若自定义vhost后须重启nginx 转载于:https://my.oschina.net/u/2404183/blog/1511447