Wednesday, March 19, 2014

puppet

writing custom facts in puppet.

mcollective

Resource Abstraction Layer.  (#puppet resource)

Puppet describe cron (describe everything about resource group)

noop

tools:

gepatto

start with small single purpose modules..

Configuration Management Maturity Model:

Artisian
Centralized
Normalized
Templated
Reusable   --- hiera

Learn from Developers (Versioning) .. #subversion

Have a lab

##Investment ##

Oracle class




Tuesday, February 18, 2014

Perl Documents:

http://docstore.mik.ua/orelly/perl3/prog/ch10_02.htm

http://www.tutorialspoint.com/perl/perl_modules.htm

Tuesday, July 9, 2013

Booting in Linux Rescue Mode

1) Boot from DVD or other image file

2) Select rescue mode
linux rescue
linux rescue mpath

3) Once the rescue environment finishes booting, choose a language to use.

4) Select keyboard layout to use.

5) Wait for network interfaces to be located, and activate them, so that requested data can be transferred to another host.

6) The rescue environment will try to find the current Red Hat installation on the system. You will be prompted with the below options:
For this you will want to skip having Rescue Mode search for partitions. Make sure to boot into rescue mode to not automatically detect the partitions. 

7) Use the  fdisk -l command to find boot. This will be marked with an * <-- boot="" c0d0p1="" can="" cciss="" div="" either="" for="" is="" know="" mount.="" or="" sda1="" show="" something="" the="" then="" this="" what="" will="" you="">

8)If LVM is used:
Scan for metadata:
# lvm pvscan 
# lvm vgscan
# lvm lvscan

# lvm lvdisplay to find out what lv is root
# lvm vgchange -ay /dev/volgroup   to activate

May want to run fsck on these filsystems  <---- div="" important="">



Then start creating the chroot environment:
1. #mkdir /mnt/sysimage

** # mount /dev/vg00/logvolroot /mnRescuet/sysimage **

2. #mount /dev/sd1 /mnt/sysimage/  <----root div="">
3. #mount /dev/dcciss/c0d0p1 /mnt/sysimage/boot <---- boot="" div="">
4. #mount /dev/cciss/c0d0p2 /mnt/sysimage/opt <---- div="" opt="">

Then you have to mount proc, sys, and dev regardless:
5. # mount -o bind /proc /mnt/sysimage/proc
6. # mount -o bind /sys /mnt/sysimage/sys
7. # mount -o bind /dev /mnt/sysimage/dev
8. # mount -o bind /usr /mnt/sysimage/usr

Then you should be able to chroot in.
9. # chroot /mnt/sysimage

Wednesday, May 29, 2013

Simple procedure to installing cups printer from Linux server:


Searching for the required packages using yum

[root@pavan /]# yum search cups
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
====================================================== N/S Matched: cups ======================================================
gutenprint-cups.x86_64 : CUPS drivers for Canon, Epson, HP and compatible printers
cups.x86_64 : Common Unix Printing System
cups-pk-helper.x86_64 : A helper that makes system-config-printer use PolicyKit
ptouch-driver.x86_64 : CUPS driver for Brother P-touch label printers
  Name and summary matches only, use "search all" for everything.
[root@pavan /]#

Installing the packages..  
 [root@pavan /]# yum install cups.x86_64
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
Dependency Updated:
  dbus-libs.x86_64 1:1.2.24-7.el6_3
Complete!
Install Hp Supported driver for cups printer.

[root@pavan /]# yum install gutenprint-cups.x86_64
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gutenprint-cups.x86_64 0:5.2.5-2.el6 will be installed
--> Processing Dependency: gutenprint = 5.2.5-2.el6 for package: gutenprint-cups-5.2.5-2.el6.x86_64
--> Processing Dependency: libgutenprint.so.2()(64bit) for package: gutenprint-cups-5.2.5-2.el6.x86_64
--> Running transaction check
---> Package gutenprint.x86_64 0:5.2.5-2.el6 will be installed
Complete!
[root@pavan /]#

Configuring cups
Just edit /etc/cups/cupsd.conf

Keep the following entries:
# Only listen for connections from the local machine.
Listen 172.50.0.95:631
Listen /var/run/cups/cups.sock

# Restrict access to the server...
  Order allow,deny
  Allow 192.168.0.0/16 10.0.0.0/8 62.243.72.0/24 127.0.0.1  (here add client vpn address)
# Restrict access to the admin pages...
  Order allow,deny
  Allow 192.168.0.0/16 10.0.0.0/8 62.243.72.0/24 127.0.0.1 (here add client vpn address)

open the port 631.
Service cups restart

Go to browser with ip address:
http://172.50.0.95:631/

Add the required printer & enjoy printing. ...

Friday, January 25, 2013

Linux Booting problems


 The Linux box not able to boot due to external file system errors

Loggin to single user mode # all file systems other than vg00

a.) interrupt the normal booting process & enter into grub menu
then choose the kernel version you want to boot select it press enter. choose the second line starting  
with kernel and press e to edit. At the end of the line after one space put 1 (press enter key to save the changes) then b to boot in single user mode

b) After it prompts for logging password enter root password and mount root file system in read write mode

   mount -o rw /                    or munt -o remount,rw /
   cp -p /etc/fstab /etc/fstab_25jan
   /usr/bin/vim /etc/fstab
(# all other file systems other than vg00)

reboot the server.

Linux kernel panic recovering through maintenance mode

Boot the Linux OS through installation media and select recovery .