Tag: Linux

DevOps – Comparison of different Configuration Management Software

DevOps – Comparison of different Configuration Management Software

Introduction-

I’m working as DevOps since 2010. Many colleagues, friends asked me about comparison of different Configuration Management Software like Chef, Puppet or Ansible/Salt etc.

It is very important and difficult task to choose right CM(configuration management) software for managing Infrastructure and Application deployments.

I’m attaching pdf file with comparison of different CM hope it will help you.

Document – Devops-Comparison-v3

NOTE: This comparison is purely based on my knowledge and experience. Please feel free to share your updates.

Thank You,

Arun Bagul

Nagios daily and weekly Reporting and log parsing

Nagios daily and weekly Reporting and log parsing

Introduction – We wrote perl script for Nagios daily and weekly Reporting. This script is parsing nagios.log for all alerts notification and generating nagios report in CSV format…

** How to use?

arunb@arunb:~$ perl /home/arunb/nagios-log-parsing.pl
* Usage: /home/arunb/nagios-log-parsing.pl { <nagios_log file>  [ –summary ] }
arunb@arunb:~$

** To Generate Daily Nagios Report –
arunb@arunb:~$ perl /home/arunb/nagios-log-parsing.pl  /usr/local/nagios/var/nagios.log
arunb@arunb:~$ perl /home/arunb/nagios-log-parsing.pl  /usr/local/nagios/var/nagios.log  –summary

arunb@arunb:~$ perl /home/arunb/nagios-log-parsing.pl  /usr/local/nagios/var/nagios.log  –summary  > /tmp/NAGIOS-daily.csv

** To Generate Weekly Nagios Report –

Add all weeks nagios.log files absolute path (per line) in file say “/tmp/nagios-logfile”

arunb@arunb:~$  for i in `cat /tmp/nagios-logfile`; do  perl /home/arunb/nagios-log-parsing.pl  $i; done | grep -v ^$ > /tmp/NAGIOS-weekly.csv

* Want to see the script ?

arunb@arunb:~$ cat /home/arunb/nagios-log-parsing.pl

#!/usr/bin/perl

my $file = $ARGV[0];
my $stime = 0;
my $htime = 0;
my ($s_alert,$h_alert ) = (undef,undef);

my $STATE_OK;
my $STATE_WARNING;
my $STATE_CRITICAL;
my $STATE_UNKNOWN;
my %STATE_COUNTER;
my %ALERT;

############################

