ZABBIX e Linux

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 60

ZABBIX

technologyrss.com

How To Install Zabbix Server Into


Ubuntu 16.04
BY ADMIN · PUBLISHED NOVEMBER 10, 2017 · UPDATED JULY 26, 2018
Update Zabbix Server with many features. Now I have to show install Zabbix
Server 3.4.3 on Ubuntu 16.04. If you can see my old post install Zabbix Server
on Ubuntu 14.04. You can install Zabbix update version so facing some php
error.
⇒ Install And Configure Zabbix Agent in Linux or Ubuntu
⇒ How To Monitor Linux Server From Zabbix Server
⇒ How To Upgrade Zabbix Server From 3.2.6 To 3.4.1
⇒ Send Mail Notification From Zabbix Server Using Gmail

You server connect any connector such as puttyor Mobaxtream.


Step #01: Your server must update and upgrade
root@Zabbix-Server:~# apt-get update

Successfully completed update then run upgrade command.

root@Zabbix-Server:~# apt-get upgrade

Then reboot your machine command reboot with root user or using sudo.

Step #02: Now install apache web server


root@Zabbix-Server:~# apt-get install apache2

Step #03: When completed install apache server then install mysql database
server.
root@Zabbix-Server:~# apt-get install mysql-server

Mysql server setup then type password two times.

Step #04: Zabbix update version install many php. Copy all code in one line
then run it.
root@Zabbix-Server:~# apt-get install php php7.0-cli php7.0-common php7.0-mysql php7.0-mysql php7.0-curl php7.0-json
php7.0-cgi php7.0 libapache2-mod-php

Start your apache server command line

root@Zabbix-Server:~# service apache2 start

Step #05: Download Zabbix update deb file using wget command.
root@Zabbix-Server:~# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-
1+xenial_all.deb

Then follow below command for install deb file.

root@Zabbix-Server:~# dpkg -i zabbix-release_3.4-1+xenial_all.deb

Run update command

root@Zabbix-Server:~# apt-get update

Step #06: Install Zabbix mysql and Zabbix frontend-php


root@Zabbix-Server:~# apt-get install zabbix-server-mysql zabbix-frontend-php

Step #06: Configure Zabbix mysq database and user. Goto mysql terminal
root@Zabbix-Server:~# mysql -u root -p

Now create step by step database and user.

mysql> create database zabbix character set utf8 collate utf8_bin;


Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by
'passw0rd';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> cd database/mysql
mysql -uzabbix -ppassw0rd zabbix < schema.sql
mysql -uzabbix -ppassw0rd zabbix < images.sql
mysql -uzabbix -ppassw0rd zabbix < data.sql
\q

Step #07: Create Zabbix mysql table


root@Zabbix-Server:~# cd /usr/share/doc/zabbix-server-mysql/

Using below command for create zabbix database table


root@Zabbix-Server:~# zcat create.sql.gz | mysql -uroot zabbix -p

Step #08: Ensure Zabbix Server conf file inserted below lines such as
root@Zabbix-Server:~# vi /etc/zabbix/zabbix_server.conf

Insert all lines into server conf file.

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=passw0rd

Step #09: Edit your Server local time zone where Server located. When your
server Newyork then type America/New_York into php.ini file. (Line number
924)
root@Zabbix-Server:~# vi /etc/php/7.0/apache2/php.ini

Example below.

date.timezone ="America/New_York"

Now apache and Zabbix server start all is ok. Going to your browser and type
your Zabbix Server IP address and press Enter.

root@Zabbix-Server:~# service apache2 restart

If you see does’t start Zabbix Server so now start command below.

root@Zabbix-Server:~# service zabbix-server start

Now goto your browser type Zabbix server IP address as like below.

http://Zabbix-Server-IP/zabbix/
Please see web installation process for Zabbix Server
Then complete installation process now login here.

User Name : Admin


Password : zabbix
If any problem so please see my YouTube video and Subscribe channel

How To Install Zabbix Server On


Ubuntu 18.04
BY ADMIN · PUBLISHED JUNE 21, 2018 · UPDATED NOVEMBER 26, 2018
I want to show you how to install Zabbix on Ubuntu 18.04. Now release
development Zabbix server version 4.0.0alpha8. This is not fully tested on
public environment. Along with the Ubuntu update version is coming and with
it the PHP and mysql.
⇒ How To Install Zabbix Server 3.4.4 Into Ubuntu
17.04
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server Using
Gmail
⇒ How To Add Windows Host In Zabbix Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent on
Ubuntu
⇒ Monitor mysql Service In My Zabbix Server
Step #01: First update and upgrade must be run on your server.
root@technologyrsslocal:~# apt update && apt-get upgrade

Step #02: Install apache web server


root@technologyrsslocal:~# apt install apache2

Step #03: Then install mysql database command below


root@technologyrsslocal:~# apt install mysql-server
Step #04: Install update version 7.2 needed for install Zabbix server.

root@technologyrsslocal:~# apt install php php7.2-cli php7.2-mysql php7.2-common


php7.2-curl php7.2-json php7.2-cgi libapache2-mod-php7.2 php7.2

Apache web server now start command

root@technologyrsslocal:~# service apache2 start

Step #05: Download Zabbix deb file from below link

root@technologyrsslocal:~# wget
http://repo.zabbix.com/zabbix/3.5/ubuntu/pool/main/z/zabbix-release/zabbix-
release_3.5-1%2Bbionic_all.deb

Enable Zabbix repo for my server command below

root@technologyrsslocal:~# dpkg -i zabbix-release_3.5-1+bionic_all.deb

Again run update command for newly released Zabbix server

root@technologyrsslocal:~# apt update

Step #06: Zabbix server fronted mysql and php installation command below.
root@technologyrsslocal:~# apt install zabbix-server-mysql zabbix-frontend-php

Step #07: Create Zabbix database and user from mysql terminal.
root@technologyrsslocal:~# mysql -u root -p

Type your mysql password

mysql > create database zabbix character set utf8 collate utf8_bin;

mysql > grant all privileges on zabbix.* to zabbix@localhost identified by


'passw0rd';

mysql > flush privileges;

