安装Apache,Mysql,Php,zabbix
sudo apt-get update sudo apt-get install apache2 mysql-server libapache2-mod-php5 php5-gd php5-mysql php5-common zabbix-server-mysql zabbix-frontend-php 二服务器端配备 2.1配备连接数据库 sudo vim /etc/zabbix/zabbix_server.conf相关变更
DBName=zabbix DBUser=zabbix DBPassword=zabbix #非必不可少,但强烈推荐 StartDiscoverers=5 2.2建立mysql账户 mysql -u root -p mysql> create user 'zabbix'@'localhost' identified by 'zabbix'; mysql> create database zabbix; mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost'; mysql> flush privileges; mysql> exit; 2.3导进复位数据信息 cd /usr/share/zabbix-server-mysql/ sudo gunzip *.gz mysql -u zabbix -p zabbix < schema.sql mysql -u zabbix -p zabbix < p_w_picpaths.sql mysql -u zabbix -p zabbix < data.sql 2.4改动PHP主要参数 sudo vim /etc/php5/apache2/php.ini变化:
post_max_size = 16M max_execution_time = 300 max_input_time = 300 date.timezone = "Asia/Shanghai" 2.5配备网页页面 sudo cp /usr/share/doc/zabbix-frontend-php/examples/zabbix.conf.php.example /etc/zabbix/zabbix.conf.php sudo vim /etc/zabbix/zabbix.conf.php更改项目
$DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = 'zabbix'2.6配备阿帕奇
sudo cp /usr/share/doc/zabbix-frontend-php/examples/apache.conf /etc/apache2/conf-available/zabbix.conf sudo a2enconf zabbix.conf sudo a2enmod alias sudo service apache2 restart 2.7配备zabbixserver起动 sudo vim /etc/default/zabbix-server变化:
START=yes开始:
sudo service zabbix-server start 2.8该设备监管 sudo apt-get install zabbix-agent sudo service zabbix-agent restart 2.9浏览 http://xxx.xxx.xxx.xxx/zabbix默认帐户:
Username = admin Password = zabbix 三手机客户端配备 sudo apt-get install zabbix-agent装备
sudo vim /etc/zabbix/zabbix_agentd.conf调整项目
Server=127.0.0.1 #改动为 zabbix server 网络服务器的IP,如果有网关ip或被监管机为vm虚拟机也再加上母机的IP ServerActive=127.0.0.1 #改动为 zabbix server 网络服务器的IP Hostname=Zabbix server #改动为网页页面里边加上的Hostname,必须保持一致。简单脚本:
sudo -Hs #ubuntu 12.04,14.04不用加 #echo "deb http://ppa.launchpad.net/9v-shaun-42/zabbix22/ubuntu precise main" > /etc/apt/sources.list.d/zabbix.list apt-get update apt-get install zabbix-agent echo "Server=192.168.3.52,192.168.3.10" > /etc/zabbix/zabbix_agentd.conf.d/server.conf echo "ServerActive=192.168.3.52" >> /etc/zabbix/zabbix_agentd.conf.d/server.conf echo "Hostname=`/sbin/ifconfig eth0|sed -n '/inet addr/s/^[^:]*:([0-9.]{7,15}) .*/1/p'`" >> /etc/zabbix/zabbix_agentd.conf.d/server.conf /etc/init.d/zabbix-agent restart4厘以下的移动电话客户端安装
//安装方法 rpm -ivh yum install zabbix-agent //起动 service zabbix-agent start //开机运行 chkconfig zabbix-agent on //配备方式 vi /etc/zabbix/zabbix_agentd.conf欢迎分享,转载请注明来源:内存溢出
评论列表(0条)