if ($ARGV[0]) {
#my $file = "/usr/local/nagios/var/nagios.log";

open (MYFILE, "<$file" ) or die "Can;t open nagios file";
while(<MYFILE>) {
chomp;
my $line = $_;
##print "\n".$line;
#if ($line =~ m/[(.*)].*;(.*);(.*);(.*);.*/) {
#if ($line =~ m/\[(.*)\]\s+(HOST|SERVICE)\sNOTIFICATION:\s\w+;(.*);.*/) {
if ($line =~ m/\[(.*)\]\s+SERVICE\sNOTIFICATION:\s\w+;(.*);.*/) {
my $time = $1;
my $mydate = scalar(localtime($time));
my ($host,$service,$alert)  = split(';',$2);
#print "\nARUN=>$1 = $host,$service,$alert";
if ($s_alert eq $service) {
my $time_diff = $time - $stime;
if ($time_diff > 600 ) {
if ($alert ne "OK") {
if (exists $ALERT{"$service"}) { $ALERT{"$service"} = $ALERT{"$service"} + 1;}
else { $ALERT{"$service"} = 1 ; }
$STATE_COUNTER{"$alert"} = $STATE_COUNTER{"$alert"} + 1;
print "\n$mydate [$time],$host,$service,$alert";
}
}
} else {
if ($alert ne "OK") {
if (exists $ALERT{"$service"}) { $ALERT{"$service"} = $ALERT{"$service"} + 1;}
else { $ALERT{"$service"} = 1 ; }
$STATE_COUNTER{"$alert"} = $STATE_COUNTER{"$alert"} + 1;
print "\n$mydate [$time],$host,$service,$alert";
}
}
$stime = $time;
$s_alert = $service;

} elsif ($line =~ m/\[(.*)\]\s+HOST\sNOTIFICATION:\s\w+;(.*);.*/) {
my $time = $1;
my $mydate = scalar(localtime($time));
my ($host,$hdown,$alert)  = split(';',$2);
#print "\nARUN=>$1 = $host,$hdown";
if ($hdown eq "DOWN") {
if ($h_alert eq $host) {
my $time_diff = $time - $htime;
if ($time_diff > 600 ) {
$STATE_COUNTER{"$hdown"} = $STATE_COUNTER{"$hdown"} + 1;
print "\n$mydate [$time],$host,$hdown";
}
} else {
$STATE_COUNTER{"$hdown"} = $STATE_COUNTER{"$hdown"} + 1;
print "\n$mydate [$time],$host,$hdown";
}
}
$htime = $time;
$h_alert = $host;
}
}
## summary
my $total_counter = 0;
my $total_service = keys(%ALERT);
if ($ARGV[1] eq "--summary") {
print "\n\n"."-" x 20;
print "\nSummary Report\n";
print "-" x 20 . "\n";
print "\nAlert_Type,Total_Count";
while (my ($key,$value)=  each(%STATE_COUNTER)) {  print "\n$key,$value"; }
print "\n\nService_Name,Total_Count";
while (my ($key,$value)=  each(%ALERT)) { print "\n$key,$value"; $total_counter = $total_counter + $value; }
print "\n\nTotal Alerts = $total_counter";
print "\nTotal Service Failed = $total_service";
}

} else { print " * Usage: $0 { <nagios_log file>  [ --summary ] }";}

#end
print "\n";

** To download the script “http://www.indiangnu.org/wp-content/uploads/2011/nagios-log-parsing-pl.txt

Thank You,
Arun Bagul

Cryptez vos mails avec GPG et Enigmail plugin Thunderbird

Cryptez vos mails avec GPG et Enigmail plugin Thunderbird

Introduction ~

GNU Privacy Guard (GnuPG ou GPG) est open source / logiciel libre de cryptage et un outil de signature, alternative à la Pretty Good Privacy (PGP) La suite de logiciels de cryptographie. Enigmail est une extension pour Mozilla Thunderbird et d’autres applications Mozilla. Elle fournit la clé publique de chiffrement des e-mail. Fonctionnalité cryptographique est gérée par GNU Privacy Guard (GnuPG ou GPG).

Step 1] Installer GnuPG ou GPG —

* Ubuntu / Debian ~

root @ Arun: ~ # apt-get install gnupg gnupg2

* Redhat / Fedora ~

root @ Arun: ~ # yum install gnupg gnupg2

Etape 2] Comment faire pour installer Enigmail?

Je suppose que Mozilla Thunderbird est déjà installé sur votre système. Pour installer “Enigmail” suivre les étapes suivantes

a) Télécharger “Enigmail” de l’URL »http://enigmail.mozdev.org/download/”

Note ~ OS sélectionner et de Thunderbird version correctement.

b) Dans la barre de menu de la fenêtre principale de Thunderbird vous pourrez voir «Outils». Sélectionnez cette option, puis «Add-ons” option. Ceci ouvrira une nouvelle fenêtre répertoriant tous vos plug-ins Thunderbird. Dans le coin inférieur main de cette nouvelle fenêtre vous verrez un bouton “Installer”. Cliquez sur ce bouton. Dites Thunderbird où vous avez enregistré le Enigmail. Fichier XPI. et dire simplement “Installer” that’s it!!

* Once “Enigmail est installé redémarrer le Thunderbird. Ensuite, vous verrez “OpenPGP onglet” dans le menu principal de Thunderbird.

Etape 3] Configuration privée / clé publique ~

