Zabbix 2.03 source code compilation and installation Configuration

Source: Internet
Author: User
Tags snmp

I. First download the zabbix 2.0.3 source code package on the official website:

Http://www.zabbix.com/download.php

2. Configure the installation environment on ubuntu_server_12.04:
# Apt-Get update
# Apt-Get install apache2 mysql-server mysql-client PhP5 php5-gd php5-mysql libapache2-mod-php5 libcurl4-openssl-dev libsnmp-Dev

Configure the database:
# Mysql-u <username>-P <password>
Mysql> Create Database zabbix Character Set utf8;
Mysql> quit;
// Import the database tables under database/MySQL in the source code package to the database.
# Mysql-u <username>-P <password> zabbix <database/MySQL/Schema. SQL
# Mysql-u <username>-P <password> zabbix <database/MySQL/images. SQL
# Mysql-u <username>-P <password> zabbix <database/MySQL/data. SQL

3. Install the compiling environment:
# Apt-Get make gcc

4. Compile the source code of the server (the parameters can be selected freely ):
Configuration parameters:
-- Enable-server install zabbix Server
-- Enable-proxy install zabbix proxy
-- Enable-Agent install zabbix agent
-- With-mysql uses MySQL as a database server
-- With-net-snmp supports SNMP
-- With-libcurl supports curl for Web Monitoring

#./Configure -- prefix =/usr/local -- enable-server -- enable-agent -- With-mysql -- With-net-snmp -- With-libcurl

5. configure Server:
1. Check whether zabbix-Trapper 10051/TCP and zabbix-Trapper 10051/udp are configured under/etc/services. If no configuration is configured, add it;
2. modify the configuration file:
# Vi/usr/local/etc/zabbix_server.conf
Listenport = 10051
Logfile =/tmp/zabbix_server.log
Pidfile =/tmp/zabbix_server.pid
Dbhost = localhost
Dbname = zabbix
Dbuser = root
Dbpassword = jovaunn1
Dbsocket =/var/run/mysqld. Sock
Dbport = 3306
3. Copy zabbix-agent to/etc/init. d:
# Cp zabbix-2.0.3/MISC/init. d/Debian/zabbix-server/etc/init. d
And modify daemon and desc in zabbix-server as follows:
Name = zabbix_server
Daemon =/usr/local/sbin/$ {name}
Desc = "zabbix server daemon"
PID =/tmp/$ name. PID
4. Restart the Server Service:
# Service zabbix-server restart

6. Configure Web Services:
1. Copy the Web interface to the web directory:
# Sudo mkdir/var/www/zabbix
# Sudo chown-r zabbix. zabbix/var/www/zabbix
# Cp-r frontends/PHP/*/var/www/zabbix
2. Edit the php. ini file:
# Sudo VI/etc/PhP5/apache2/PHP. ini
Max_execution_time= 600
Max_input_time= 600
Memory_limit = 256 m
Post_max_size = 32 m
Upload_max_filesize = 16 m
; Date. timezone ==> remove comments and add Asia/Shanghai
# Sudo VI/etc/apache2/apache2.conf
Add servername 127.0.0.1 to the following line
3. Restart the apache service and access the service with http: // server_ip/zabbix. initialize the configuration as prompted.

7. Configure the client:
1. Compile the client (the client can install the configuration on the local machine or another server)
./Configure -- enable-agent -- prifix =/usr/local
2. Check whether zabbix-Agent 10050/TCP and zabbix-Agent 10050/udp are configured under/etc/services. If no configuration is configured, add the configuration;
3. Modify the Configuration:
# Vi/usr/local/etc/zabbix_agent.conf
Server = server_ip
4. Copy zabbix-agent to/etc/init. d:
# Cp zabbix-2.0.3/MISC/init. d/Debian/zabbix-agent/etc/init. d
And modify daemon and desc in zabbix-server as follows:
Name = zabbix_agentd
Daemon =/usr/local/sbin/$ {name}
Desc = "zabbix agent daemon"
PID =/tmp/$ name. PID
5. Restart the agent service:

# Service zabbix-Agent restart



Web login, Administrator identity:

Account: Admin

Password: zabbix


Reference: http://www.zabbix.com/documentation/2.0/manual/installation/install

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.