Friday 14 March 2014

Install Zabbix 2.2 (Network Monitoring Tool) on CentOS Redhat and Fedora

Zabbix is an open source software for networks and application monitoring. Zabbix provides agents to monitor remote hosts as well as Zabbix includes support for monitoring via SNMP, TCP and ICMP checks. Click here http://en.wikipedia.org/wiki/File:Zabbix.png to know more about zabbix.

Zabbix-Monitoring

This article will help you to step by step install Zabbix 2.2 Server on CentOS/RHEL 6/5 and Fedora Systems. Before starting installation read below basic requirements to run Zabbix 2.2.
  • Apache: 1.3.12 or later.
  • PHP: 5.3.0 or later.
  • MySQL: 5.03 or later.
  • OpenIPMI: Required for IPMI support.
  • libssh2: Required for SSH support. Version 1.0 or higher.
  • fping: Required for ICMP ping items.
  • libcurl: Required for web monitoring.
  • libiksemel: Required for Jabber support.
  • net-snmp: Required for SNMP support.

Step 1: Set Up Apache, MySQL and PHP

In order to use Zabbix we required a Web Server, database server and PHP to work. In this steps we are going to setup these services, You many skip this step if you have already configured it.
Install All Services
# yum install httpd httpd-devel 
# yum install mysql mysql-server 
# yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml
Start All Services
# service httpd start
# service mysqld start
MySQL Initial Setup
Run following command to setup mysql initially and secure it
# mysql_secure_installation

Step 2: Configure Yum Repository

Before installing Zabbix first configure zabbixzone rpm repository in our system using following commands.
CentOS/RHEL 6:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

CentOS/RHEL 5:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/5/x86_64/zabbix-release-2.2-1.el5.noarch.rpm

Step 3: Install Zabbix Server with MySQL

Use following command to install Zabbix using mysql database.
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

Step 4: Setup Zabbix Apache Configuration

Zabbix creates its own apache configuration file /etc/httpd/conf.d/zabbix.conf. Edit this file and just update timezone. More timezone’s
    php_value date.timezone Asia/Kolkata
After changing value restart Apache service.
# service httpd restart

Step 4: Create Zabbix MySQL Database

This installation is using mysql as backend of zabbix, So we need to create MySQL database and User for zabbixinstallation.
# mysql -u root -p

mysql> CREATE DATABASE zabbix CHARACTER SET UTF8;
mysql> GRANT ALL PRIVILEGES on zabbix.* to 'zabbix'@'localhost' IDENTIFIED BY 'SECRET_PASSWORD';
mysql> FLUSH PRIVILEGES;
mysql> quit
After creating database restore the default mysql database provided by zabbix. These files can be found at/usr/share/doc/zabbix-server-mysql-2.2.2/create/ directory.
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.2/create/schema.sql
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.2/create/images.sql
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.2/create/data.sql

Step 5: Start Zabbix Server

After completing above setup, let’s start Zabbix server using following command.
# service zabbix-server start
After starting zabbix service, lets go to Zabbix web installer and finish the installation.

Step 5: Start Zabbix Web Installer

Zabbix web installer can be access using following url, Change FQDN as per you setup.
http://svr1.tecadmin.net/zabbix/setup.php

and follow the steps as per given screen shots below.
Zabbix Setup Welcome Screen
This is welcome screen of zabbix web installer. Go forward by click on next button.
zabbix-install-1
Check for pre-requisities
Check if your system have all required packages, if everything is ok click next.
zabbix-setup-2
Configure DB Connection
Enter database details created in Step #4 and click Test Connection. If database connection is correct, it will show ok message. After that click next.
zabbix-setup-3
Zabbix Server Details
zabbix-install-4
Pre-Installation Summary
This step will show the summary you have entered previous steps, so simply click next.
zabbix-install-5
Install Zabbix
zabbix-install-6
Zabbix Login Screen
Login to Zabbix using below default credentials.
   Username: admin
   Password: zabbix
zabbix-install-7






How Set Static IP Address In Ubuntu



root@vik:~# vi /etc/network/interfaces