mysql > cd database/mysql

> mysql -uzabbix -ppassw0rd zabbix < schema.sql


> mysql -uzabbix -ppassw0rd zabbix < images.sql

> mysql -uzabbix -ppassw0rd zabbix < data.sql

\q

Step #08: Create mysql table for store all data goto below directory
root@technologyrsslocal:~# cd /usr/share/doc/zabbix-server-mysql/

All data import into mysql database command below

root@technologyrsslocal:/usr/share/doc/zabbix-server-mysql/# zcat create.sql.gz | mysql -uroot zabbix -p

Type mysql password and wait for few minutes

Step #09: Configure Zabbix Server conf file so open conf file via vim or vi
editor
root@technologyrsslocal:~# vi /etc/zabbix/zabbix_server.conf

Make sure insert into all below config into zabbix_server.conf file.

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=passw0rd

Step #10: Edit php.ini file for time zone


root@technologyrsslocal:~# vi /etc/php/7.2/apache2/php.ini

Now apache and Zabbix Server restart command

root@technologyrsslocal:~# service apache2 restart


root@technologyrsslocal:~# service zabbix-server start

Step #11: Goto your using browser and type Server IP address like as below.
http://Zabbix-Server-IP/zabbix/

Now see your server details like as ubuntu 18.04, mysql and php version.

$$ Zabbix welcome page then step by step follow my image installation


process click Next step

$$ Zabbix Check of pre-requisites click Next step


$$ Zabbix Configure DB connection check all setting like as
Database type : MySQL
Database host : localhost
Database port : 0
Database name : zabbix
User : zabbix
Password : passw0rd
All setting are ok then click Next step
$$ Zabbix Server details if type any name on last input box. Click Next step
$$ Pre-installation summary all is ok then click Next step
$$ Congratulation You have successfully installed Zabbix frontend. Click Finsh
$$ Now popup login form
Zabbix default user name and password.

User Name : Admin


Password : zabbix
Note: ‘A’ must be capital letter otherwise not sign in.
After login and enjoy Zabbix Server Dashboard.

See for more details from YouTube channel


Install Zabbix Agent Into Windows
BY ADMIN · PUBLISHED SEPTEMBER 15, 2017 · UPDATED NOVEMBER 24, 2018
If you not install Zabbix server then see my previous post. When configure
Zabbix server then add windows host and install Zabbix agent on your client
windows machine.
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server Using Gmail
⇒ How To Add Windows Host In Zabbix Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server

Get value from client machine into Zabbix server via Zabbix agent. So you
don’t configure Zabbix agent into windows machine then follow this guide :
At first download Zabbix pre-compiled agents from Zabbix official web site.
Step #01: Extract download file then copy all file and drop into C:\ drive any
folder.
Step #02: Open cmd must be run Administrator. Now install Zabbix agent on
windows with cmd.

C:\>zabbix_agents_3.2.0.win\bin\win64\zabbix_agentd.exe --config C:\


>zabbix_agents_3.2.0.win\conf\zabbix_agentd.win.conf --install

See as like below image successfully installed Zabbix agent on windows.

Step #03: Start Zabbix agent two ways one command line and two windows
services.
Start Zabbix agent with command line.
C:\>zabbix_agents_3.2.0.win\bin\win64\zabbix_agentd.exe --start

Step #04: Start Zabbix agent with windows services. Goto control panel /
Administrative Tools or search services. Find Zabbix agent service on the
bottom side. Like below image.

Step #05: Configure Zabbix agent file


goto C:\>zabbix_agents_3.2.0.win\conf\
open via sublime editor zabbix_agentd.win.conf
Insert Zabbix server IP address and windows host name.

Server=10.66.110.20
ServerActive=10.66.110.20
Hostname=DESKTOP-58RTMEO
Then save and goto command line for restart Zabbix agent.

C:\>zabbix_agents_3.2.0.win\bin\win64\zabbix_agentd.exe --stop
C:\>zabbix_agents_3.2.0.win\bin\win64\zabbix_agentd.exe --start

How to Install And Configure


Zabbix Agent on Ubuntu
BY ADMIN · PUBLISHED JULY 31, 2017 · UPDATED JULY 9, 2018
Now I can configure zabbix agent in linux machine [e.g Ubuntu 14.04]. Goto
your ubuntu machine or login via ssh connector. Then if you can any update
your ubuntu machine so update command below:
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server
Using Gmail
⇒ How To Add Windows Host In Zabbix
Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent
on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server
Step #01: Run ubuntu update command with apt-get.
root@ubuntuvm:~# apt-get update

Step #02: Now run ubuntu distribution upgrade command.


root@ubuntuvm:~# apt-get upgrade

Step #03: Run ZABBIX agent command with apt-get


root@ubuntuvm:~# apt-get install zabbix-agent

See image details


Install completed.

Step #04: Now configure zabbix agent file. Open zabbix agent file via vi, vim,
nano or other linux file editor.
root@ubuntuvm:~# vim /etc/zabbix/zabbix_agentd.conf

Step #05: Change two lines

Before:
#Server=127.0.0.1 [Zabbix server ip]
#Hostname=Zabbix Hostname [Hostname of client]
After:
Server=10.66.10.10
Hostname=ubuntuvm

Step #06: Then restart your zabbix agent service


root@ubuntuvm:~# service zabbix-agent restart

or using /etc/init.d/zabbix-agent restart, stop and start service.


Zabbix server restart command using /etc/init.d/
root@ubuntuvm:~# /etc/init.d/zabbix-agent restart

Zabbix server stop command using /etc/init.d/


root@ubuntuvm:~# /etc/init.d/zabbix-agent stop

Zabbix server start command using /etc/init.d/


root@ubuntuvm:~# /etc/init.d/zabbix-agent start

How to see zabbix agent service status via command line.


root@ubuntuvm:~# service zabbix-agent status

Then see as below zabbix agent details such as stop or running

Successfully completed install zabbix agen on


ubuntu 14.04

Monitor mysql Service In My


