How to setup redundant NFS with DRBD-Heartbeat-Centos-SuSe-RedHat-RHEL-GNU-Linux
Submitted by nilesh on Tue, 2011-04-26 09:37Hi all, hope you are enjoying series of articles published on this website for free.. totally free.
In this article you will learn how to setup redundant NFS servers using DRBD (Distributed-Replicated-Block-Devices) Technology. Complete step-by-step procedure is listed below. It works for me so hopefully it will work for your also. No gurantees are given.
1. Two servers with similar storage disk (harddrive) setup (To create a redundant nfs server)
2. One client system/server where the nfs share will be mounted.
3. Static IPs for all servers.
How to setup Linux loadbalancer using: LVS + ldirectord + heartbeat 2 on CentOS
Submitted by nilesh on Sat, 2011-02-19 16:36Steps to setup heartbeat-2.1.4 on centos 5.2.
In this document you will find procedure how to setup lb01 and lb02 as loadbalancer for 2 or more web servers. In this example I have used only 2 webservers i.e web01 and web02. In total there are 4 virtual servers. All four servers are virtual servers. I am using Xen as dom0.
After installing base operating system (I have installed CentOS 5.2) we need to install following packages on both loadbalancer linux boxes. As heartbeat is not available with standard packages you will need to download it.
MySQL-Start-Stop-Script-BSD-Linux
Submitted by nilesh on Tue, 2011-04-05 18:26MySQL startup script under BSD/Linux
Most Linux distribution comes with special start and stop script. You need to login as root before you use those scripts. Login as root user. Use su - command to login as the root user after login as normal user. You can start the MySQL server directly as described in this document.
If you are using Red Hat Linux / Fedora Linux:
Start MySQL
# service mysql start
OR
# /etc/init.d/mysql start
Stop MySQL
# service mysql stop
OR
# /etc/init.d/mysql stop
If you are using Debian Linux:
Start MySQL
Read Only filesystem to read write.
Submitted by nilesh on Sun, 2011-02-20 01:13Hi all, Many time we come across systems where root (/) filesystem is mounted read only (ro) and we need to edit some configuration files but we can not until we remount it with read write (rw) privileges.
Say for example you changed some configuration in /etc/fstab file and next time when you reboot system, it is not able to find /boot or / partitions references listed in fstab file. You are confident and knowing that your data is there on disk but system is not able to mount it correctly and refusing to boot.
How to setup linux loadbalancer for windows real server using linux-ldirectord-lvs-heartbeat
Submitted by nilesh on Sat, 2011-02-19 23:58Required operating system and packages
First of all install centos 5.2 with minimal packages and no gui required.
Packages required for setting up linux server as loadbalancer are as below.
heartbeat-2.1.4-4.1.i386.rpm
heartbeat-devel-2.1.4-4.1.i386.rpm
heartbeat-ldirectord-2.1.4-4.1.i386.rpm
heartbeat-pils-2.1.4-4.1.i386.rpm
heartbeat-stonith-2.1.4-4.1.i386.rpm
libnet-1.1.2.1-2.1.i386.rpm
perl-MailTools-1.76-1.el5.rf.noarch.rpm
There might me some more package dependencies but it can be resolved by installing those packages from cd.
How to mount windows share on linux system as non-root user
Submitted by nilesh on Sat, 2011-02-19 15:00Mount windows share on linux system easily.
Due to increased requirement of linux servers in production environment, some times there are needs to mount windows shares to linux systems. you can definately and certainly mount windows shares on Linux machines using smbmount. follow steps listed below to achieve it.
Disable SSLv2 in apache (httpd). linux-openssl-sslv2-disable
Submitted by nilesh on Sat, 2011-02-19 14:50Disable SSLv2 and enable SSLv3 or TLSv1
SSL 2.0, reportedly suffers from several cryptographic flaws and has been deprecated for several years. An attacker may be able to exploit these issues to conduct man-in-the-middle attacks or decrypt communications between the affected service and clients. To disable SSLv2 follow these steps.
After performing vulnerability scan using nessus if you find details about SSLv2 weaknesses in that report then please find the options required to disable SSLv2 as mentioned below.
In /etc/httpd/conf.d/ssl.conf change following options
How to extend logical volume assigned to para virtualized guest OS ?
Submitted by nilesh on Sat, 2011-02-19 14:39You can follow steps listed below to extend logical volume assigned to para virtualized OS. You can also extend logical volume on which para virtualized OS is installed.
- Login to Dom-0. become super user OR login as root to Dom-0.
- Identify the logical volume you want to extend. e.g it is /dev/vg0/virtual00
- execute following command to extend that logical volume.
- run lvscan from command prompt and see whether you can see increased /dev/vg0/virtual00.
lvextend -L+20G /dev/vg0/virtual00
How to add swap space on the fly on Linux / UNiX systems.
Submitted by nilesh on Sat, 2011-01-15 21:20In Linux, as in most other Unix-like operating systems, it is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions, although Red Hat recommends using a swap partition. The administrative flexibility of swap files outweighs that of partitions; since modern high capacity hard drives can remap physical sectors, no partition is guaranteed to be contiguous. You can add swap file as a dedicated partition or use following instructions to create a swap file.
Procedure to add a swap file