#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
auto eth0

# make it comment
# iface eth0 inet dhcp

# add these lines
iface eth0 inet static
address 192.168.1.30                                              # define IP address
network 192.168.1.1                                               # define network address
netmask 255.255.255.0                                           # define subnet mask
network 192.168.1.1                                               # define network address
gateway 192.168.1.1                                               # define default gateway
dns-nameservers 192.1.168.10                                # define name server

Now Save and Exit file with press Esc. wq!

root@vik:~# ifdown eth0 && ifup eth0 


Disable IPv6 if not needed.



root@vik:~# echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf 
root@vik:~# reboot
root@vik:~# ifconfig 




Koha Live DVD



Koha Live DVD is based on Ubuntu Linux and Koha 3.x. Live DVD customised for ready to use. Highlights are: 


  • Easy installation steps
  • Koha customised for ready to use
  • Zebra server enabled
  • Customised MARC fields in cataloguing
  • Webmin included for scheduling database backup
  • Build on Ubuntu 10.04 LTS
  • Detailed installation manual and Read Me file
  • Sample reports
Read installation manual and Read me file before try to install the DVD.

https://sourceforge.net/projects/kohalivedvd/files/

Easy to upgrade to new version of Koha.

Following commands will upgrade Koha to new version.

  • sudo apt-get update
  • sudo apt-get upgrade
  • apt-get install koha-common

No need to execute lot of commands.

Mist Server Installation on Ubuntu 12.04


MistServer is a highly versatile, lightweight, customizable open-source multi-standard multimedia server. MistServer configuration is easy to use for full CDN solutions applications.
Mistserver_pos
MistServer is Free, open and well-supported, Truly plug and play, Affordable, seamless and highly scalable control over your media servers. MistServer can be installed on any server to make multimedia server.
Download MistServer Binary here http://www.mistserver.org/index.php?title=Downloads
You can clone source from https://github.com/DDVTECH/
Check your server architecture Generic Linux 64-bit or Generic Linux 32-bit then download
# wget http://releases.ddvtech.com/download.php?pack=mistserver_64&ver=1.2.1
Now extract / copy files to /usr/local/bin/
Check quick start here http://www.mistserver.org/index.php?title=Quick_Start
# chmod a+x MistController
# MistController -a username:password -n
You need to point your browser to connect Mist Server Manager
http://server-ip:4242/#root@http://server-ip:4242/api
Mistserver Manager Login
Kill MistServer
# lsof -i:4242 (Find PID for MistServer)
# kill -9 PID
Find more info about MistServer from http://wiki.mistserver.org/
Compare MistServer with other Media Streaming Servers like Wowza or Red5 here http://www.mistserver.org/index.php?title=Compare
You can find Linux User Guide for MistServer from http://mistserver.org/index.php?title=User_Guide_(Linux)

How to Install Koha on Ubuntu 12.04 Server


Install Ubuntu /Xubuntu 12.04 LTS

Open a terminal and apply following commands,

sudo su
apt-get install leafpad

Add Koha package repository

wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
echo deb http://debian.koha-community.org/koha squeeze main | sudo tee /etc/apt/sources.list.d/koha.list

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install koha-common

Initial Configuration
Create a new file

leafpad /etc/koha/koha-sites.conf

Add the following lines and save.


DOMAIN=".yourdomain.org"  # Change this to be your domain. Any instance will be a subdomain of this string.
INTRAPORT="8000"  # TCP listening port for the administration interface
INTRAPREFIX=""  # For administration interface URL: Prefix to be added to the instance name.
INTRASUFFIX="-intra"  # For administration interface URL: Suffix to be added to the instance name.
DEFAULTSQL=""  # a value is generally not needed.
OPACPORT="8001"  # TCP listening port for the users' interface (if you skip this, the apache default of 80 will be used)
OPACPREFIX=""  # For users' interface URL: Prefix to be added to the instance name.
OPACSUFFIX=""  # For users' interface URL: Suffix to be added to the instance name.
ZEBRA_MARC_FORMAT="marc21"  # Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21', 'normarc' and 'unimarc'
ZEBRA_LANGUAGE="en"  # Primary language for Zebra indexing. Possible values are 'en', 'fr' and 'nb'