Zabbix Server
BY ADMIN · PUBLISHED AUGUST 30, 2017 · UPDATED JULY 16, 2018
Now I have to show how to check my zabbix mysql service. Another tutorial
how to monitoring mysql service via zabbix. Zabbix is very important tools for
database monitoring system. So I will configure step by step zabbix own
server mysql monitor.
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server
Using Gmail
⇒ How To Add Windows Host In Zabbix
Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent
on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server
Step #01: Open zabbix agent configure /etc/zabbix/zabbix_agentd.conf file.
root@zabbix-server:~# vim /etc/zabbix/zabbix_agentd.conf

Check user parameter file name as like below.

Step #02: Add zabbix user parameter for mysql server monitoring.
Create userparameter_mysql.conf file into /etc/zabbix/zabbix_agent.d/ location.
Open vim /etc/zabbix/zabbix_agent.d/userparameter_mysql.conf. Then insert
below all lines.
# For all the following commands HOME should be set to the directory that
has .my.cnf file with password information.

# Flexible parameter to grab global variables. On the frontend side, use keys like
mysql.status[Com_insert].

# Key syntax is mysql.status[variable].

UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';"


| HOME=/var/lib/zabbix mysql -N | awk '{print $$2}'

# Flexible parameter to determine database or table size. On the frontend side,


use keys like mysql.size[zabbix,history,data].

# Key syntax is mysql.size[, ,].

# Database may be a database name or "all". Default is "all".

# Table may be a table name or "all". Default is "all".

# Type may be "data", "index", "free" or "both". Both is a sum of data and index.
Default is "both".

# Database is mandatory if a table is specified. Type may be specified always.

# Returns value in bytes.

# 'sum' on data_length or index_length alone needed when we are getting this


information for whole database instead of a single table
UserParameter=mysql.size[*],bash -c 'echo "select sum($(case "$3" in both|"") echo
"data_length+index_length";; data|index) echo "$3_length";; free) echo
"data_free";; esac)) from information_schema.tables$([[ "$1" = "all" || ! "$1" ]]
|| echo " where table_schema=\"$1\"")$([[ "$2" = "all" || ! "$2" ]] || echo "and
table_name=\"$2\"");" | HOME=/var/lib/zabbix mysql -N'

UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive

UserParameter=mysql.version,mysql -V

Step #03: Type mysql -uroot -ppassw0rd for create database, drop database,
create user, create table, drop user, drop table etc.
root@zabbix-server:~# mysql -uroot -ppassw0rd

See as like below.

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 21406

Server version: 5.5.55-0ubuntu0.14.04.1-log (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective


owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Now create user for send data from mysql databases server with password.

mysql> create user ‘zabbix_user’@’localhost’ identified by ‘passw0rd’;


mysql> grant all privileges on *.* to ‘zabbix_user’@’localhost’;
mysql> flush privileges;
mysql> exit;
Step #04: Check userparameter_mysql.conf file on /var/lib/zabbix is blank.
Now created .my.cnf file on the /var/lib/zabbix/ location.
Open .my.cnf file as below command.

root@zabbix-server:~# vim /var/lib/zabbix/.my.cnf

Then insert previously created mysql user and password on .my.cnf file.

[mysql]

user=zabbix_user

password=passw0rd

host=localhost

[mysqladmin]
user=zabbix_user

password=passw0rd

host=localhost

Then zabbix agent restart and mysql service restart.

root@zabbix-server:~# service zabbix-agent restart


root@zabbix-server:~# service mysql restart

Step #05: Now goto your zabbix server and check latest data see all data as
like below image.
Click Monitoring/Latest data then select Hosts “zabix server name” again click
apply.

Thank You Very much. My next tutorial How To Check mysql Status On My
Zabbix Client Machine

Send Mail Notification From Zabbix


Server Using Gmail
BY ADMIN · PUBLISHED SEPTEMBER 8, 2017 · UPDATED NOVEMBER 24, 2018
Zabbix server is strong monitoring tools. I want to show how to send mail
notification from zabbix server using gmail. Get notification from zabbix server
using gmail such as services server RAM status, hard disk status, ping status,
server restart, cpu status, mysql status etc. Now I have to configure send mail
notification from Zabbix Server using gmail.
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server
Using Gmail
⇒ How To Add Windows Host In Zabbix
Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent
on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server
N.B. Must be active your gmail account less secure apps on. Goto Less Secure
Apps then click ON.
Example below:
Otherwise you can’t get any mail notification.

Step #01: At first login your Zabbix server using zabbix default user name and
password
Zabbix user name : Admin [must user capital ‘A’]
Default password : zabbix
Zabbix Dashboard as like below image.
Step #02: Goto Administration / Media Types click Email all settings such as
below.
Name : ‘Email’
Type : ‘Email’
SMTP server : ‘smtp.gmail.com’
SMTP server port : ‘25′
SMTP hello : ‘gmail.com’
SMTP email : ‘alaminmonirbd@gmail.com’
Connection security : ‘STARTTLS’
SSL verify peer : ‘N/A’
SSL verify host : ‘N/A’
Authentication : ‘Normal password’
Username : ‘alaminmonirbd’
Password : ‘your_gmail_password’
Enabled : ‘Click check mark’
Then click Update
Step #03: Goto users menu on the Administrator down tab then
click Admin user. Now show three tab such as User, Media and
Permission. Click Media tab then click Edit. Open popup window as like below
image.
Step #04: Select Type, Send to, When active, Use if severity (Not classified,
Information, Warning, Average, High, Disaster etc.) Enabled (Must click check
mark). Then click Update.
Now create trigger for ping test your zabbix client machine.
Click Configuration / Hosts then click Triggers. Now create new trigger for
ping test click on right corner on the hosts. Type any name (ping test),
Severity (High), Expression {YourHostName.agent.ping.nodata(1m)}=1
another settings are all right. Got bottom now click Add button. Successfully
created ping test trigger for zabbix client machine.
Step #05: Now goto Configuration / Actions on Click Report problems Zabbix
administrators. you can see on right status is enabled. Open three
tabs Actions, Operations and Recovery Operations. The you will see as like
image below.
 Actions (Actions setting is host trigger settings)
 Operations and (Operations settings when host may be problem then
active this option)
 Recovery Operations (Recovery Operations settings when may be host
resolved then active this optin)
 Configure Action feature below:

