How To install REAR and BAREOS With PostgreSQL on CentOS7

How To install REAR and BAREOS With PostgreSQL on CentOS7

1.Install PostgreSQL
2.Install BAREOS
3.Install REAR


A PGDG file is available for each distribution/architecture/database version combination. Browse and find your correct RPM. For example, to install PostgreSQL 9.4 on CentOS 6 64-bit:

yum localinstall

Install PostgreSQL

To list available packages:

yum list postgres*

For example, to install a basic PostgreSQL 9.4 server:

yum install postgresql94-server

The PostgreSQL data directory contains all of the data files for the database. The variable PGDATA is used to reference this directory.


The first command (only needed once) is to initialize the database in PGDATA.

/usr/pgsql-9.4/bin/postgresql94-setup initdb

To enable database service, use:

systemctl enable postgresql-9.4.service

Start PostgreSQL

systemctl start postgresql-9.4.service

2.Install BAREOS



On RHEL 7 it is available through the RHEL Server Optional channel. On CentOS 7 and Fedora is it included on the main repository.

wget -O /etc/yum.repos.d/bareos.repo

yum install bareos bareos-database-postgresql

If your are using PostgreSQL and your PostgreSQL administration user is postgres (default), use following commands:

su postgres -c /usr/lib/bareos/scripts/create_bareos_database
su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges

Start the daemons

service bareos-dir start
service bareos-sd start
service bareos-fd start

You will eventually have to allow access to the ports 9101-9103, used by Bareos.

Now you should be able to access the director using the bconsole.


Installing Bareos Webui

System Requirements

A working Bareos environment, Bareos >= 15.2.2, including JSON API mode, see jansson.
A Bareos platform, where bareos-webui packages are provided.
An Apache 2.x Webserver with mod-rewrite, mod-php5 and mod-setenv
PHP >= 5.3.3
Zend Framework 2.2.x or later. Note: Unfortunately, not all distributions offer a Zend Framework 2 package. The following list shows where to get the Zend Framework 2 package.
SUSE, Debian, Ubuntu


Install EPEL to solve dependencies:

yum install -y epel-release

After adding the repository simply install the bareos-webui package via your package manager.

yum install bareos-webui

The bareos-webui package provides a default console and profile configuration under /etc/bareos/bareos-dir.d/, which have to be included at the bottom of your /etc/bareos/bareos-dir.conf and edited to your needs.

Add webui-consoles and webui-profiles to the Bareos Director configuration

echo @/etc/bareos/bareos-dir.d/webui-consoles.conf >> /etc/bareos/bareos-dir.conf
echo @/etc/bareos/bareos-dir.d/webui-profiles.conf >> /etc/bareos/bareos-dir.conf

webui-consoles.conf looks like:

# Restricted console used by bareos-webui
Console {
Name = user1
Password = “CHANGEME”
Profile = webui

webui-profiles.conf looks like:

# bareos-webui default profile resource
Profile {
Name = webui
CommandACL = status, messages, show, version, run, rerun, cancel, .api, .bvfs_*, list, llist, use, restore, .jobs, .filesets, .clients
Job ACL = *all*
Schedule ACL = *all*
Catalog ACL = *all*
Pool ACL = *all*
Storage ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Where ACL = *all*

If you have installed from package, a default configuration is provided, please see /etc/apache2/conf.d/bareos-webui.conf, /etc/httpd/conf.d/bareos-webui.conf or /etc/apache2/available-conf/bareos-webui.conf.

The required Apache modules, setenv, rewrite and php are enabled via package postinstall script. You simply need to restart your apache webserver manually.

Configure your directors in /etc/bareos-webui/directors.ini to match your settings, which you have chosen in the previous steps.

Full in Your FQND .

; Bareos WebUI Configuration
; File: /etc/bareos-webui/directors.ini

; Section localhost-dir

; Enable or disable section. Possible values are “yes” or “no”, the default is “yes”.
enabled = “yes”

; Fill in the IP-Address or FQDN of you director.
diraddress = “localhost”

; Default value is 9101
dirport = 9101

; Note: TLS has not been tested and documented, yet.
;tls_verify_peer = false
;server_can_do_tls = false
;server_requires_tls = false
;client_can_do_tls = false
;client_requires_tls = false
;ca_file = “”
;cert_file = “”
;cert_file_passphrase = “”
;allowed_cns = “”

; Section remote-dir
enabled = “no”
diraddress = “hostname”
dirport = 9101
; Note: TLS has not been tested and documented, yet.
;tls_verify_peer = false
;server_can_do_tls = false
;server_requires_tls = false
;client_can_do_tls = false
;client_requires_tls = false
;ca_file = “”
;cert_file = “”
;cert_file_passphrase = “”
;allowed_cns = “”


Allow HTTPD scripts and modules to connect to the network

setsebool -P httpd_can_network_connect on


If you prefer to use bareos-webui on Nginx with php5-fpm instead of Apache, a basic working configuration could look like this:

server {

listen       9100;
server_name  bareos;
root         /var/www/bareos-webui/public;

location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;

location ~ .php$ {

include snippets/fastcgi-php.conf;

# With php5-cgi alone pass the PHP
# scripts to FastCGI server
# listening on

# fastcgi_pass;

# With php5-fpm:

fastcgi_pass unix:/var/run/php5-fpm.sock;



Starting the Daemons and Apache

service httpd start

service bareos-dir restart

To log in BAREOS-WEBUI  please visit : http://yourIP/bareos-webui/

login: user1
passwd: CHANGEME

To change This credentials have a look in file /etc/bareos/bareos-dir.d/webui-consoles.conf

Lets Start Using BAREOS

The bconsole runs the Bareos Console program



sudo bconsole

Type help to see a list of available commands:


Usefull Commands to have a look:

* show filesets
* status dir
* status client
* status storage

Okey lets run some Job:

Type run


you should get the following output:

Automatically selected Catalog: MyCatalog
Using Catalog “MyCatalog”
A job name must be specified.
The defined Job resources are:
1: BackupClient1
2: BackupCatalog
3: RestoreFiles
Select Job resource (1-3):

Here, Bareos has listed the three different Jobs that you can run, and you should choose number 1 and type enter, at which point you will get:

Run Backup job
JobName:  BackupClient1
Level:    Incremental
Client:   bareos-fd
Format:   Native
FileSet:  Full Set
Pool:     File (From Job resource)
NextPool: *None* (From unknown source)
Storage:  File (From Job resource)
When:     2013-05-23 14:50:04
Priority: 10
OK to run? (yes/mod/no):

Choose “yes

If you want to read message type:


At this point, the job is BLOCKED waiting for a Volume. You can check this if you want by doing a status dir. In order to continue, we must create a Volume that Bareos can write on. We do so with:


and Bareos will print:
The defined Storage resources are:
1: File
Item 1 selected automatically.
Enter new Volume name:

at which point, you should enter some name beginning with a letter and containing only letters and numbers (period, hyphen, and underscore) are also permitted. For example, enter TestVolume001, and you should get back:

Defined Pools:
1: Default
Item 1 selected automatically.
Connecting to Storage daemon File at bareos:8103 …
Sending label command for Volume “TestVolume001” Slot 0 …
3000 OK label. Volume=TestVolume001 Device=/var/lib/bareos/storage
Catalog record for Volume “TestVolume002”, Slot 0  successfully created.
Requesting mount FileStorage …
3001 OK mount. Device=/var/lib/bareos/storage


Type to see your files:

ls -l /var/lib/bareos/storage

Finally, enter messages and you should get something like:
28-Apr-2003 14:30 bareos-sd: Wrote label to prelabeled Volume
“TestVolume001” on device /var/lib/bareos/storage
28-Apr-2003 14:30 rufus-dir: Bareos 1.30 (28Apr03): 28-Apr-2003 14:30
JobId:                  1
Job:                    BackupClient1.2003-04-28_14.22.33
FileSet:                Full Set
Backup Level:           Full
Client:                 bareos-fd
Start time:             28-Apr-2003 14:22
End time:               28-Apr-2003 14:30
Files Written:          1,444
Bytes Written:          38,988,877
Rate:                   81.2 KB/s
Software Compression:   None
Volume names(s):        TestVolume001
Volume Session Id:      1
Volume Session Time:    1051531381
Last Volume Bytes:      39,072,359
FD termination status:  OK
SD termination status:  OK
Termination:            Backup OK
28-Apr-2003 14:30 rufus-dir: Begin pruning Jobs.
28-Apr-2003 14:30 rufus-dir: No Jobs found to prune.
28-Apr-2003 14:30 rufus-dir: Begin pruning Files.
28-Apr-2003 14:30 rufus-dir: No Files found to prune.
28-Apr-2003 14:30 rufus-dir: End auto prune.

If you don’t see the output immediately, you can keep entering messages until the job terminates.

Instead of typing messages multiple times, you can also ask bconsole to wait, until a specific job is finished:
wait jobid=1

If you have run the default configuration and run the job as demonstrated above, you can restore the backed up files in the Console program by entering:

*restore all

3.Install REAR

Distribution packages

Various distributions ship Relax-and-Recover as part of their distribution, albeit not always the latest stable release. Here is an overview:

RHEL, CentOS, Scientific Linux, Oracle Linux

Add the EPEL or Repoforge repository and type:

yum install rear

yum install -y mkisofs genisoimage syslinux -y

Now edit the etc/rear/local.conf configuration file:

cat > /etc/rear/local.conf <<EOF
### write the rescue initramfs to USB and update the USB bootloader

### Write the ISO image to disk. The default is in /var/lib/rear/output/

### BAREOS_FILESET=Full Only if you have more than one fileset defined for your clients backup jobs, you need to specify which to use for restore

###To backup to local disk, use BACKUP_URL=file:///directory/path/

###         To use Tar option Uncomment below section              ###
### create a backup using the internal NETFS method, using ‘tar’

### write both rescue image and backup to the device labeled REAR-000

Now you are ready to create a rescue image. We want verbose output (-v option).

sudo /usr/sbin/rear -v mkrescue

If that worked, you can dive into the advanced Relax-and-Recover options and start creating full backups. If your device has enough space, initiate a backup using:

sudo /usr/sbin/rear -v mkbackup

Thank You for using my page-blog. If you have question about this topic feel free to ask,I will be glad to help you!

Also more inforation about PostgreSQL REAR and BAREOS can find Below.
Links TO: REAR or REAR Configuration Especial thanks to Gratien D’haese
Link TO: BAREOS Docs
Link TO: PostgreSQL

How to install icinga 2 on Centos7.

Setting up Icinga 2

### Install repo
rpm –import

curl -o /etc/yum.repos.d/ICINGA-release.repo

yum makecache

### Install Icinga2

yum install icinga2

systemctl enable icinga2

systemctl start icinga2

#### Enabled Features during Installation
The default installation will enable three features required for a basic Icinga 2 installation:

* checker for executing checks
* notification for sending notifications
* mainlog for writing the icinga2.log file

You can verify that by calling icinga2 feature list CLI command to see which features are enabled and disabled.

icinga2 feature list
Disabled features: api command compatlog debuglog graphite icingastatus ido-mysql ido-pgsql livestatus notification perfdata statusdata syslog
Enabled features: checker mainlog notification

#### Setting up Check Plugins
Without plugins Icinga 2 does not know how to check external services. The Monitoring Plugins Project provides an extensive set of plugins which can be used with Icinga 2 to check whether services are working properly.

yum install epel-release

yum install nagios-plugins-all

### Running Icinga 2
Icinga2 packages automatically install the necessary systemd unit files

systemctl enable icinga2

systemctl restart icinga2

Setting up Icinga Web 2

### Installing MySQL database server

yum install mariadb-server mariadb

systemctl enable mariadb

systemctl start mariadb


#### Installing the IDO modules for MySQL

yum install icinga2-ido-mysql php-mysql php-ldap

#### Setting up the MySQL database

Set up a MySQL database for Icinga 2:

mysql -u root -p

mysql>  CREATE DATABASE icinga;

mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql

### Enabling the IDO MySQL module

icinga2 feature enable ido-mysql

systemctl restart icinga2

### Setting up the webserver

sed -i ‘s/;date.timezone =/&\ndate.timezone = Europe\/Brussels/’ /etc/php.ini

yum install httpd

systemctl enable httpd

systemctl start httpd

#### Firewall Rules

firewall-cmd –add-service=http

firewall-cmd –permanent –add-service=http

### Setting Up External Command Pipe
Web interfaces and other Icinga addons are able to send commands to Icinga 2 through the external command pipe.

icinga2 feature enable command

systemctl restart icinga2

By default the command pipe file is owned by the group icingacmd with read/write permissions. Add your webserver’s user to the group icingacmd to enable sending commands to Icinga 2 through your web interface:

usermod -a -G icingacmd *www-data*

usermod -a -G icingacmd apache

usermod -a -G icinga apache

The webserver’s user is different between distributions so you might have to change www-data to wwwrun, www, or apache. Change “www-data” to the user you’re using to run queries.

### Installing Icinga Web 2

yum install icingaweb2

systemctl restart httpd

#### Preparing Web Setup
You can set up Icinga Web 2 quickly and easily with the Icinga Web 2 setup wizard which is available the first time you visit Icinga Web 2 in your browser. When using the web setup you are required to authenticate using a token. In order to generate a token use:

yum install icingacli

icingacli setup token create

In case you do not remember the token you can show it using

icingacli setup token show

Finally visit Icinga Web 2 in your browser to access the setup wizard and complete the installation: /icingaweb2/setup

attention: resource icinga_ido database = icinga !!!!

If you want to test icinga 2 with Vagrant using Ansible please visit Here

How to create ISO file with Kickstart on CentOS 6,CentOS 7

How to create ISO file with Kickstart on CentOS 6,CentOS 7

Create a directory to mount your source.
mkdir /tmp/bootiso.

Loop mount the source ISO you are modifying. (Download from Red Hat / CentOS.)
mount -o loop /path/to/some.iso /tmp/bootiso

Create a working directory for your customized media.
mkdir /tmp/bootisoks

Copy the source media to the working directory.
cp -r /tmp/bootiso/. /tmp/bootisoks/

Unmount the source ISO and remove the directory.
umount /tmp/bootiso && rmdir /tmp/bootiso.

Change permissions on the working directory.
chmod -R u+w /tmp/bootisoks

Copy your Kickstart script which has been modified for the packages and %post to the working directory.
cp /path/to/someks.cfg /tmp/bootisoks/isolinux/ks.cfg


Create Kickstart script yourself with this kind of context.
vi /tmp/bootisoks/isolinux/ks.cfg

#platform=x86, AMD64, or Intel EM64T
# Install OS instead of upgrade
# Keyboard layouts
keyboard ‘us’
# Reboot after installation
# Root password
rootpw –iscrypted $1$bjT84QyG$x7h6GNsQu0z2pjbJE5821.
# System timezone
timezone Europe/Brussels
# System language
lang en_US
# Firewall configuration
firewall –enabled –http –ftp –ssh
# Network information
network –bootproto=static –device=eth0 –gateway= –ip= –nameserver= –netmask=
# System authorization information
auth –useshadow –passalgo=sha512
# Use CDROM installation media
# Use graphical install
firstboot –disable
# SELinux configuration
selinux –enforcing
# Do not configure the X Window System

# System bootloader configuration
bootloader –location=mbr
# Clear the Master Boot Record
# Partition clearing information
clearpart –all –initlabel
# Disk partitioning information
part / –fstype=”ext4″ –grow –size=1
part /boot –fstype=”ext4″ –size=500
part swap –fstype=”swap” –size=1500
Copy any additional RPMs to the directory structure and update the metadata.
cp /path/to/*.rpm /tmp/bootisoks/Packages/.

cd /tmp/bootisoks/Packages && createrepo -dpo .. .

Add Kickstart Script in configuration.

vi /tmp/bootisoks/isolinux/isolinux.cfg

Add following text “ks=cdrom:/isolinux/ks.cfg” onder “label linux” line.
At the end it will looks like .

label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/isolinux/ks.cfg

Create the new ISO file.

cd /tmp/bootisoks && mkisofs -o RHEL-6-x86_64-custom.iso -b isolinux/isolinux.bin -c isolinux/ \
-no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V “RHEL 6 Custom ISO” .

How to install Virsh Virt-install on centos 6

Virsh virt-install


Processor with support for Intel-VT or AMD-V technology
Plenty RAM memory depending on the number of guests
Network connectivity
A previosly installed Linux CentOS 6.2 with a recent Linux kernel. On this how to:

$ uname -r


$ lsb_release -a

LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.2 (Final)
Release: 6.2
Codename: Final
A Linux client with a Desktop environment installed
An available CentOS mirror/repository
Installation Steps

Log into the CentOS as bozz user (a sudoer user) and check if your hardware support for virtualization extensions, on my hardware it was:

$ egrep ‘^flags.*(vmx|svm)’ /proc/cpuinfo

Install kvm and libvirt packages:

$ sudo yum install kvm python-virtinst libvirt libvirt-python virt-manager virt-viewer virt-top libguestfs-tools bridge-utils xorg-x11-xauth xorg-x11-fonts* policycoreutils-python

Update both packages to the latest version available on repositories/mirrors:

$ sudo yum update libvirt kvm

$ yum info libvirt

Installed Packages
Name : libvirt
Arch : x86_64
Version : 0.9.4
Release : 23.el6_2.4

$ yum info qemu-kvm

Installed Packages
Name : qemu-kvm
Arch : x86_64
Epoch : 2
Version :
Release : 2.209.el6_2.1

Restart the libvirtd daemon:

$ sudo chkconfig libvirtd on
$ sudo chkconfig libvirt-guests
$ sudo service libvirtd start
$ sudo service libvirt-guests start

Verify if the kvm module is loaded, you should see amd or intel depending on the hardware:

$ lsmod | grep kvm

kvm_intel 50380 0
kvm 305113 1 kvm_intel

Issue a virsh command to ensure local root connectivity first:

$ sudo virsh sysinfo

<sysinfo type=”smbios”>

[OPTIONAL] To use KVM by a non-root user verify if kvm group was created on installation:

$ cat /etc/group | grep kvm


Then add the bozz user to kvm group, so it can gain access to hypervisor:

$ sudo usermod -a -G kvm bozz
$ logout

Login again as the bozz user and verify kvm’s membership:

$ id

uid=500(bozz) gid=500(bozz) groups=500(bozz),10(wheel),36(kvm) context=…

and verify if /dev/kvm is owned by group kvm:

$ ls -l /dev/kvm

crw-rw-rw-. 1 root kvm 10, 232 Jan 17 14:50 /dev/kvm

On a system that runs udev, you will probably need to add the following line in your udev configuration so it will automatically give the right group to the newly created device:

$ cat /etc/udev/rules.d/80-kvm.rules

KERNEL==”kvm”, GROUP=”kvm”, MODE=”0666″
To manage libvirt with a non-root account you should use PolicyKit. Define access control for a libvirt group:

$ sudo groupadd libvirt
$ sudo usermod -a -G libvirt bozz
$ logout

Login again as bozz user and edit a new archive:

$ sudo vi /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla

with this content:

[libvirt Management Access]
# For allowing access to specific user only:
# For allowing access to a group (like this guide):

Restart libvirtd daemon:

$ sudo service libvirtd restart

Verify if bozz user can locally access to qemu:///system (NOTE: the use of qemu:///session is discouraged):

$ virsh -c qemu:///system sysinfo

<sysinfo type=”smbios”>

Verify if bozz user can remotely access to qemu+ssh://bozz@SERVER/system too. So on the Linux client issue:
$ virsh -c qemu+ssh://bozz@SERVER/system sysinfo

<sysinfo type=”smbios”>

Change group ownership and permissions on the default images directory:

$ sudo chown root:libvirt /var/lib/libvirt/images
$ sudo chmod g+rw /var/lib/libvirt/images

[OPTIONAL] When libvirtd (>= 0.9.3) is running as non-root it tries to read ~/.libvirt/libvirtd.conf (see here). A workaround is:

$ mkdir -p ~/.libvirt
$ touch ~/.libvirt/libvirtd.conf

Then issue a virsh command as bozz user:

$ virsh list

Id Name State
Configure Bridged Network by creating a new network script at /etc/sysconfig/network-scripts/ifcfg-br0:

$ sudo vi /etc/sysconfig/network-scripts/ifcfg-br0

and configuring the parameters according to your LAN settings (NOTE: options are case sensitive i.e. Bridge and bridge are two different options):


Then edit the Ethernet network script /etc/sysconfig/network-scripts/ifcfg-eth0:

$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

with the following content (NOTE: the hardware address depends on your NIC, an arbitrary MAC address is used here,so try to not copy this HWADDR line,use ur own):


Restart the networking service:

$ sudo service network restart

and verify the bridge config:

$ brctl show

bridge name bridge id STP enabled interfaces
br0 8000.002cc28529a3 no eth0

Configure iptables to allow all traffic to be forwarded across the bridge:

$ sudo iptables -I FORWARD -m physdev –physdev-is-bridged -j ACCEPT
$ sudo service iptables save
$ sudo service iptables restart

Prevent bridged traffic from being processed by iptables rules, this improves the bridge’s performance. In /etc/sysctl.conf append the following lines:

net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
net.ipv4.ip_forward = 1 #if you have “net.ipv4.ip_forward = 0” please just change the value.

Reload the kernel parameters configured with sysctl:

$ sudo sysctl -p /etc/sysctl.conf

Restart the libvirt daemon:

$ sudo service libvirtd reload

Set the security context

for the non default directory and everything under it:
$ semanage fcontext –add -t virt_image_t ‘/var/data/vm(/.*)?’
Verify it:
$ semanage fcontext -l | grep virt_image_t
Note !! I have random choose /var/data/vm/, you can repeat it with your choose PATH.

### 4. Restore the security context
This will effectively change the context to virt_image_t:
# restorecon -R -v /var/data/vm
Verify that the context was changed:
# ls –aZ /var/data/vm
drwxr-xr-x. root root system_u:object_r:virt_image_t:s0 .
dr-xr-xr-x. root root system_u:object_r:root_t:s0

Before creating VMs lets make some ISO with kickstart.Visit here.

If you want to install without kickstart, or you want to see full debug info. then please log in with -X option.

example host where i need to run Virt-install is Vhost and ip= ,and my host is Xhost and ip=, so from Xhost im doing

$ ssh -X -l root

Otherways you will not get any VM running .

Creating VMs
virt-install \
–network bridge:br0 \
–name pct_drupal7 \
–ram=1024 \
–disk path=/var/lib/libvirt/images/pct_drupal7.img,size=10 \
–cdrom /var/data/iso/CentOS-6.3-x86_64-minimal.iso \
–os-type linux \
–os-variant rhel6

virt-install \
–network network:inet_01 \
–name pct_db \
–ram=1024 \
–disk path=/var/data/vm/pct_db.img,size=16 \
–cdrom /var/data/iso/CentOS-6.3-x86_64-minimal.iso \
–os-type linux \
–os-variant rhel6

virt-install \
–network bridge:br3 \
–name pct_clearos6 \
–vcpus=2 \
–ram=4096 \
–disk path=/var/data/vm/pct_clearos6.img,size=512 \
–cdrom /var/data/iso/clearos-community-6.3.0-x86_64.iso \
–os-type linux \
–os-variant rhel6

How To Install Python-Bucky on Centos 7

How to install python-bucky on Centos 7

Install Epel Repo

yum install epel-release -y

If you have EPEL already activated,then the yum Epel repo is not necessary.

Install Pip with full package requirement

yum install gcc gcc-c++ python-devel libevent-devel kernel-devel python-pip python-setuptools python-setuptools-devel -y

Install Python-bucky

pip install bucky -y

How to install collectd and graphite on Centos 7

Installing graphite on a CentOS 7

Getting the software installed on CentOS is fairly straightforward with RPM packages available in the EPEL repository.

yum install epel-release -y

Install graphite software and MySQL for backend

yum install graphite-web graphite-web-selinux mariadb mariadb-server MySQL-python -y

If package graphite-web-selinux is note exist, use this link to download RPM pakage.…&system=&arch=

Start MySQL, lock it down, and create a Graphite database and user.

systemctl start mariadb


# Create graphite db, username and password

mysql -e “CREATE DATABASE graphite;” -u root -p
mysql -e “GRANT ALL PRIVILEGES ON graphite.* TO ‘graphite’@’localhost’ IDENTIFIED BY ‘graphitePW01Vxzsigavms’;” -u root -p
mysql -e ‘FLUSH PRIVILEGES;’ -u root -p

Configure Graphite to talk to this DB

Next, edit the file for graphite.

vi /etc/graphite-web/

Change the database configuration to look like this:

‘default’: {
‘NAME’: ‘graphite’,
‘ENGINE’: ‘django.db.backends.mysql’,
‘USER’: ‘graphite’,
‘PASSWORD’: ‘graphitePW01Vxzsigavms’,

Run the manage script for graphite to create the MySQL tables

/usr/lib/python2.*/site-packages/graphite/ syncdb

systemctl start httpd

Browse to http://IP address or hostname
Ex.: ,

Note!! if you still can`t get graphite-web,please check the following file below.
vi /etc/httpd/conf.d/graphite-web.conf

In my case im using Vagrant Box which is using ip:
and conf file looks like :

# Graphite Web Basic mod_wsgi vhost

<VirtualHost *:80>
ServerName graphite-web
DocumentRoot “/usr/share/graphite/webapp”
ErrorLog /var/log/httpd/graphite-web-error.log
CustomLog /var/log/httpd/graphite-web-access.log common

# Header set Access-Control-Allow-Origin “*”
# Header set Access-Control-Allow-Methods “GET, OPTIONS”
# Header set Access-Control-Allow-Headers “origin, authorization, accept”
# Header set Access-Control-Allow-Credentials true

WSGIScriptAlias / /usr/share/graphite/graphite-web.wsgi
WSGIImportScript /usr/share/graphite/graphite-web.wsgi process-group=%{GLOBAL} application-group=%{GLOBAL}

<Location “/content/”>
SetHandler None

Alias /media/ “/usr/lib/python2.7/site-packages/django/contrib/admin/media/”
<Location “/media/”>
SetHandler None

<Directory “/usr/share/graphite/”>
<IfModule mod_authz_core.c>
# Apache 2.4
Require local
Require ip
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from all
Allow from
Allow from ::1

save and exit .

restart apache to take conf token

systemctl restart httpd

Install Carbon and Whisper

yum install python-carbon python-whisper -y

Start Carbon Cache Service

systemctl start carbon-cache

We will need to configure the storage-schemas.conf in /etc/carbon/. We’ll start with a simple server load configuration taken from the graphite docs.

vi /etc/carbon/storage-schemas.conf

Now we’ll add the following for server load.

priority = 100
pattern = ^servers\.
retentions = 60:43200,900:350400


Note!! if there is some permission issue ( Permission denied ) use `

chmod +x /usr/share/doc/graphite-web-0.9.12/

to stop process press Ctrl+C

For more docs please visit graphite-docs

If you still need to install Python-bucky visit python-bucky