Deploy Zabbix Open-Source Monitoring System in Ubuntu

Source: Internet
Author: User
1. Install Basic Environment 1) LAMPsudoapt-getupdatesudoapt-getinstallapache2mysql-servermysql-clientphp5php5-gdphp5-mysql2) Basic Software

1. Install the Basic Environment
1) LAMP
Sudo apt-get update
Sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
2) Basic Software
Sudo aptitude install build make snmplibsnmp-devsnmpdlibmysql +++ devminicomlibcurl4-openssl-devfping
3) install the Basic Environment offline
Run the above installation on a computer that can access the internet. Install all the software. The default software is downloaded to/var/cache/apt/archives for packaging.
Tar-zcvf ~ /Var_apt.tar.gz/var/cache/apt
Copy to the Installation server to unpack
Var_apt.tar.gz-C/tar-zcvf/
Install all software packages under archives
Sudo dpkg-I *. deb
4) Fping configuration change
Run as root
Cp/usr/bin/fping/usr/sbin/
Cp/usr/bin/fping6/usr/sbin/
Chown root. zabbix/usr/sbin/fping
Chmod 710/usr/sbin/fping
Chmod ug + s/usr/sbin/fping

2. Install zabbix
1) Configure users and databases
* Create zabbix user groups and users:
Sudo useradd zabbix
Sudo adduser zabbix dialout (SMS cat user)
Sudo passwd zabbix
* Create a mysql database:
Sudo mysql-u root-p
Create database zabbix character set utf8;
* Create a mysql user:
Grant all on zabbix. * to zabbix @ localhost identified by 'zabbix ';
2) Import tables and data
Cd zabbix-1.8
Sudo mysql-uroot-p zabbix <create/schema/mysql. SQL
Sudo mysql-uroot-p zabbix <create/data/images_mysql. SQL
Sudo mysql-uroot-p zabbix <create/data. SQL
3) Configure Compilation
Tar zxf zabbix-1.8.tar.gz
Cd zabbix-1.8
Sudo./configure -- prefix =/usr/local/zabbix -- enable-server -- enable-agent -- enable-ipv6 -- with-mysql -- with-net-snmp ---

Libcurl -- with-ldap
Sudo make install
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
4) Service port Definition
Edit/etc/services and append the following content:
Zabbix-agent 10050/tcp # Zabbix Agent
Zabbix-agent 10050/udp # Zabbix Agent
Zabbix-trapper 10051/tcp # Zabbix Trapper
Zabbix-trapper 10051/udp # Zabbix Trapper
5) copy the configuration file
Sudo mkdir/etc/zabbix
Sudo chown-R zabbix. zabbix/etc/zabbix/
Sudo cp misc/conf/*/etc/zabbix
6) modify the zabbix server configuration file
Sudo vi/etc/zabbix/zabbix_server.conf
Modification content:
DBName = zabbix
DBUser = zabbix
DBPassword = zabbix
PidFile =/var/tmp/zabbix_server.pid
LogFile =/var/log/zabbix/zabbix_server.log
AlertScriptsPath =/etc/zabbix/alert
FpingLocation =/usr/local/sbin/fping
Finally, create a log directory:
Sudo mkdir/var/log/zabbix
Sudo chown-R zabbix. zabbix/var/log/zabbix/
Create a defined directory:
Sudo mkdir/etc/zabbix/alert
Sudo chown-R zabbix. zabbix/etc/zabbix/alert
7) modify the zabbix agentd configuration file
Sudo vi/etc/zabbix/zabbix_agentd.conf
Add the following content:
Server = 127.0.0.1
# ServerPort = 11051
Hostname = zabbix
PidFile =/var/tmp/zabbix_agentd.pid
LogFile =/var/log/zabbix/zabbix_agentd.log
8) configure the Startup Script
Copy the startup script:
Sudo cp misc/init. d/debian/zabbix-server/etc/init. d/zabbix-server
Sudo cp misc/init. d/debian/zabbix-agent/etc/init. d/zabbix-agent
Modify the server startup script:
Sudovi/etc/init. d/zabbix-server
Change DAEMON =/usr/local/sbin/$ {NAME} to DAEMON =/usr/local/zabbix/sbin/$ {NAME}
PID =/tmp/$ NAME. pid to PID =/var/tmp/$ NAME. pid

Modify the client Startup Script: Same as above
Enable startup
Sudo update-rc.d zabbix-server ults
Sudo update-rc.d zabbix-agent ults

9) configure the Web Interface
* 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
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

Restart apache, access http: // ip/zabbix, and initialize the configuration as prompted.

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.