Create new condition select Trigger type here to search on the right
side Select then show will popup window select group on the added my client
machine and select Host on the right side client host name.
Now see all trigger on the bottom side. Click Ping Test then click Add then
click Operations tab for send custom message for mail
notification. Operationsfeature is trigger status problem and another
option Recovery operations feature is trigger status ok.
 Configure Operations feature below:
Operations Edit option as like below image.
Carefully check Operation details such as
 Operation details
1. Operation type Send message
2. Send to User groups Zabbix Administrator or Addanother user
3. Send only to Email
Then click Update not button.

 Recovery Operations configure below


Click on right tab Recovery Operations then click operations Edit and check
details below:
 Operation details
1. Operation type Send message
2. Send to User groups Zabbix Administrator or Addanother user
3. Send only to Email
Step #06: Check notification for created trigger. Goto Monitoring /
Triggers and select your host on the right corner.
Show image as like image below:
Step #07: All configuration are ready now check this status.
Two step check this status:

 Stop Zabbix agent my client machine.


I am going to Zabbix client machine and stop agent service. Wait for few
minute see red mark on trigger status now going to your gmail inbox and get
problem status.

 Start Zabbix client machine.


Now start Zabbix agent service wait for few minute see green status then goto
your mail inbox.

Thank you very much please share my post any social media

How To Add Windows Host In


Zabbix Server
BY ADMIN · PUBLISHED SEPTEMBER 8, 2017 · UPDATED JULY 22, 2018
I have to configure add windows host in zabbix server. Check windows status
such as windows RAM, hard disk, cpu, running process etc. Zabbix Server
add many services from windows host. But you can wait for few days get
service from windows host.
⇒ Install Zabbix server on ubuntu 16.04
⇒ Send Mail Notification From Zabbix Server Using Gmail
⇒ How To Add Windows Host In Zabbix Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server

Step #01: Login your Zabbix server using Zabbix default user name and
password.
Zabbix user name : Admin (Must ‘A’ is capital letter)
Zabbix password : zabbix (You can change your password anytime)
Step #02: Goto Configuration / Hosts click Create host on the top right corner.
Show as like below image:
Step #03: Three important option such as Host Name, IP
address and Templates
1. Host (Your windows host name, select any group)
2. Agent interface (Agent interface your host IP address)
3. Templates (Select windows template name “Template OS Windows”)
Then click Add two times. Successfully added windows host.

Next you have to needed how to Install Zabbix agent into windows machine.
Also visit Send mail notification from Zabbix server using gmail.
For more details goto YouTube channel and subscribe channel

How To Install FreePBX Server On


Ubuntu 14.04
BY ADMIN · PUBLISHED SEPTEMBER 8, 2017 · UPDATED DECEMBER 25, 2018
Deploy asterisk FreePBX server on ubuntu 14.04. FreePBX is an open source
ip telephony system provided by sangoma. Create virtual machine with some
configuration such as memory 2GB, RAM 2GB and harddisk 20GB.
Then install ubuntu 14.04 on your virtual machine. First install FreePBX 12 then upgrade to FreePBX 13

⊱ How To Setup CHAN SIP Trunk


⊱ How To Monitor Linux Server From Zabbix Server
⊱ How To Upgrade Zabbix Server From 3.2.6 To 3.4.1
⊱ How To Install OsTicket On Ubuntu 16.04
Step #01: FreePBX system update and upgrade needed
root@FreePBX:~# apt-get update && apt-get upgrade

Step #02: Now install some required packages like as php. mysql and git.
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2
mysql-server mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear
php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123
libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool
autoconf git subversion unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev
libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev
libspandsp-dev libmyodbc

During installation, you need to set a password for the MySQL. In my case I
set a password “passw0rd”
Now create asterisk user and asterisk database with all grant privileges.

root@FreePBX:~# mysql -uroot -ppassw0rd

show as like below

Step #03: Create asterisk database

mysql > create database asterisk;

mysql > grant all privileges on asterisk.* to asterisk@localhost identified by


'passw0rd';

mysql > create database asteriskcdrdb;


mysql > grant all privileges on asteriskcdrdb.* to asterisk@localhost identified
by 'passw0rd';

mysql > flush privileges;

mysql > exit;

Peer uninstall DB

root@FreePBX-:~# pear uninstall db

Peer Install DB

root@FreePBX:~# pear install db-1.7.14

Step #04: Goto cd /usr/src and download FreePBX required packages.

root@FreePBX:/usr/src# wget -c
https://src.fedoraproject.org/lookaside/pkgs/iksemel/iksemel-1.4.tar.gz/
md5/532e77181694f87ad5eb59435d11c1ca/iksemel-1.4.tar.gz

Now extract and step by step follow command

root@FreePBX:/usr/src# tar xf iksemel-1.4.tar.gz


root@FreePBX:/usr/src# cd iksemel-1.4/
root@FreePBX:/usr/src/iksemel-1.4# ./configure
root@FreePBX:/usr/src/iksemel-1.4# make
root@FreePBX:/usr/src/iksemel-1.4# make install
Step #05: Goto cd ../ for previous directory

root@FreePBX:/usr/src/iksemel-1.4# cd ../
root@FreePBX:/usr/src# wget -c
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-
12.8.2.tar.gz
root@FreePBX:/usr/src# git clone https://github.com/akheron/jansson.git
root@FreePBX:/usr/src# git clone https://github.com/asterisk/pjproject.git

Goto pjproject folder and run below command step by step


root@FreePBX:/usr/src# cd pjproject
root@FreePBX:/usr/src/pjproject# ./configure --enable-shared --disable-sound --
disable-resample --disable-video --disable-opencore-amr
root@FreePBX:/usr/src/pjproject# make dep
root@FreePBX:/usr/src/pjproject# make
root@FreePBX:/usr/src/pjproject# make install

Step #06: Goto cd ../ for previous directory then run one by one command