Enigmail utilise la cryptographie à clé publique pour assurer l’intimité entre vous et vos correspondants. Pour générer les Clés publiques / privées, il ya deux méthodes, soit les créer avec l’aide de “gpg” outil de ligne de commande ou utilisez “Enigmail” ….

* Nous produirons privé / public des clés cryptographiques, avec l’aide de «Enigmail», comme indiqué ci-dessous ….

a) Cliquez sur “OpenPGP” dans la barre de menus de la fenêtre principale de Thunderbird. Sélectionnez “Key Management”.
b) Dans Enigmail Key Manager ~ cliquez sur “Générer” onglet dans la barre de menu et sélectionnez “Nouveau paire de clés».
c) Tout en haut de la fenêtre vous verrez une zone de liste déroulante affichant toutes vos adresses e-mail. GnuPG sera associer votre nouvelle clé avec une adresse email.
Enigmail vous demande simplement de quelle adresse vous souhaitez utiliser pour cette clé. Choisir celles qui compte sera de recevoir du courrier crypté.

REMARQUE ~ Nous pouvons utiliser les mêmes touches pour plusieurs comptes.

d) Vous pouvez utiliser une phrase secrète ou il suffit de cocher “Pas de mot de passe” dans la case pour générer des clés sans passphrase.
e) Créer le répertoire pour sauver “La révocation des certificats” …

arunsb arun @: ~ $ mkdir / home / arunsb / .gpg_key /

f) Cliquez sur “Générer clé” pour générer des clés. c’est fait ..

Pour partager facilement les touches, vous pouvez publier vos clés avec serveur de clés.

a) Dans “Key Management” fenêtre Sélectionner vos clés, puis cliquez sur l’onglet ‘serveur de clés “dans le menu principal, puis cliquez sur” Upload clés publiques ”
Note ~ veillez à cocher «Afficher toutes les touches par défaut” case à cocher (à la liste de toutes les touches)

Étape 4] Composez le courrier et signer ~

Composez le mail et dites-Enigmail à le signer. En haut de votre fenêtre de composition, vous verrez un bouton de lecture “OpenPGP”. Cliquez sur cette question. Assurez-vous que le “Sign” option, et seulement cela, est cochée. Enfin “Envoyer” le courrier! (Vous serez invité à fournir votre mot de passe. Une fois que vous y entrer, Enigmail signerez votre e-mail et envoyez-le si vous avez générer des clés avec passphrase sinon il ne sera pas demander)
/ pgp_enigmail-composer

Enjoy!

Observe,
Arun Bagul

How to configure TATA Indicom/BSNL/Reliance Broadband+ Netconnect ( EDVO usb modem ) on Ubuntu Linux

How to configure TATA Indicom/BSNL/Reliance Broadband+ Netconnect ( EDVO usb modem ) on Ubuntu Linux

Introduction ~

This article is about how to configure TATA Indicom,BSNL and Reliance Broadband+ Netconnect ( EDVO usb modem ) on Ubuntu Linux.

To configure Reliance,BSNL and Tataindicom epi valley usb modem please refer the following article ~

http://www.indiangnu.org/2008/tata-indicom-usb-modem-epi-valley-on-ubuntu-linux/

To configure Tataindicom,Reliance Huawei datacard refer the following article ~

http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/

** EVDO ?

EVolution-Data Optimized (EVDO) is a telecommunications standard for the wireless transmission of data through radio signals, typically for broadband Internet access. It uses multiplexing techniques including code division multiple access (CDMA) as well as time division multiple access (TDMA)
to maximize both individual user’s throughput and the overall system throughput. It is standardized by (3G) 3rd Generation Partnership Project 2 (3GPP2) as part of the CDMA2000 family of standards and has been adopted by many mobile phone service providers around the world – particularly those previously employing CDMA networks.

How to configure Reliance Broadband+ Netconnect –

Step 1] Mount USB file system to “/proc/bus/usb” –

root@laptop:~# ls  /proc/bus/usb/
root@laptop:~#

* It shows that usbfs is not mounted on “/proc/bus/usb”. To mount run following command….

root@laptop:/var/src/usb_modeswitch-1.0.5# mount -t usbfs  none /proc/bus/usb
root@laptop:/var/src/usb_modeswitch-1.0.5# ls /proc/bus/usb/
001  002  003  004  005  006  007  devices
root@laptop:/var/src/usb_modeswitch-1.0.5#

Step 2] Get the status of Reliance Broadband+ USB device ~

* lsusb list USB devices connected to PC as well as information about USB buses in the system and the devices connected to them.

* Output before connecting Reliance Broadband+ Netconnect usb modem –

root@laptop:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
…..
root@laptop:~#

* Let’s connect Reliance Broadband+ Netconnect! usb modem –

root@laptop:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 004: ID 19d2:fff5
Bus 005 Device 003: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
…..
root@laptop:~#

* Bus 005 Device 004: ID 19d2:fff5  – This shows that the Reliance (EVDO) usb device is detected with Vendor_id  19d2  and product_id fff5

root@laptop:~# cat /proc/bus/usb/devices

T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 23 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=fff5 Rev= 0.00
S:  Manufacturer=ZTE, Incorporated
S:  Product=USB Storage
S:  SerialNumber=000000000002
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E:  Ad=89(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=0a(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

root@laptop:~# dmesg | tail
[15035.656075] usb 7-2: new full speed USB device using uhci_hcd and address 24
[15035.814188] usb 7-2: configuration #1 chosen from 1 choice
[15035.827708] scsi10 : SCSI emulation for USB Mass Storage devices
[15035.828851] usb-storage: device found at 24
[15035.828856] usb-storage: waiting for device to settle before scanning
[15040.831095] usb-storage: device scan complete
[15040.834105] scsi 10:0:0:0: Direct-Access     ZTE      USB Storage FFF1 2.31 PQ: 0 ANSI: 2
[15040.839233] sd 10:0:0:0: [sdb] Attached SCSI removable disk
[15040.839378] sd 10:0:0:0: Attached scsi generic sg2 type 0
root@laptop:~#

*** Reliance Broadband+ EVDO USB is detected as “USB storage device” as shown above…

Step 3] How to use Reliance Broadband+ Netconnect as USB Modem –

To use Reliance Broadband+ usb as USB Modem. We need to switch the usb mode of this device with the help of “usb_modeswitch” tool.

Download ~ http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.5.tar.bz2

Help – http://www.draisberghof.de/usb_modeswitch/

* Download and extract the “usb_modeswitch” –

root@laptop:/var/src# wget -c  http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.5.tar.bz2

root@laptop:/var/src# tar xvfj usb_modeswitch-1.0.5.tar.bz2

* Now compile and install –

root@laptop:/var/src/usb_modeswitch-1.0.5# gcc -l usb -o usb_modeswitch usb_modeswitch.c
root@laptop:/var/src/usb_modeswitch-1.0.5# make install
mkdir -p /usr/sbin
install ./usb_modeswitch /usr/sbin
mkdir -p /etc
install –mode=644 ./usb_modeswitch.conf /etc
root@laptop:/var/src/usb_modeswitch-1.0.5#

**** Now configure USB mode switching –

a) Edit configuration file “/etc/usb_modeswitch.conf” –

Just search for vendor and product id eg (19d2 and fff5) in config “/etc/usb_modeswitch.conf” file….
This file contains most of the details. I choose following setting and that work’s for me

root@laptop:~# cat  /etc/usb_modeswitch.conf

###################
# ZTE AC8710
#

DefaultVendor=  0x19d2
DefaultProduct= 0xfff5

TargetVendor=   0x19d2
TargetProduct=  0xfff1

MessageContent=”5553424312345678c00000008000069f030000000000000000000000000000″

root@laptop:~#

b) Now run “usb_modeswitch” command to switch the mode of USB device

root@laptop:~# usb_modeswitch -c /etc/usb_modeswitch.conf

Step 4] Load “usbserial” module

* Remember in Ubuntu 09.04 the “usbserial” is buildin kernel. To load that module we need to modify “grub.conf” or “menu.lst” GRUB config file

root@laptop:~# cat /boot/grub/menu.lst

title        Ubuntu 9.04, kernel 2.6.28-11-generic
uuid        c98db8a7-0a2e-4cea-b9d5-43a30c892fb0
kernel        /vmlinuz-2.6.28-11-generic root=/dev/sda5  ro quiet splash  usbserial.vendor=0x19d2  usbserial.product=0xfff1
initrd        /initrd.img-2.6.28-11-generic
quiet
….
……
root@laptop:~#

**** Reboot the machine and run the following command

* Output before switch….

root@laptop:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 023: ID 19d2:fff5
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
…..
root@laptop:~#

root@laptop:~# usb_modeswitch -c /etc/usb_modeswitch.conf

* Output after switch….

root@laptop:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 024: ID 19d2:fff1
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
…..
root@laptop:~#

root@laptop:~# usb_modeswitch  -v 19d2 -p fff1

Looking for default devices …
Found default devices (1)
Accessing device 004 on bus 005 …
Using endpoints 0x02 (out) and 0x82 (in)
Not a storage device, skipping SCSI inquiry

Device description data (identification)
————————-
Manufacturer: ZTE, Incorporated
Product: ZTE CDMA Tech
Serial No.: not provided
————————-
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.

root@laptop:~#

root@laptop:~# cat /proc/bus/usb/devices

T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 24 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=fff1 Rev= 0.00
S:  Manufacturer=ZTE, Incorporated
S:  Product=ZTE CDMA Tech

C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=128ms

root@laptop:~# dmesg  | tail
[   70.985075] usbserial_generic 5-1:1.1: generic converter detected
[   70.985109] usb 5-1: generic converter now attached to ttyUSB1
[   70.987028] usbserial_generic 5-1:1.2: generic converter detected
[   70.987064] usb 5-1: generic converter now attached to ttyUSB2
[   70.989589] usbserial_generic 5-1:1.3: generic converter detected
[   70.989623] usb 5-1: generic converter now attached to ttyUSB3
[   70.991023] usbserial_generic 5-1:1.4: generic converter detected
[   70.991061] usb 5-1: generic converter now attached to ttyUSB4
[   70.993066] usbserial_generic 5-1:1.5: generic converter detected
[   70.993109] usb 5-1: generic converter now attached to ttyUSB5
root@laptop:~#

*** It shows that Reliance Broadband+ EVDO usb  is detected as CDMA modem

Step 5] Configure wvdail –

* Run “wvdialconf” to detect and edit “/etc/wvdial.conf” confile

root@laptop:~# wvdialconf
Editing `/etc/wvdial.conf’.
Scanning your serial ports for a modem.
Modem Port Scan<*1>: S0   S1

root@laptop:~# cat /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = your_mobile_no
Username = your_mobile_no
Phone = #777
PPPP Path = /usr/sbin/pppd
Modem Type = Analog Modem
Stupid Mode = 1
Tonline = 0
Baud = 9600
New PPPD = 1
Modem = /dev/ttyUSB0
ISDN = 0
root@laptop:~#

* Now it’s time to start surfing…..

root@laptop:~# wvdial &
[1] 21710
root@laptop:~#

root@laptop:~# ifconfig

ppp0 Link encap:Point-to-Point Protocol
inet addr:115.184.XX.BB  P-t-P:220.224.CC.DD  Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
RX packets:4310 errors:0 dropped:0 overruns:0 frame:0
TX packets:4347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2268618 (2.2 MB)  TX bytes:445276 (445.2 KB)

Enjoy,
Arun Bagul

How to configure vpn client on Linux

How to configure vpn client on Linux

This has been tested under RHEL 4/5, CentOS 4.4/5 and fedora 8 (kernel version 2.6.15+)

I found and stored few required rpm packages from various places that you will download from given.

http://www.4shared.com/file/113579629/ee5e0aed/libglade-017-11i386.html
http://www.4shared.com/file/113579642/2fd674e3/libglade-devel-017-11i386.html
http://www.4shared.com/file/113579654/dfaee097/libxml-1817-8i386.html
http://www.4shared.com/file/113579677/7491d3af/libxml-devel-1817-8i386.html
http://www.4shared.com/file/113579714/ba004fa4/php4-pcntl-449-1fc5i386.html
http://www.4shared.com/file/113579747/5e7eea5b/php4-pcntl-gtk-102-4fc5i386.html
http://www.4shared.com/file/113579758/d7dac68b/pptp-172-3fc5i386.html
http://www.4shared.com/file/113579764/f541d963/pptpconfig-20060821-1fc5noarch.html

After downloading these first you will have to install lib packages and then pptp packages

rpm -ivh –nodeps libglade-0.17-11.i386.rpm libglade-devel-0.17-11.i386.rpm  libxml-1.8.17-8.i386.rpm libxml-devel-1.8.17-8.i386.rpm

rpm -ivh pptp-1.7.2-3.fc5.i386.rpm pptpconfig-20060821-1.fc5.noarch.rpm php4-pcntl-gtk-1.0.2-4.fc5.i386.rpm php4-pcntl-4.4.9-1.fc5.i386.rpm

now go to the given image that I would like to show how I added vpn connection

1) open vpnclient configuration launchpad with “pptpconfig”

2)  Now create your profile with all the details and add

Now you have to set you external route or tunnel IP range into it for that click on “Routing” and set  “All to Tunnel” and update your profile.

Now start your vpn client.

–Ravi

Automate script for hp_ltt with read option

Automate script for hp_ltt with read option

Hello Friends,

Many days back, I have configured this storageworks devices of HP and nowadays one of my friend is having like the same issue’s with the os’s to configuring HP storageworks, he has been doing manual driver scan with hp_ltt tool every time when system has been rebooted. Actually there some thing missing with os’s but still this scripts work for him now.

#!/usr/bin/expect  —
# This expect script is useful and working with driver Diagnostic automated tool
# I have tested this over “HP StorageWorks Library and Tape Tools”
# Please change the option number 10 for rescan as per mention in your hp_ltt script.
# Some older hp_ltt script it has option number 9, so please check once this option.
# If you have any queries about this script please send email on ravi <at> indiangnu <dot> org
set timeout -1
spawn ./hp_ltt
match_max 100000
send — “r”
# Look for prompt
expect “ommand>”
# Send option 1 for hardware scan
send — “1r”
send — “r”
# Look for  prompt
expect “ommand>”
# Send option 3 for continue
send — “3r”
send — “r”
# Look for prompt
expect “ommand>”
# send option 10 for rescan
send — “10r”
send — “r”
# Look for prompt
expect “ommand>”
# Send 1 (exit) from L & TT
send — “1r”
send — “r”
expect eof

Suggestion : You have to run this expect script under the $HOME folder of hp_ltt script.

–Ravi

openlsm-0.99 released

openlsm-0.99 released

Dear All,

We are pleased to announce that the openslm-0.99 development platform released on 10th Jun 2009. We are sure that  all contributor’s of openlsm and IndianGNU.org community will start coding for openlsm…

* Please don’t forget to test openlsm and give your valuable feedback/suggestion!

community Blog – http://www.indiangnu.org/

Download openlsm ~

* http://openlsm.sourceforge.net/
http://sourceforge.net/project/showfiles.php?group_id=211420

What is openLSM?

openLSM is web-based control panel designed to make administration of website, GNU/Linux and Unix based operating system easy! openLSM handles all aspects of administration in its interface. It is free/open source software under GPL.

How to install openlsm ~

step 1) cd to the source directory

   ./configure --prefix=/usr/local/openlsm
    OR
    ./configure --prefix=/usr/local/openlsm --with-mysql=/usr/bin/mysql_config --enable-internal-pcre
    --with-geoip=/usr --with-ldap=/usr 	

   make
   make install
step 2) openLSM is using 'openlsm' user and group. please create system user and group and set homedir
    /usr/local/openlsm or 'prefix' value. Confirm ownership/permission of '/usr/local/openlsm'
     directory after installation.

  addgroup --system openlsm
  adduser --system  --home /usr/local/openlsm --shell /bin/false --gid <gid_of_openlsm_group>  openlsm

step 3) How to create a self signed certificate for SSL/TLS

 dd if=/dev/random  of=/tmp/random.dat bs=1024 count=1

 $ openssl genrsa   -out  /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
    -rand /tmp/random.dat 2048
 $ openssl req -new -key /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
   -out /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.csr

 #generate certificate
 $ openssl x509 -req -days 365 -set_serial 1 -in
  /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.csr
   -signkey /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
   -out /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.crt

step 4) please check permission, ownership of /usr/local/openlsm directory and file
        path in openlsm.conf  configuration file...

start openlsm with script in  contrib directory…

./contrib/openlsm start

URL ~ http://<server_name_or_ip>:4050/ or

http://<server_name_or_ip>:4060/

enjoy !!

Regards,
IndianGNU & openlsm

openLSM + Cherokee

openLSM + Cherokee

Dear All,

We are pleased to announce that tomorrow we are launching openslm-0.99 development platform. We are sure that  all contributor’s of openlsm and IndianGNU.org community will start coding for openlsm…

* Please don’t forget to test openlsm and give your valuable feedback/suggestion!

openlsm + Cherokee –

After all ups and  down finally openLSM community has decided to use Cherokee for openlsm admin server. We have customized Cherokee as per your requirement.

Thank you,
openLSM and IndianGNU.org

How to convert nero image to iso image and extract iso image

How to convert nero image to iso image and extract iso image

Introduction –

nrg2iso is handy tool to convert Nero Image to ISO image

* How to install nrg2iso on Ubuntu Linux –

root@arun:~# apt-get  install   nrg2iso
root@arun:~/oracle-setup# nrg2iso -h
Nrg2Iso v0.4 by G. Kokanosky
released under the GNU GPL v2 or later

Usage :
nrg2iso image.nrg   image.iso

–version    display version number
–help       display this notice

root@arun:~/oracle-setup#

* How to use it ? –

root@arun:~/oracle-setup# ls
ora92linux.nrg
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# nrg2iso ora92linux.nrg  ora92linux.iso
|==============================>[100%]
ora92linux.iso written : 680659100 bytes
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# ls *.iso
ora92linux.iso
root@arun:~/oracle-setup#

* Now ISO image is ready, we can mount ISO image to extract the data as shown below….
root@arun:~/oracle-setup# mount -o loop  ora92linux.iso   /tmp/mount-iso/
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# cd  /tmp/mount-iso/
root@arun:/tmp/mount-iso# ls
doc  index.htm  install  lgto  response  runInstaller  stage
root@arun:/tmp/mount-iso#

root@arun:/tmp/mount-iso# ls
doc  index.htm  install  lgto  response  runInstaller  stage

* Enjoy!! – you can copy the extracted data where ever you want!!

root@arun:/tmp/mount-iso# cp -fr * /root/oracle-setup/oracle-1/
root@arun:/tmp/mount-iso#

root@arun:~/oracle-setup# mount
/root/oracle-setup/ora92linux2.iso  on  /tmp/mount-iso type iso9660 (rw,loop=/dev/loop0)
root@arun:~/oracle-setup#

* Un-mount to ISO image –

root@arun:/tmp/mount-iso# cd  /
root@arun:/# umount /tmp/mount-iso/
root@arun:/#

Thank you,

Arun Bagul