Adding ports
Open following file and add ports

sudo leafpad /etc/apache2/ports.conf

Add two ports for Koha

Listen 8000
Listen 8001

Apply following commands, 

sudo a2enmod rewrite

Configuration of  UTF-8 in MySQL and Apache 
Enable UTF-8 at MySQL 
Open a Terminal and type following command, 

sudo su 
leafpad /etc/mysql/my.cnf   

[Under the Basic settings section, add the following,] 

# UTF-8 Defaults for Koha 
init-connect='SET NAMES utf8' 
character-set-server=utf8 
collation-server=utf8_general_ci 

leafpad /etc/apache2/conf.d/charset 
[Add the following two lines in] 

AddCharset UTF-8 .utf8 
AddDefaultCharset UTF-8 

Save the file and close the editor.

Sax parser setup

leafpad /etc/perl/XML/SAX/ParserDetails.ini

Cut and paste the following command to the bottom of the file and save it.

[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces=1 



Instance creation
sudo apt-get install mysql-server

[Put a password for MySQL Root USER]

Apply following commands,

sudo apt-get clean
sudo koha-create --create-db library

Ubuntu MySQL security Tweak

sudo su
mysql -u root -p

[Enter the MySQL Root password when it ask]
Execute the following commands,

USE mysql;
SELECT host,user FROM user;
DELETE FROM user WHERE user=''; SELECT host,user FROM user;
FLUSH PRIVILEGES;
QUIT

Configuring Apache
Execute the following commands in a terminal. 

sudo a2dissite 000-default
sudo a2enmod rewrite
sudo a2enmod deflate
sudo a2ensite library
sudo /etc/init.d/apache2 restart

Start web installation of Koha
The username to log in with will be koha_library and the password will be near the end of /etc/koha/sites/library/koha-conf.xml
Apply the following command to see the koha login password,

sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml 

Open following link,

http://127.0.1.1:8000  

Zebra rebuild command

sudo su
koha-rebuild-zebra -v -f library

Reference

http://wiki.koha-community.org/wiki/Koha_on_ubuntu_-packages#Enable_Modules_and_Site

How to install Open Meetings on Ubuntu 12.04


Primarily, the following is drawn from the these two pdf-documents:

Installation of Apache OpenMeetings 2.x on Ubuntu 12.10 and 12.04 – 32 or 64 bits
Installing OpenMeetings in Squeeze.pdf
The technical stuff (what you’re likely here for):

Note:  The following is what I used to get it working on my computer, running 64bit Ubuntu 12.04.

Flash:  Openmeetings is one great big flash application.  Everything on it is flash, the text, the video the entry boxes… everything.  Needless to say, I wasn’t so psyched about this (being a 64bit linux user) but I was happily surprised to find how stable it is and how much bitching it doesn’t do.  Really, I completely forget it’s flash…until I try to right-click something but eh, it’s not so bad.

Step 1: Install Flash on whatever computer you’ll be accessing open meetings on

I almost feel like this isn’t worth going into, there are a whole bunch of articles on it online depending on your operating system.  I figure if you have a computer and it’s hooked to the internet, you probably already have flash.

Step 2: Install oracle Java

You will need Oracle’s JDK.; substitutes such as OpenJDK won’t cut it.  For Ubuntu users, use the following steps:

Add the repository:   sudo add-apt-repository ppa:webupd8team/java
Update your system with the new repo: sudo apt-get update
Install Oracle Java6: sudo apt-get install oracle-java6-installer
Tech note: The above will install the Java6 installer, which will (as part of its install process) run and install the Java6 JDK after it’s installed.  I don’t really know why it works this way but there you have it.  Also I’ve read that Java7 plays with Openmeetings just fine but haven’t tried it myself.

Once the installer starts going automatically it will inform you that you MUST AGREE TO THE LICENCE (hit enter for ok).  Then it will ask you DO YOU AGREE TO THE LICENSE?  Since they’ve already given you the ultimatum that you have to, I guess you don’t have much choice; arrow over to yes and hit enter…only after reading the ENTIRE agreement at the url they provide of course ;-D (oh that’s too funny).

Step 3: Install Open-Libre-Whatever Office (or make sure it’s already installed)

Openmeetings has a really sweet document upload feature where all participants can examine word documents, ppt presentations etc in real-time.  This uses OpenOffice or LibreOffice to do the conversion (either one will work).  So make sure you have a copy installed on the server.

Step 4: Install more conversion software

You’ll need the following packages to properly convert uploaded files to display during the meeting.

1.  Sudo apt-get yourself the packages: sudo apt-get install imagemagick gdebi libgif4 libjpeg62 synaptic
2.  Download and install swftools using the method below.  This will render files into .swf flash when you’re using Openmeetings.

Install this repository: sudo add-apt-repository ppa:guilhem-fr/swftools

Update your system: sudo apt-get update

Install the package: sudo apt-get install swftools

Step 5:  Install FFMPG

FFMPG is necessary for the video stuff that Openmeetings needs.  The official documentation advises that one should compile FFMPEG…which is a bit of a pain.  Being lazy and a humble student of the sacred way of the half-assed, I just used the latest version from the repositories: sudo apt-get install ffmpeg.  I’ve found this to work well enough, though apparently it can present problems when trying to record Openmeetings video feeds.  Or, to quote the official documentation in its original prose:

Now should Compile FFMPEG for video. To install the one that comes in the repositories, we would find very possibly problems with the recording video. Our compiled ffmpeg will have characteristics that do not find in the normal version.

…hey at least it reads better than the nonsense I’d have written, were I to explain this in German.

But anyway, if you don’t want to find very possibly problems with the recording video, go ahead and compile ffmpeg.  I might add in how to do this later, but the Googler yields some great tutorials on how to make this happen in Ubuntu.  I haven’t needed to record the Openmeetings feed yet on my server and so the repo version has worked just fine for me.

Step 6:  Install MYSQL

It’s quite likely that you have this going already BUT if you dont…

1) sudo apt-get install mysql-server
2) It’ll ask you for a new password for the root user.  Make up a good one and don’t forget it.