root@FreePBX:/usr/src/pjproject# cd ../jansson
root@FreePBX:/usr/src/jansson/# autoreconf -i
root@FreePBX:/usr/src/jansson/# ./configure
root@FreePBX:/usr/src/jansson/# make
root@FreePBX:/usr/src/jansson/# make install

Step #07: Goto cd ../ for previous directory

root@FreePBX:/usr/src/pjproject# cd ../
root@FreePBX:/usr/src# tar xf asterisk-12.8.2.tar.gz
root@FreePBX:/usr/src/jansson/# cd asterisk-12.8.2/
root@FreePBX:/usr/src/asterisk-12.8.2# ./configure
root@FreePBX:/usr/src/asterisk-12.8.2# contrib/scripts/get_mp3_source.sh
root@FreePBX:/usr/src/asterisk-12.8.2# make menuselect

Select format mp3 on the right tab see image below


root@FreePBX:/usr/src/asterisk-12.8.2# make
root@FreePBX:/usr/src/asterisk-12.8.2# make install
root@FreePBX:/usr/src/asterisk-12.8.2# ldconfig

Step #08: Download sound package


root@FreePBX:/usr/src/asterisk-12.8.2# cd /var/lib/asterisk/sounds/

Then extract and remove downloaded file


root@FreePBX:/var/lib/asterisk/sounds# wget
http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-
current.tar.gz
root@FreePBX:/var/lib/asterisk/sounds# tar xf asterisk-extra-sounds-en-wav-
current.tar.gz
root@FreePBX:/var/lib/asterisk/sounds# rm -rf asterisk-extra-sounds-en-wav-
current.tar.gz

Step #09: Download FreePBX web gui and added some permission

root@FreePBX:/var/lib/asterisk/sounds# cd /mnt
root@FreePBX:/mnt# wget
http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
root@FreePBX:/mnt# tar xf freepbx-12.0-latest.tgz
root@FreePBX:/mnt# useradd -m asterisk
root@FreePBX:/mnt# chown asterisk. /var/run/asterisk
root@FreePBX:/mnt# chown -R asterisk. /etc/asterisk
root@FreePBX:/mnt# chown -R asterisk. /var/{lib,log,spool}/asterisk
root@FreePBX:/mnt# chown -R asterisk. /usr/lib/asterisk
root@FreePBX:/mnt# chown asterisk /var/lib/php5/
root@FreePBX:/mnt# chown asterisk.asterisk /var/lib/php5/
root@FreePBX:/mnt# rm -rf /var/www/html

Step #10: Increase upload maximum size and add asterisk use and
group. upload_max_filesize=120M and add User asterisk, Group asterisk
root@FreePBX:# vi /etc/apache2/apache2.conf

Goto line number 109 and 110 insert below lines

User asterisk
Group asterisk

See my video for upload file size, add user and group
Step #11: Goto mysql terminal and import FreePBX asterisk and asteriskcdrdb
databases.
When database import then ask mysql database password and type here.

root@FreePBX:/mnt# cd freepbx/SQL/
root@FreePBX:/mnt/freepbx/SQL# mysql -u root -p asterisk < newinstall.sql
root@FreePBX:/mnt/freepbx/SQL# mysql -u root -p asteriskcdrdb <
cdr_mysql_table.sql

Step #12: Now install FreePBX web gui

root@FreePBX:/mnt/freepbx/SQL# cd ../
root@FreePBX:/mnt/freepbx# ./start_asterisk start
root@FreePBX:/mnt/freepbx$ ./install_amp

Then important asterisk user, asterisk DB password and IP address then


proceed.

Database engine [mysql]: Enter


