Posts

Showing posts from 2015

IBM TSM Client 5.x install (trial) on your Laptop using KVM Virtual Machines

This article shows how to install IBM Tivoli client software on Linux. Refer my earlier article on installing TSM server first. Requirements 1. Red Hat Linux 5.x operating system 2. TSM client software version 5.5 3. One virtual machine for tsm server running RHEL 5.x 4. Another virtual machine for tsm client running RHEL 5.x Downloads TSM Client software - ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/client/v5r5/Linux/LinuxX86/v554/   Installing TSM Client First install the operating system and network interface. I kept the VM with 8GB hard disk and 1 GB RAM. Un-tar/unzip the TSM server software. Install the extracted rpm's in following order: rpm -ivh TIVsm-API.i386.rpm rpm -ivh TIVsm-API64.rpm rpm -ivh TIVsm-BA.rpm   Configuring the tsm client cd /opt/tivoli/tsm/client/ba/bin cp -p ./dsm.sys.smp dsm.sys and edit dsm.sys to look like below:     SErvername         SERVER1   ...

Install IBM Tivoli TSM 5.5 Backup Server (trial) on your Laptop using Linux KVM virtual machine

This article will guide you to install IBM TSM server on LINUX. Requirements Red Hat Linux 5.x operating system TSM server software version 5.x One virtual machine for tsm server running RHEL 5.x Another virtual machine for tsm client running RHEL 5.x Downloads TSM Server software - ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/server/v5r5/Linux/5.5.7.000/x86_64/ TSM Client software - ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/client/v5r5/Linux/LinuxX86/v554/  Installing TSM Server First install the operating system and network interface. I kept the VM with 8GB hard disk and 1 GB RAM. Un-tar/unzip the TSM server software. Run the installation script      ./install_server   and accept the trial license and select Basic Server install, the installation should finish successfully. In case you get package dependencies, make sure you have a RHEL 5.x repository available to you...

Automate Installation of Perl and Sudo packages with Puppet

Image
Requirement I need to install 2 packages, perl and sudo, and also want to re-install if these go missing. Try to do this manually and you could realize the manual effort required. But the good news is you could completely automate this using Puppet. You could write a Puppet module for installing the packages on RHEL 6.4 and Ubuntu. Pre-requisite Puppet server Puppet client installed (You could find this article in my blog) RHEL 6.x Ubuntu 14.x Configure yum and apt-get repositories, very important. Setup DNS or simpley put your hosts in /etc/hosts file on all servers Hosts I have 2 client machines, one running RHEL 6.4 and other on Ubuntu 14. I already configured these as puppet clients to the puppet server and already signed their SSL certificates on the puppet server. 1. web 2. db You could configure you own hosts, in any numbers you need. Action! Create puppet module Directory structure for module files         ...

How to Install Web Server with MySQL database and PHP (Installing LAMP stack with puppet)

Requirement You want to install a Web Server alongwith MySQL database and the powerful and most famous PHP programming language, popularly known as a LAMP stack! Surely, you could do this manually by installing packages one by one for few machines. In case you have many machines to build with a LAMP stack, then use Puppet. I will show you how to do this build by automating using the powerful Puppet tool. Pre-requisite RHEL 6.4 YUM repository configured and working properly A working Puppet Server A working Puppet Client (there is an article I wrote in this blog) Start! On your puppet client follow below steps: # mkdir -p /etc/puppet/modules/lamp/manifests # vi /etc/puppet/modules/lamp/manifests/init.pp class lamp { # install httpd package package { 'httpd':   ensure => installed, } # ensure httpd service is running service { 'httpd':   ensure => running, } # install mysql-server package package { 'mysql-server':   ensure...

How to mount Windows shares in LINUX

    Requirement There is a share available in Windows server. The user wants to access it's files from a Linux machine. Windows Pre-requisite   Export the Windows folder. Assign a user and password for the associated Windows domain. Inform the Linux admin about these and the Windows domain name.  Enviromnent for this setup   Windows 2008 server Red Hat Enterprise Linux  6.4 Linux Configuration   Create a credential file having Windows username and the password. You could create /root/.secretfile and put below lines in it: username=user01 password=password01 You will replace the user and password with your actual contents provided by your Windows admin. Don't forget to set root only permissions for this secret file. # chmod 600 /root/.secretfile You are now ready to mount the Windows share.  Insert one line as shown below into your /etc/fstab: //hostname/Reports   ...

Collect LUN information from remote Windows servers