Ok, now a little work here.  We need to create a database for Openmeetings to use.  So in your terminal and….

Get into mysql using: mysql -uroot -p
It’ll ask you for your password… enter it.  (As per usual with the terminal and password, no characters will appear)
Then enter: mysql> CREATE DATABASE open2final DEFAULT CHARACTER SET ‘utf8′;
There, you have now created the database “open2final”  Of course you can enter any name for your database you wish and just adjust the configurations to follow; this is just the name the official documentation suggests.
Now, with mysql still open, create the mysql user that will access the database for openmeetings: mysql> GRANT ALL PRIVILEGES ON open2final.* TO ‘openmeetings’@'localhost’ IDENTIFIED BY ’123456′ WITH GRANT OPTION;
Again, the name/password are pulled directly from the official documentation; call it whatever you like and adjust the settings below accordingly.
“open2final” is the database we gave the user access to,
“openmeetings” is the database username
“123456″ is the password for the user openmeetings
Go ahead and quit out of your mysql terminal by typing “quit” and hitting enter.

Step 7:  Finally install the software you were after the whole time

So yea, finally we get to install Openmeetings.  Here’s how:

Go to openmeetings.apache.com and download the latest version ending in tar.gz.  (Zip will work too, but I’ll be doing the commands for tar.gz)
$ cd /opt
$ tar zxf /wherever/you/downloaded/openmeetings/to/apache-openmeetings-2.1.whatever.the.version.you.downloaded.tar.gz
Now rename the Openmeetings directory: mv apache-openmeetings-version/ red52/ (I don’t know why they call it red52 but it works with the install process)
To get rid of the compressed file: $ rm /wherever/you/downloaded/openmeetings/to/apache-openmeetings-2.1.whatever.the.version.you.downloaded.tar.gz
Backup the original configuration file: $ mv /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml-ori
Create a new configuration file from template: $ mv /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/mysql_persistence.xml /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
Now we need to edit that configuration file: $ sudo nano /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
Once in persistence.xml, we’re here to change the database settings.
Look for the line that contains: Url=jdbc:mysql://localhost:3306/openmeetings
Change “openmeetings” in that line to “open2final” …or whatever you ended up calling your database.
Then find the line containing :  Username=root
Change “root” to “openmeetings” or whatever you named your mysql user above.
And add the password to the line:  Password=”/> so that it reads  Password=123456″/> or whatever password you gave your msql user.
Step 8:  Connect Openmeetings to MySQL

