Posts

Showing posts with the label rhel

Study Puppet

Want to learn about Puppet,  Click here ! https://managepuppet.blogspot.com What does above blog contains?  Introduction to Puppet puppet resource??? puppet apply??? puppet describe??? puppet agent??? puppet cert??? Un-revoke the revoked certificate in Puppet puppet master??? Puppet modules??? Facter??? Puppet installation on agent/server Creating a module in Puppet Dry run in Puppet --noop Puppet agent run Exec in Puppet Though it is still in progress....

Accessing a Private hosted application via Public/Bastion instance [AWS]

Image
Let's say you have an application which you have deployed in your Private subnet in AWS and you want to access that application via your Bastion instance / Browser. 1. Assuming that you already have deployed the application on one of your Private Subnet EC2 instance. 2. If deployed correctly, that application should be accessible via http://PRIVATE_IP:PORT/ but since your private instance doesn't have internet access and you cannot directly connect to it. We will use an alternative to it. So to achieve this we will set-up an SSH tunnel and then use it to connect to our application via any Browser. $ ssh -N -R LOCAL_PORT:REMOTE_APP_HOST:REMOTE_APP_PORT USER@LOCAL_HOST -i KEY.PEM Man entry for -R flag: -R [bind_address:]port:host:hostport -R [bind_address:]port:local_socket -R remote_socket:host:hostport -R remote_socket:local_socket Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the gi...

NIC Bonding/Teaming in RHEL6

NIC [network interface card] bonding is a term used to describe a way to increase available bandwidth.  Bonding is nothing but Linux kernel feature[aka BONDING] that allows to aggregate multiple like interfaces (such as eth0, eth1, eth2 etc) into a single virtual link. This is done to get higher data rates and as well as link failover. NIC bonding may also be called as NIC Teaming. Here we will create a bond called bond0 , number of ether-net's used are two [ eth0 and eth1 ]. Step 1: Create a bond0 file==> # vim /etc/sysconfig/network-scripts/ifcfg-bond0 Append the file with below information and save the file==> DEVICE=bond0 IPADDR=192.168.57.150 NETMASK=255.255.255.0 USERCTL=no BOOTPROTO=none ONBOOT=yes Note: IP and Netmask needs to be replaced as per your network configuration. Step 2:  Edit ifcfg-eth0 ==> # vim /etc/sysconfig/network-scripts/ifcfg-eth0  Append the details as follows ==>  DEVICE=eth0 ONBOOT=yes ...

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 ====================================================================...

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 =============================================...

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 fin...

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 ...

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. #        ...

Linux Booting Process ?

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

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  ...