Full installation of zabbix

Source: Internet
Author: User
Tags snmp

① Environment

Yum-y install GCC mysql-Server httpd PHP-mysql PHP-Gd PHP-bcmath PHP-xml php-mbstring mysql-devel PHP-SNMP net-snmp-devel net-snmp net -SNMP-utils openipmi-devel curl-devel

② Download and decompress

Wget http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.10.tar.gz? Download

Tar zxvf zabbix-2.0.10.tar.gz

③ Configure the zabbix Database

Useradd zabbix

CD zabbix-2.0.10

\ CP-RF/usr/share/doc/mysql-server-5.0.77/my-medium.cnf/etc/My. CNF

Mysql_install_db -- user = MySQL

/Etc/init. d/mysqld start


Enter the database:

Mysql-u root-P


Create Database zabbix Character Set utf8;

Grant all on zabbix. * to [email protected] identified by '[email protected]';

Grant all on zabbix. * to [email protected] identified by '[email protected]';


Flush privileges;

Quit


Exit Database

Mysql-uzabbix-pzabbixpwd zabbix <create/Schema/MySQL. SQL (schema. SQL)

Mysql-uzabbix-pzabbixpwd zabbix <create/data. SQL

Mysql-uzabbix-pzabbixpwd zabbix <create/data/images_mysql. SQL


④ Compile and install zabbix

. /Configure -- prefix =/usr/local/zabbix -- enable-server -- enable-proxy -- enable-agent -- With-mysql =/usr/bin/mysql_config -- With-net-snmp -- With-libcurl -- With-openipmi &&\

Make &&\

Make install

⑤ Zabbix service configuration

* Service port definition:

Edit/etc/services and append the following content:

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


* Copy the configuration file:

Mkdir/etc/zabbix

Cp misc/CONF/zabbix_server.conf/etc/zabbix/

Cp misc/CONF/zabbix_proxy.conf/etc/zabbix/

Cp misc/CONF/zabbix_agent.conf/etc/zabbix/

Cp misc/CONF/zabbix_agentd.conf/etc/zabbix/


* Modify the database username and password in the zabbix server configuration file/etc/zabbix/zabbix_server.conf:

Sed-I '95s/root/zabbix/'/etc/zabbix/zabbix_server.conf

Sed-I '103a \ dbpassword = zabbixpwd'/etc/zabbix/zabbix_server.conf


* Install the Startup Script

Cp misc/init. d/Fedora/CORE/zabbix_server/etc/init. d/

Cp misc/init. d/Fedora/CORE/zabbix_agentd/etc/init. d/



* Modify the definition of the/etc/init. d/zabbix_server variable:

Sed-I '19s # opt # usr/local # '/etc/init. d/zabbix_server

Sed-I '25s # bin # sbin # '/etc/init. d/zabbix_server



* Modify the definition of the/etc/init. d/zabbix_agentd variable:

Sed-I '19s # opt # usr/local # '/etc/init. d/zabbix_agentd

Sed-I '25s # bin # sbin # '/etc/init. d/zabbix_agentd



* Start zabbix Server:

/Etc/init. d/zabbix_server start



* Start zabbix agentd

/Etc/init. d/zabbix_agentd start



* Configure the web and copy the Web interface to the web directory:

CP-r frontends/PHP/*/var/www/html/

/Etc/init. d/httpd start


⑥ Configure zabbix on the Web

Open http: // localhost/and see the prompt:

Timezone for PHP is not set. Please set "date. timezone" option in PHP. ini.

Follow the prompts to modify the time zone settings in PHP. ini:

Date. timezone = Asia/Shanghai

Service httpd restart


Click Next, and several fail will be displayed during environment detection. Modify PHP. ini again and set the relevant parameters as prompted:

Post_max_size = 32 m

Max_execution_time= 600

Max_input_time= 600

Memory_limit = 256 m

Upload_max_filesize = 32 m

Current valuerequiredrecommended

PHP version5.1.6 5.0 5.3.0 OK

PHP memory limit 16 m 128 M 256 m fail

PHP post Max size 8 M 16 M 32 m fail

PHP Upload Max filesize 2 M 2 M 16 m OK

PHP Max execution time 30 300 600 fail

PHP Max input time 60 300 600 fail

PHP timezone Asia/Shanghai OK

PHP databases support MySQL OK

Php bc math Yes OK

Php mb string Yes OK

PHP sockets Yes OK

Php gd 2.0.28 2.0 2.0.34 OK

Gd png support Yes OK

Libxml module 2.6.26 2.6.15 2.7.6 OK

Ctype module Yes OK


After the solution, follow the prompts to continue the installation.




End:

After installation, visit:

Http: // localhost/

The default username and password are:

Admin/zabbix



Client installation Configuration:


① Environment

Yum-y install gcc


② Download and decompress

Tar zxf zabbix-2.0.10.tar.gz


③ Configure zabbix users

Useradd zabbix

CD zabbix-2.0.10



④ Compile and install zabbix

./Configure -- prefix =/usr/local/zabbix -- enable-Agent &&\

Make &&\

Make install




⑤ Zabbix service configuration

* Service port definition:

Edit/etc/services and append the following content:

Cat>/etc/services <"EOF"

Zabbix-Agent 10050/tcp zabbix agent

Zabbix-Agent 10050/udp zabbix agent

EOF



* Copy the configuration file:

Mkdir/etc/zabbix

Cp misc/CONF/zabbix_agent.conf/etc/zabbix/

Cp misc/CONF/zabbix_agentd.conf/etc/zabbix/



* Modify the configuration file:

VI/etc/zabbix/zabbix_agent.conf

Server = 192.168.168.100


VI/etc/zabbix/zabbix_agentd.conf

Server = 192.168.168.100

Hostname = server30



* Install the Startup Script

Cp misc/init. d/Fedora/CORE/zabbix_agentd/etc/init. d/

Chmod A + x/etc/init. d/zabbix_agentd



* Modify the definition of the/etc/init. d/zabbix_agentd variable:

Basedir =/usr/local/zabbix

Fullpath = $ basedir/sbin/$ binary_name


* Add to startup service:

Chkconfig -- add zabbix_agentd


* Start zabbix agentd

/Etc/init. d/zabbix_agentd start

Full installation of zabbix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.