Wait, I know what you’re thinking “didn’t I just do that?”  Nope, not yet.  We need a little java-script package so that your username and password above can actually log into the database and do their thing.  (That’s as far as I’ll go into it… because that’s possibly a bit further than I understand it.)

Anyway, carry out the following:

 $ cd /opt
Download the connector from here: http://dev.mysql.com/downloads/connector/j/
Copy the zip file into /opt/
$ unzip mysql-connector-java-5.1.23.zip
$ cp /opt/mysql-connector-java-5.1.23/mysql-connector-java-5.1.23-bin.jar /opt/red52/webapps/openmeetings/WEB-INF/lib
$ rm mysql-connector-java-5.1.23.zip
$  rm -R mysql-connector-java-5.1.23/
$ mv red52/ /usr/lib
$ chown -R nobody /usr/lib/red52
Step 9: Install the JOD converter

The JOD converter is the thing that allows Openmeetings to talk with WhateverOffice.

So monkey see monkey do:

$ cd /opt
$ wget http://jodconverter.googlecode.com/files/jodconverter-core-3.0-beta-4-dist.zip
$ unzip jodconverter-core-3.0-beta-4-dist.zip
$ rm jodconverter-core-3.0-beta-4-dist.zip
Step 10: Get the Red5-OpenMeetings Script

I found this step was especially confusing in the documentation and I really didn’t understand what was going on until I did some hunting around.  Red5 is the Openmeetings install script and can be found here:

https://cwiki.apache.org/confluence/download/attachments/27838216/OpenMeetings+2.x+run+script+Ubuntu.zip?version=1&modificationDate=1360140102000

But depending on this or that, the script needs to be modified, so I’ve saved you a little hunting/typing see below:

Here’s the directory that the install script (red5) needs to go to: $cd /etc/init.d/
Download from one of the two links:
If you are using OpenOffice: $ wget https://dl.dropboxusercontent.com/u/11993667/OpenofficeRed5/red5
If you are using LibreOffice: $ wget https://dl.dropboxusercontent.com/u/11993667/LibreofficeRed5/red5
Make sure it’s executable: $ chmod +x /etc/init.d/red5
Step 10: Run Openmeetings!

Ok just a few final instructions here:

$ /etc/init.d/red5 start
You will get some sort of message to the following effect: start-stop-daemon: –start needs –exec or –startas  Try ‘start-stop-daemon –help’ for more information.  Just ignore it, everything should be fine.
Give it a minute, then open your browser and go to: http://localhost:5080/openmeetings/install


  1. You should see the following page: Installation
  2. Click Continue with step 1
  3. Then you’ll get this:userinfo
    1. Configure your administrator name
    2. Give your admin a password
    3. enter your email address
    4. Enter your time zone and the rest
  4. Then you should get a page presenting you with a few technical options:paths
    1. Your JOD path should be /opt/jodconverter-core-3.0-beta-4/lib
    2. Configure any other unique settings (folks who complied FFMPEG from scratch, I might be looking in your direction)
  5. Scroll down and click install.
  6. Grab a snack and come back. (Actually it only took a minute or so on mine)
  7. And you should get an affirming message in your browser.

To Get at Openmeetings

To access openmeetings for general use as an admin, go tohttp://localhost:5080/openmeetings/
There you should be asked for your username and password and then be free to go.

Anyway, that’s all!  Enjoy!  Openmeetings is a really great program and a lot of smart folks have apparently put a lot of work into it and are continuing to do so.