Database name [asterisk]: Enter
CDR Database name [asteriskcdrdb]: Enter
Database username [root]: Enter
Database password: type your password here
File owner user [asterisk]: Enter
File owner group [asterisk]: Enter
Filesystem location from which FreePBX files will be sarved
[/var/www/html: Enter
At this time please restart asterisk.

Now your server reboot and start asterisk

root@FreePBX:/mnt/freepbx/SQL# reboot

Now got your browser and type your FreePBX server ip address then create admin
user for login web GUI.
http://10.66.51.10/admin/
Prepare login credential using created user name and password.

Troubleshooting
Client denied by server configuration: /var/www/html/admin/

How To Setup CHAN SIP Trunk


BY ADMIN · PUBLISHED OCTOBER 14, 2017 · UPDATED AUGUST 10, 2018
FreePBX is an open source IP Telephony system. If you can use home and
office for communication. At first install FreePBX on Ubuntu 14.04. After
installation completed then setup CHAN SIP TRUNK on your server. Browse
your FreePBX server via any browser. Now you follow this step by step
configure CHAN SIP TRUNK.
⊱ How To Setup CHAN SIP Trunk
⊱ How To Monitor Linux Server From Zabbix Server
⊱ How To Upgrade Zabbix Server From 3.2.6 To 3.4.1
⊱ How To Install OsTicket On Ubuntu 16.04

Step #01: Browse your FreePBX server IP and type login credential created
after installation.
Click Connectivity / Trunks (Drop down position 4) .
Appear on show This page is used to manage various system trunks.
Then click +Add Trunk and choose drop down +Add SIP (chan_sip) Trunk.
Step #02: You can see three tabs such as General, Dialed Number Manipulation
Rules and sip Settings.
General Settings:

Trunk Name : Any Name Here


Outbound CallerID : Your VOIP Number
CID Options : Allow Any CID
Maximum Channerls : N/A
Asterisk Trunk Dial Options : N/A
Continue if Busy : Must Be No
Disable Trunk : Must Be No

Step #02: Dialed Number Manipulation Rules:

These rules can manipulate the dialed number before sending it out this trunk.
If no rule applies, the number is not changed. The original dialed number is
passed down from the route where some manipulation may have already
occurred. If the number matches the combined values in the prefix plus
the match pattern boxes, the rule will be applied and all subsequent rules
ignored.
Upon a match the prefix, if defined, will be stripped. Next the prepend will
inserted in front of the match pattern and the resulting number will be sent to
the trunk. All fields are optional.
Rules:

X – matches any degit from 0-9

Z – matches any digit from 1-9

N – matches any digit from 2-9

Step #03: You can two tab Outgoing and Incoming


 Outgoing Settings:
Trunk Name : Use Any Nmae

PEER Details :

host=SIP server IP [Provided From SIP provider]


username=VOIP number [Provided From SIP provider]
secret=Connected crediantials [Provided From SIP provider]
type=peer
nat=yes
insecure=very

 Incoming Settings:
USER Context : from-trunk

USER Details :
secret=Connected crediantials [Provided From SIP provider]
type=peer
context=from-trunk
nat=yes
insecure=very
quality=yes

Step #04: Register String setup example below:


UserName:Password@SIP_Server_IP_Address

Now click Submit. Then click Apply Config


Final Step: Goto your server command line ant type asterisk -rvvvvvv
FreePBX*CLI> sip reload

If you can’t see any error massage on your astersik cli then you confirm that,
you asterisk server connected on SIP provider service

How To Install Apache CloudStack


Management Server on CentOS
6.5
BY ADMIN · PUBLISHED FEBRUARY 26, 2018 · UPDATED NOVEMBER 26, 2018
As the latest technology is cloud computing. So now I have to show you can
install Apache CloudStack management Server in CentOS 6.5. Apache
CloudStack is very strong cloud computing system. Now follow this step by
step installation process.
⇒ Install CentOS 6.5 on your virtual
environment.
⇒ How To Install CloudStack
Management Server 4.9 on Ubuntu
14.04
⇒ Prepare NFS Server For
CloudStack Management Server
CloudStack Management Server installation system requirements on CentOS
6.5.

CloudStack Management Server


requirements:
ClounStack management server and storage must fulfill below requirements.

 Operating system [CentOS 6.5]


 64-bit x86 [Maximum core for more best preference]
 4GB memory [Used maximum RAM for best performance]
 250 GB of local disk [Recommended Disk Space 500GB]
 At least 1 NIC [Local LAN]
 Configure IP address [Static IP address]
 Fully qualified domain name [e.g. CloudST-CentOS.local CloudST-
CentOS]

CloudStack Host/Hypervisor System


Requirements:
 Must be support HVM [Intel-VT or AMD-V enabled]
 64-bit x86 CPU [Maximum core for more best preference]
 Hardware virtualization support required [Software executed on these
virtual machines]
 4 GB of memory [Must be increase your RAM]
 36 GB of local disk [Must be increase your local disk]
 At least 1 NIC [configure two NIC such as LAN and WAN]
 Installed hypervisor software [e.g. Xen Server or another virtualization]
 When installed hypervisor software, then can’t create or running any vm.
Now have to show step by step configure cloudStack management server on
CentOS 6.5.

Step #01: Must be configure static ip address.


[root@CloudST-CentOS ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Change hostname open hosts file command line. Example : CloudST-


CentOS.local CloudST-CentOS

[root@CloudST-CentOS ~]# vi /etc/hosts

All config change then reboot your machine.

Step #02: Install ntp server via command line.


[root@CloudST-CentOS ~]# yum -y install ntp

Check config ntpd service using command below.

[root@CloudST-CentOS ~]# chkconfig ntpd on

Service ntpd start using command below.

[root@CloudST-CentOS ~]# service ntpd start

Step #03: Add CloudStack RPM package repository for updates when the
installation process ruining.
[root@CloudST-CentOS ~]# vi /etc/yum.repos.d/cloudstack.repo

Insert below lines into cloudstack.repo file

[cloudstack]

name=cloudstack
baseurl=http://cloudstack.apt-get.eu/centos/6/4.9/

enabled=1

gpgcheck=0

Add the public key to the trusted keys.

[root@CloudST-CentOS ~]# wget -O – http://cloudstack.apt-get.eu/release.asc|apt-key add –

Step #04: Configure NFS for manage primary and secondary storage. Install
command below:
[root@CloudST-CentOS ~]# yum -y install nfs-utils

Create two directory for primary and secondary storage. Example command
below:

[root@CloudST-CentOS ~]# mkdir -p /mnt/primary /mnt/secondary

Now permanent mount into exports file. Open exports file

[root@CloudST-CentOS ~]# vi /etc/exports

Insert below lines into exports file.

/mnt/secondary 10.44.0.0/16(rw,async,no_root_squash,no_subtree_check)

/mnt/primary 10.44.0.0/16(rw,async,no_root_squash,no_subtree_check)

Step #05: Configure firewall for incoming NFS connections.


[root@CloudST-CentOS ~]# vi /etc/sysconfig/iptables

Insert all below lines into iptables file.

#Apache CloudStack
-A INPUT -s 10.44.0.0/16 -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 32803 -j


ACCEPT

-A INPUT -s 10.44.0.0/16 -p udp -m state --state NEW -m udp --dport 32769 -j


ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 892 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p udp -m state --state NEW -m udp --dport 892 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 875 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p udp -m state --state NEW -m udp --dport 875 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p tcp -m state --state NEW -m tcp --dport 662 -j ACCEPT

-A INPUT -s 10.44.0.0/16 -p udp -m state --state NEW -m udp --dport 662 -j ACCEPT

-A FORWARD -j REJECT --reject-with icmp-host-prohibited

iptables service restart command

[root@CloudST-CentOS ~]# service iptables restart

RPC bind service start


[root@CloudST-CentOS ~]# service rpcbind start

Check config RPC bind on

[root@CloudST-CentOS ~]# chkconfig rpcbind on

Service NFS start

[root@CloudST-CentOS ~]# service nfs start

Check config NFS on

[root@CloudST-CentOS ~]# chkconfig nfs on

Step #06: Install mysql db service with command line.


[root@CloudST-CentOS ~]# yum -y install mysql-server

Open my.cnf file vi /etc/my.cnf


Insert all below lines mysqld section

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=350

log-bin=mysql-bin

binlog-format = 'ROW'

Now start mysql service command below.

[root@CloudST-CentOS ~]# service mysqld start

Check config mysql on

[root@CloudST-CentOS ~]# chkconfig mysqld on

Step #07: Edit mysql repo file for update from source. Open vi
/etc/yum.repos.d/mysql.repo
Insert all below lines into mysql.repo file.
[mysql-connectors-community]

name=MySQL Community connectors

baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/$releasever/
$basearch/

enabled=1

gpgcheck=1

Now add mysql public key from command below.

[root@CloudST-CentOS ~]# rpm --import http://repo.mysql.com/RPM-GPG-KEY-mysql

Install mysql connector python command below.

[root@CloudST-CentOS ~]# yum install mysql-connector-python

Step #08: Now main installation command on CloudStack Management


Server

[root@CloudST-CentOS ~]# yum -y install cloudstack-management

If you show error message below:

Trying other mirror.

To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red
Hat Support.

Solution : rm -rf /var/cache/yum/*


Then again start your installation command

[root@CloudST-CentOS ~]# yum -y install cloudstack-management

After CloudStack Management server installation complete then setup cloud


database command.

[root@CloudST-CentOS ~]# cloudstack-setup-databases cloud:passw0rd@localhost --


deploy-as=root

Check successfully install your Cloud Management system command below.

[root@CloudST-CentOS ~]# cloudstack-setup-management

All are ok then finish installation process from terminal. Next step goto your
browser and type your Cloud srver IP address and default port like as below.

http://Your_Server_IP:8080/client/
CloudStack Management Server default user name and password:

User name : admin


Password : password

Prepare NFS Server For


CloudStack Management Server
BY ADMIN · PUBLISHED AUGUST 28, 2017 · UPDATED NOVEMBER 24, 2018
Now I have to show this tutorial prepare NFS Server for cloudstack
management server. CloudStack management server needs two nfs share
such as primary and secondary. It can be used separate nfs server or used
cloudstack mgmt server as nfs server.
I will configure separate nfs server on cloudstack mgmt server.

Step #01: Install nfs kernel server on ubuntu 14.04


root@cloud-nfs:~# apt-get install nfs-kernel-server

Step #02: CloudStack all host, VM, snapshot, volume, iso image and more
store on the two directory such as /primary and /secondary.
 Primary storage store on all running VM on host. At least on primary
storage must be configure per zone basis.
 Secondary storage store templates, iso image and disk volume snapshot
etc.
Step #03: Create two directory /mnt/primary and /mnt/secondary for nfs share.
root@cloud-nfs:~# mkdir -p /mnt/primary /mnt/secondary

Step #04: Insert /etc/exports file your created directory. Open /etc/exports file
and insert below line.

/mnt/primary/ 10.55.0.0/16(rw,async,no_root_squash,no_subtree_check)
/mnt/secondary/ 10.55.0.0/16(rw,async,no_root_squash,no_subtree_check)

Service nfs kernel server command below.

service nfs-kernel-server start


service nfs-kernel-server stop
service nfs-kernel-server restart
showmount -e

Step #05: Insert public or local domain name on /etc/idmapd.conf below line.
Open your /etc/idmapd.conf file

root@cloud-nfs:~# vim /etc/idmapd.conf

NEED_STATD=yes

STATDOPTS="--port 662 --outgoing-port 2020"

Step #06: Goto cloud management server for mount /mnt/secondary directory.
Create /mnt/secondary directory on your cloud management server.
root@cloud-mgmt:~# mkdir /mnt/secondary

Step #08: Mount /mnt/secondary directory from nfs share on your cloud
management server.
root@cloud-mgmt:~# mount -t nfs your_nfs_server_ip:/mnt/secondary /mnt/secondary/

If you confuse then goto /mnt/secondary and create “test_directory”. Now goto
nfs server /mnt/secondary and check this created directory.

Step #09: Download vhd-util files from below link.


http://download.cloud.com.s3.amazonaws.com/tools/vhd-util
Import downloaded vhd-util file below location.

/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver

Step #10: Prepare the system VM template. Now run below command for
download system VM. Wait for at least 30 minute or less.

root@cloud-mgmt:~# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-
install-sys-tmplt -m /mnt/secondary/ -u
http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-xen.vhd.bz2 -h
xenserver
Step #11: when download completed then umount /mnt/secondary and
remove /mnt/secondary directory from your cloud management server.
root@cloud-mgmt:~# umount /mnt/secondary
root@cloud-mgmt:~# rm -rf /mnt/secondary

Next prepare hosts for cloudstack management server

How To Install CloudStack


Management Server 4.9 on
Ubuntu 14.04
BY ADMIN · PUBLISHED AUGUST 23, 2017 · UPDATED JULY 9, 2018
CloudStack management server is an open source cloud computing. It can be
installed various linux distribution such as ubuntu, redhat and centos. Now I
have to configure CloudStack Management Server on ubuntu 14.04. And I
have used hypervisor host like as XEN server 6.5. Apache CloudStack is a
cloud management system.
CloudStack Management Server installation system requirements.
CloudStack Management Server requirements:
ClounStack management server and storage must fulfill below requirements.

 Operating system [centOS/RHEL 6.3+ or Ubuntu 14.04]


 64-bit x86 [Maximum core for more best preference]
 4GB memory [Used maximum RAM for best performance]
 250 GB of local disk [Recommended Disk Space 500GB]
 At least 1 NIC [Local LAN]
 Configure IP address [Static IP address]
 Fully qualified domain name [e.g. cloud-mgmt.technologyrss.local]
CloudStack Host/Hypervisor System
Requirements:
 Must be support HVM [Intel-VT or AMD-V enabled]
 64-bit x86 CPU [Maximum core for more best preference]
 Hardware virtualization support required [Software executed on these
virtual machines]
 4 GB of memory [Must be increase your RAM]
 36 GB of local disk [Must be increase your local disk]
 At least 1 NIC [configure two NIC such as LAN and WAN]
 Installed hypervisor software [e.g. Xen Server or another virtualization]
 When installed hypervisor software, then can’t create or running any vm.
Now have to show step by step configure cloudStack management server.
Step #01: Now install ubuntu 14.04 on VM machine. Then change ssh service,
hosts file and hostname for install cloudStack management server
requirements.
 Enable ssh service on your virtual machine
 Edit hosts file via command line. (vi /etc/hosts) edit like as below.

127.0.0.1 localhost

10.55.50.10 technologyrss.local cloud-mgmt

 Edit hostname (vi /etc/hostname) like as cloud-mgmt


Hostname needed fully qualified domain name. So ping cloud-
mgmt.technologyrss.local

All is ok then reboot your machine.

Then reboot your machine.

Step #02: Install open ntp server command


root@cloud-mgmt:~# apt-get install openntpd

Step #03: Configure DEB package repository to your apt sources for ubuntu
14.04 [trusty]. Open source list file via any editor such as vi, vim or nano.
root@cloud-mgmt:~# vim /etc/apt/sources.list.d/cloudstack.list

Add below line into cloudstack.list file

deb http://cloudstack.apt-get.eu/ubuntu precise 4.9

Now we have to add public key into cloudstack apt-get

root@cloud-mgmt:~# sudo wget -O – http://cloudstack.apt-get.eu/release.asc|apt-key add –

Step #04: Now update your machine via apt-get command.


root@cloud-mgmt:~# apt-get update

Step #05: Complete update then install apt-get cloudstack management


server command below.
root@cloud-mgmt:~# apt-get install cloudstack-management

Wait up to 30 minutes or less download all packages for install cloudstack


mgmt server requirements.

Step #06: After completed install. Then install mysql server on your
management server.
root@cloud-mgmt:~# apt-get install mysql-server

Edit mysql configuration file. Open vim /etc/mysql/my.cnf


root@cloud-mgmt:~# vim /etc/mysql/my.cnf

Insert below lines under [mysqld] section the max_connections parameter


should be set to 350

[mysqld]

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=350
log-bin=mysql-bin

binlog-format = 'ROW'

Step #07: Don’t forget Create file /etc/mysql/conf.d/cloudstack.cnf and insert


just [mysqld] section.
root@cloud-mgmt:~# vim /etc/mysql/conf.d/cloudstack.cnf

Insert [mysqld] line and save it. Now restart mysql server.
root@cloud-mgmt:~# service mysql restart

Step #08: Don’t forget disable your firewall. ubuntu firewall name like as ufw.
root@cloud-mgmt:~# ufw disable

Step #09: Configure your cloud databases and add cloud user this command
below. Details as like
cloudstack-setup-databases “cloud_user”:”db_password”@localhost –deploy-
as=root:”root_passw0rd”

cloud:cloud [That means “cloud” user for password“cloud”]


root [That means mysql installation root password, Is not machine root
password]

root@cloud-mgmt:~# cloudstack-setup-databases cloud:cloud@localhost --deploy-


as=root:passw0rd

Step #10: Now start, stop and restart your management server command
below.

service cloudstack-management start

service cloudstack-management stop

service cloudstack-management start

service cloudstack-management restart


Test your cloudStack management server installed is ok. As like Command
below.

root@cloud-mgmt:~# cloudstack-setup-management

Finally Goto your browser then type server ip and port 8080.

http://10.55.50.10:8080/client/
If you can’t access web GUI then goto step #09 and read again very carefully.
Default login

UserName : admin
Password : password
Now prepare NFS Server for cloudstack management server

How To Install Zabbix Agent on


XEN Server 7.2
BY ADMIN · PUBLISHED MARCH 4, 2018 · UPDATED SEPTEMBER 16, 2018
I would like to show how you to install Zabbix agent on your XEN server 7.2
for monitoring XEN Server. So follow this step by step my instruction for setup
Zabbix agent.

⇒ Install Zabbix server on ubuntu 16.04


⇒ Send Mail Notification From Zabbix Server Using Gmail
⇒ How To Add Windows Host In Zabbix Server
⇒ Install Zabbix Agent Into Windows
⇒ How to Install And Configure Zabbix Agent on Ubuntu
⇒ Monitor mysql Service In My Zabbix Server

If you can check my previous post

How To Install Citrix XEN Server 7.0.0

Now I would like to show how to install Zabbix agent on your XEN Server
7.0.2

Step #01: At first download rpm package from Zabbix official page.
[root@XEN-SERVER ~]# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

Install Zabbix agent via command below.

[root@XEN-SERVER ~]# yum install zabbix-agent -y

Step #02: Configure iptables for allow Zabbix port. Open iptables file
[root@XEN-SERVER ~]# vi /etc/sysconfig/iptables

Then insert below line into iptables file.

# Zabbix-Agent
-A RH-Firewall-1-INPUT -p tcp –dport 10050 -j ACCEPT

Now restart your iptable service via systemctl.

[root@XEN-SERVER ~]# systemctl restart iptables

Step #03: Now configure Zabbix agent. So at first enable Zabbix agent.
[root@XEN-SERVER ~]# systemctl enable zabbix-agent

Then start Zabbix service via command.

[root@XEN-SERVER ~]# systemctl start zabbix-agent

Step #04: Edit Zabbix agent file for monitor XEN Server.
Open zabbix_agentd.conf file and insert Zabbix Server IP and your XEN
Server host name.
[root@XEN-SERVER ~]# vi /etc/zabbix/zabbix_agentd.conf

Insert all below lines into zabbix_agentd.conf file.

Server=20.50.10.10

ServerActive=20.50.10.10

Hostname=XEN-SERVER

Details :

Server=Your Zabbix Server IP address

ServerActive=Your Zabbix Server IP address


Hostname=Your XEN Server Host Name

Then save and exit command below.

Esc :wq press Enter


Finally Zabbix service restart.

[root@XEN-SERVER ~]# service zabbix-agent restart

Now goto your Zabbix Server fronted then add your XEN Server host.

See How to add host in Zabbix Server


Now enjoy your virtual environment.

Troubleshooting : when you add new rule and


can’t start iptablesservice
Error :
Job for iptables.service failed because the control process exited with error
code. See “systemctl status iptables.service” and “journalctl –xe” for details.
when you add new rule and can’t start iptables service
Solution : First save iptables new rule
[root@XEN-SERVER~]# /sbin/service iptables save

Second : iptable service start

[root@XEN-SERVER~]# service iptables start

3rd : iptable service status

[root@XEN-SERVER~]# service iptables status

Remember it! When you add new rule then first save and then start iptables
service. But many people without save and restart iptables service.

You might also like