1. Install lamp environment and dependent package
[email protected] ~]# yum install make gcc mysql-server mysql-devel libcurl-devel net-snmp-devel php php-gd php-xml php-m Ysql php-mbstring Php-bcmath httpd-y
2. Add Users
[Email protected] ~]# Groupadd Zabbix
[Email protected] ~]# useradd zabbix-g Zabbix
3. Create DATABASE, add user authorization
[[email protected] ~]#/etc/init.d/mysqld start
[Email protected] ~]# mysql-e "CREATE database Zabbix character set UTF8;"
[Email protected] ~]# MYSQL-E "grant all privileges in zabbix.* to [e-mail protected] identified by ' 123456 ';"
4. Compile and install Zabbix
[Email protected] ~]# cd/usr/local/src/
[[Email protected] ~] #wget Http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX Latest stable/2.2.3/ Zabbix-2.2.3.tar.gz
[Email protected] src]# tar zxf zabbix-2.0.2.tar.gz
[Email protected] src]# CD zabbix-2.0.2
[Email protected] zabbix-2.0.2]#/configure--prefix=/usr/local/zabbix--enable-server--enable-agent--with-mysql- -with-net-snmp--with-libcurl
[[email protected] zabbix-2.0.2]# make install
5. Import the database
[Email protected] zabbix-2.0.2]# mysql-uzabbix-p ' 123456 ' Zabbix < Database/mysql/schema.sql
[Email protected] zabbix-2.0.2]# mysql-uzabbix-p ' 123456 ' Zabbix < Database/mysql/images.sql
[Email protected] zabbix-2.0.2]# mysql-uzabbix-p ' 123456 ' Zabbix < Database/mysql/data.sql
6, copy, modify the configuration file
[Email protected] zabbix-2.0.2]# sed-i ' s/^dbuser=.*$/dbuser=zabbix/g '/usr/local/zabbix/etc/zabbix_server.conf
[Email protected] zabbix-2.0.2]# sed-i ' s/^.*dbpassword=.*$/dbpassword=123456/g '/usr/local/zabbix/etc/zabbix_ Server.conf
[Email protected] zabbix-2.0.2]# cp-r Frontends/php/var/www/html/zabbix
[email protected] zabbix-2.0.2]# CP misc/init.d/fedora/core/zabbix_*/etc/init.d/
[[email protected] zabbix-2.0.2] #sed-i ' s/basedir=\/usr\/local/basedir=\/usr\/local\/zabbix/g '/etc/init.d/zabbix_ Server
[[email protected] zabbix-2.0.2] #sed-i ' s/basedir=\/usr\/local/basedir=\/usr\/local\/zabbix/g '/etc/init.d/zabbix_ Agentd
7. Add Service port
[email protected] ~]# cat >>/etc/services <<eof
> zabbix-agent 10050/tcp Zabbix Agent
> zabbix-agent 10050/udp Zabbix Agent
> Zabbix-trapper 10051/tcp Zabbix Trapper
> Zabbix-trapper 10051/udp Zabbix Trapper
> EOF
8, modify the php.ini
[[Email protected] ~] #sed-i ' s/^\ (. *\) Date.timezone =.*$/date.timezone = asia\/shanghai/g '/etc/php.ini
[[Email protected] ~] #sed-i ' s/^\ (. *\) post_max_size =.*$/post_max_size = 16m/g '/etc/php.ini
[[Email protected] ~] #sed-i ' s/^\ (. *\) Max_execution_time =.*$/max_execution_time = 300/g '/etc/php.ini
[[Email protected] ~] #sed-i ' s/^\ (. *\) Max_input_time =.*$/max_input_time = 300/g '/etc/php.ini
9. Start the service
[[email protected] ~]#/etc/init.d/zabbix_server start
[[email protected] ~]#/etc/init.d/zabbix_agentd start
[[email protected] ~]#/etc/init.d/httpd start
10. Web Configuration Service
Http://IP/zabbix
650) this.width=650; "src=" http://s5.sinaimg.cn/middle/56115979xc82c9c942c54&690 "alt=" Zabbix-2.0.2 Latest Version installation Test "/ >
11. Check the PHP environment
650) this.width=650; "src=" http://s6.sinaimg.cn/middle/56115979xc82c9da496c5&690 "alt=" Zabbix-2.0.2 Latest Version installation Test "/ >
12. Database Configuration
650) this.width=650; "src=" http://s9.sinaimg.cn/middle/56115979xc82c9f2f8208&690 "alt=" Zabbix-2.0.2 Latest Version installation Test "/ >
13, host and Port
650) this.width=650; "src=" http://s12.sinaimg.cn/middle/56115979xc82ca027bc5b&690 "alt=" Zabbix-2.0.2 Latest version installation Test " />
14. Configuration Preview
650) this.width=650; "src=" http://s12.sinaimg.cn/middle/56115979xc82ca108c39b&690 "alt=" Zabbix-2.0.2 Latest version installation Test " />
15, configure the fail, click Save configuration file to save zabbix.conf.php to local, then upload to the server/var/www/html/zabbix/conf directory, and then retry (Do not use thunder and other third-party download)
650) this.width=650; "src=" http://s3.sinaimg.cn/middle/56115979x7a6add07c7e2&690 "alt=" Zabbix-2.0.2 Latest Version installation Test "/ >
16, the configuration is correct after the refresh, click Finsh Complete can
650) this.width=650; "src=" http://s12.sinaimg.cn/middle/56115979xc82ca359de3b&690 "alt=" Zabbix-2.0.2 Latest version installation Test " />
17, login interface, the initial user name is: admin Password: Zabbix
650) this.width=650; "src=" http://s1.sinaimg.cn/middle/56115979xc82ca56dca10&690 "alt=" Zabbix-2.0.2 Latest Version installation Test "/ >
18, landing on the home page, see Zabbix server is running status is yes, on behalf of the ZABBIX Monitoring Server deployment Success
650) this.width=650; "src=" http://s16.sinaimg.cn/middle/56115979x7a6addf5d55f&690 "alt=" Zabbix-2.0.2 Latest version installation Test " />
This article from "Linux operation and Maintenance combat" blog, declined reprint!
Installation of Zabbix