第一次写博文,是关于zabbix的环境搭建,安装的版本是2.0.4,大家按照顺序复制-粘贴就可以了
我的搭建环境 CentOS-6.4-x86_64-minimal
yum install httpd.x86_64 httpd-manual.x86_64 php-xmlphp-mbstring mysql-server.x86_64 mysql.x86_64 php-mysql.x86_64 php.x86_64 php-bcmath.x86_64 php-gd.x86_64 mysql-devel.x86_64curl-develgcc.x86_64 libgcc.x86_64makenet-snmp.x86_64 net-snmp-devel.x86_64 net-snmp-utils.x86_64wget curl-devel
gcc.x86_64 libgcc.x86_64 make net-snmp.x86_64 net-snmp-devel.x86_64 net-snmp-utils.x86_64 wget
vi /etc/httpd/conf/httpd.conf
ServerName localhost:80
service httpd restart
chkconfig --add httpd
chkconfig --level 345 httpd on
service mysqld start
mysqladmin -uroot -p password 123456Enter password: 输入旧密码(如果是第一次设置,root 默认密码为空,直接回车)
chkconfig --add mysqld
chkconfig --level 345 mysqld on
wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.4/zabbix-2.0.4.tar.gz
gunzip zabbix-2.0.4.tar.gz
tar -xvf zabbix-2.0.4.tar
useradd -d /home/zabbix -p zabbix zabbix
mysql -uroot -p123456
create database zabbix character set utf8;
flush privileges;
quit;
mysql -uroot -p'123456' zabbix < /root/zabbix-2.0.4/database/mysql/schema.sql
mysql -uroot -p'123456' zabbix < /root/zabbix-2.0.4/database/mysql/images.sql
mysql -uroot -p'123456' zabbix < /root/zabbix-2.0.4/database/mysql/data.sql
cd zabbix-2.0.4
./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --enable-proxy
make install
vi /etc/servers
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agent
zabbix-trapper 10051/tcp #Zabbix Trapper
zabbix-trapper 10051/udp #Zabbix Trapper
mkdir /etc/zabbix
cp -r /root/zabbix-2.0.4/conf/* /etc/zabbix/
vi /etc/zabbix/zabbix_server.conf
vi /usr/local/etc/zabbix_server.conf
DBUser=root
DBPassword=123456
wget http://www.fping.org/dist/fping-3.4.tar.gz
gunzip fping-3.4.tar.gz
tar xvf fping-3.4.tar
cd fping-3.4
./configure
make install
vi /etc/zabbix/zabbix_server.conf
FpingLocation=/usr/local/sbin/fping
cp -r /root/zabbix-2.0.4/frontends/php/* /var/www/html
vi /etc/php.ini
max_execution_time = 300
max_input_time = 300
memory_limit = 128M
post_max_size = 16M
date.timezone = PRC
/usr/local/sbin/zabbix_server
/usr/local/sbin/zabbix_agentd
service httpd restart
安装完成后的界面:
更改语言: