Posts

Showing posts from 2012

Configuration and setting-up of AIDE on RHEL6

AIDE is a powerful package for checking integrity of files on a machine/system. Prerequisites : Just aide package. [root@sunny ~]# yum install aide -y Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN.                                                                         RHN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package aide.x86_64 0:0.14-3.el6 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================  Package         Arch              Version               Repository        Size ================================================================================ Installing:  aide            x86_64            0.14-3.el6            local            123 k Transaction Summary =============================================================

Configuring VNC on RHEL6

Purpose: The purpose of this document is to show client and server configuration of vnc. On Server Side, Install required software like tigervnc-server: [admin@sunny ~]$ su - Password: [Enter your root password] [root@sunny ~]# yum install tigervnc-server -y Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package tigervnc-server.x86_64 0:1.0.90-0.10.20100115svn3945.el6 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================== Package Arch Version Repository Size ======================================================================== Installing: tigervnc-server x86_64 1.0.90-0.10.20100115svn3945.el6 local 1.0 M Transaction Summary =================================================

Password less SSH login (ssh-keygen)

Image
SSH is often used to login from one machine to another machine, There are number of methods to achieve this but mostly in every method it requires authentication..... It also does requires authentication but for one time only i.e. for the first time you need to do a setup and for rest of the times when you will try to login via ssh it will not ask for any password. For achieving this you just need to generate your own personal set of private/public key pair. ssh-keygen is used to generate that key pair for you. A HOWTO for generating your own private/public key pair is given below: Firstly generate your private/public key pair by following command: [admin@sunny Desktop]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/admin/.ssh/id_rsa): [Press enter if you want to save your keys to default location] Enter passphrase (empty for no passphrase): [Enter your passphrase]  Enter same passphrase again:  [Enter your pass

Nagios on RHEL 6

Image
Installing EPEL Repository Download epel release repo from below URL: [root@]$ wget -c  http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-7.noarch.rpm If in case you are using RHEL5 you can download this epel-release from below URL: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm Installing pre-requisites packages Install the pre-requisites software’s like: · Php · Gcc, Gcc++ · Httpd · Gd · Perl [root@]$yum install php gcc* httpd gd perl –y Installing Nagios and some additional packages Install major packages like: · Nagios · Nagios-common · Nagios-plugins · And some basic plugins like nagios-plugins-ping, nagios plugins-http, nagios-plugins-disk etc. [root@]$yum install nagios nagios-common nagios-plugins nagios-plugins-http nagios-plugins-disk nagios-plugins-ping -y Major configuration files To configure Nagios, you first need to find th

Samba Server on RHEL6

How to make a Samba Server on RHEL6 Task to be performed on Linux Box: Install Samba packages in your machine by yum command: [root@sunny ~]$ yum install samba* -y Open Samba's configuration file: [root@sunny ~]$ vi /etc/samba/smb.conf # at line 58 add the following unix charset = UTF-8 dos charset = CP932 # at line 75 change to the windows workgroup. workgroup =  WORKGROUP # at line 81 uncomment and change the ip addresses. hosts allow = 127. 192.168.  (127 is for local host and your machine virtual ip if you are using a VM). # at line 102 change the parameters. security = user [root@sunny ~]$ vi /etc/sysconfig/iptables Add the line at the last before commit. -A INPUT -i vmnet6 -j ACCEPT   (If using VMPlayer). -A INPUT -i virbr0 -j ACCEPT (If using Virt-Manager). (The values of vmnet6 and virbr0 may change as per your machine's config.). Restart service iptables: [root@sunny ~]$ service iptables restart Enable sharing of home dir

Encrypting Grub Menu

GRUB is a boot loader designed to boot a wide range of operating systems from a wide range of filesystems. GRUB is becoming popular due to the increasing number of possible root filesystems on which Linux can reside upon. If anyone who has access to your grub menu can easily get into your machine,So for that encryption of grub menu is used. Location of grub file: /boot/grub/grub.conf /etc/grub.conf You can edit any of these if you have a root access to your machine. Encrypting your Grub Menu: Edit any of the above mentioned files. [root@sunny ~]# vi /etc/grub.conf  Your file should show something like this: # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE:  You have a /boot partition.  This means that #          all kernel and initrd paths are relative to /boot/, eg. #          root (hd0,0) #          kernel /vmlinuz-version ro root=/dev/sda2 #          initrd /initrd-[gen

Linux Booting Process ?

For this one you can click here .... !!

Creating a SWAP partition in a LVM

Assuming that you have already created a physical volume ==> volume group. If not then click here..... Now firstly create a logical volume. Check the free space in your volume group by firing a command in terminal as vgdisplay VOLUMEGROUP NAME. [root@sunny ~]# vgdisplay vg_sunny   --- Volume group ---   VG Name               vg_sunny   System ID                Format                lvm2   Metadata Areas        1   Metadata Sequence No  3   VG Access             read/write   VG Status             resizable   MAX LV                0   Cur LV                2   Open LV               2   Max PV                0   Cur PV                1   Act PV                1   VG Size               14.51 GiB   PE Size               4.00 MiB   Total PE              3714   Alloc PE / Size       3204 / 12.52 GiB   Free  PE / Size       510 / 1.99 GiB   VG UUID               XdBCWB-sQw5-JQvn-v0an-VOWi-fIs9-Q7uEmm This command shows that in this volume group we still hav

Managing LVM

Create Logical Volume Firstly check the free space in your HDD: [root@sunny ~]# parted GNU Parted 2.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free                                                        Model: Virtio Block Device (virtblk) Disk /dev/vda: 16.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number  Start   End     Size    Type      File system     Flags         32.3kB  1049kB  1016kB            Free Space  1      1049kB  538MB   537MB   primary   ext4            boot  2      538MB   4732MB  4194MB  primary   ext4  3      4732MB  8402MB  3670MB  primary   ext4  4      8402MB  16.1GB  7704MB  extended  5      8404MB  9453MB  1049MB  logical   linux-swap(v1)  6      9454MB  10.5GB  1049MB  logical   ext4  7      10.5GB  11.6GB  1049MB  logical   ext4  8      11.6GB  12.6GB  1049MB  logical   ext4         12.6GB  16.1GB  3504MB            Free Space It will show you

Creating a SWAP partiton in Standard HDD layout.

Creating and activating a SWAP partition Check for any free space that is available in your HDD. [root@sunny ~]# parted GNU Parted 2.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free                                                       Model: Virtio Block Device (virtblk) Disk /dev/vda: 21.5GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number  Start   End     Size    Type      File system     Flags         32.3kB  1049kB  1016kB            Free Space  1      1049kB  525MB   524MB   primary   ext4            boot  2      525MB   4720MB  4194MB  primary   ext4  3      4720MB  8914MB  4194MB  primary   ext4  4      8914MB  21.5GB  12.6GB  extended  5      8916MB  11.0GB  2097MB  logical   ext4         11.0GB  11.0GB  456kB             Free Space  6      11.0GB  12.1GB  1049MB  logical   ext4  7      12.1GB  13.1GB  1049MB  logical   ext4  8      13.1GB  14.0GB  839MB   logical   ext4