This is an odd article I am writing under a Linux blog! Oops! forgive me. Requirement You are assigned with a task to collect LUN information from hundreds of Windows servers. Do it Manually if you like Yes, if you have the time and patience you could surely go about it by collecting manually and you got it right, start logging in one-by-one on each server, 1st to 200th hundres for example, or make your life easy by using my script. You are smart, I knew it! Here's how to create the script. Download Psexec and copy to a jump server. You know that from a jump server  all your target servers are reachable, right. Prepare the script You will need to create 3 files, and all are simple text files you could use notepad for this. 1. Llist of your servers or IP addresses - serverlist.txt server0001 server0002 server0003 ... server1000 2. Type below 2 commands in this file and save it - script_win.bat hostname C:\"Program Files"\install...

Configure libvirt Fencing (KVM Fencing)

   Start doing it! I will show how to configure fencing on the Luci web tool. Login to the Luci tool, then follow the links as below: Click on Fence Devices ---> Add ---> Select Fence virt (Multicast Mode) ---> Type kvmfence as name, or any other name. Now you have to assign this fence name to all your cluster nodes. Click Nodes ---> click one by one on each node and repeat below process: Click Add Fence Method ---> Type kvmfence as Method Name ---> Click on Add Fence Instance ---> Select kvmfence as Fence Device, submit, then type the name of your virtual machine (VM) as Domain. This name should match the exact name of your VM that you have created earlier in libvirt / KVM. Repeat abovr process for all the nodes in your cluster. Host Configuration Host is your KVM machine on which the virtual cluster nodes are running. Install fence-virtd rpm on your host machine. # yum install fence-virtd Verify: # rpm -q fence-...

How to re create Red Hat Cluster with Luci web based tool

Image
Error message: The error displayed is something like this: "node1 already a member of cluster1"   Cause Your first attempt to create a red hat cluster fails. You end up with few missing nodes in the cluster and only few of the nodes showing in the cluster. The reason cluster creation fails may be because of misconfigured YUM repository, wrong ricci password or ssh not running etc. Check out then proceed as told below to re create your cluster. Because of this you can't re create the cluster because few nodes are already added and this causes this error. Solving it! - already a cluster member error   Delete /etc/cluster/cluster.conf (from all nodes) You have to delete above file from all cluster nodes. In some nodes this may not be present and that's fine because it will be created later. After you delete cluster.conf you can proceed to create a new cluster by again specifying all nodes afresh in the Luci web interface. Here's a ...

Saving NFS Shares with a Perl Script

Image
You can't miss a NFS share with this script!   Pre-requisite Install Perl. About the script Many times, a sys admin will use command line to mount NFS share but forget to make it permanent. If such a server reboots, you loose that NFS share and you application will not start. Before rebooting just you need to run this script, it will check and report back if a NFS share is missing in /etc/fstab, but currently mounted. Screen shot displaying missing NFS share in /etc/fstab. This report shows that there is a NFS share mounted currently as /mnt/rhel64repo, but it is missing in /etc/fstab. Just add in /etc/fstab before reboot and you will not miss /mnt/rhel64repo after reboot and your application will also run without problems. Click here and get my NFS script from GitHub

Install Puppet Client on RHEL 6.4

This article will show how you can prepare a puppet client on Red Hat Enterprise Linux 6.4 (RHEL 6.4) server. I have installed a rhel 6.4 Base server  and also configured a local yum repository using the ISO image that was available to me. Please do the same before you start to configure puppet client. Pre-requisites Install Base RHEL 6.4 server Configure YUM repository Disk space: 8 GB for my setup, you can decide based on your needs. RAM: 1 GB, again it is up to you based on your work loads. Installing ruby The ruby package alongwith it's libraries are needed, please install them: # yum install ruby ruby-libs ruby-shadow Installing puppet client The puppet packages are available in the EPEL repository. You could install epel repository on the client server with below commands: # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA25...

Configure Static IP Address - Ubuntu 14 Server in 3 Steps

In 3 steps I will explain how to configure static IP address in a Ubuntu server, without using any graphical tool. Step 1: The configuration file that keeps network configuration is as below: /etc/networkinterfaces # 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 iface eth0 inet static Above file has single network interface eth0, which is getting it's IP address via dhcp. We need to change this to static. Step 2: Edit this file to look like below: # vi /etc/networkinterfaces # 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 iface eth0 inet static address 192.168.122.252 netmask 25...

Ethernet Bonding in LINUX

Ethernet Bonding in LINUX by Johny Darwin Ethernet bonding is also known as port teaming and port trunking. When there is requirement for fault tolerance or load balancing you can consider ethernet bonding as an easy option. Fault tolerance You can have one active and one backup network interfact. In case the active interface goes down the backup interfact takes over and provides fault tolerance. Load balancing There are algorithms in ethernet bonding which can provide load balancing, for example, by sending information sequentially starting with first interface to the last interface. For example, if there are 2 slave interfaces, first frame travel through first interface, and the second frame goes through the second frame, then the third frame goes through the first interface and so on. There are different modes available for load balancing, like the XOR mode. The lab setup For this setup I have setup a virtual machine using kvm virtual-manager running in RHEL 6.5...