April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Categories

April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

DRBD

db1.rmohan.com 192.168.1.105 db2.rmohan.com 192.168.1.106 Add a hard disk

fdisk /dev/sdb wget http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch rpm -ivUh elrepo-release-6-4.el6.elrepo.noarch.rpm

vi /etc/yum.repos.d/elrepo.repo

Edit /etc/yum.repos.d/elrepo.repo ( change line #8 ‘enable=0′ ) yum –enablerepo=elrepo install drbd83-utils kmod-drbd83 yum -y install parted

partprobe /dev/sdb1

pvcreate /dev/sdb1

vgcreate vg_db /dev/sdb1 lvcreate -n lv_db -L +50G vg_db lvcreate -n lv_meta -L +10G vg_db groupadd haclient […]

GLUSTER ON CENTOS 6.5

cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.45 cluster1.rmohan.com cluster1 192.168.1.41 cluster2.rmohan.com cluster2 192.168.1.42 cluster3.rmohan.com cluster3

 

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*

rpm –import https://fedoraproject.org/static/0608B895.txt cd /tmp wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm yum install yum-priorities vi /etc/yum.repos.d/epel.repo

priority=10 [epel] name=Extra Packages for Enterprise Linux 6 – $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 priority=10 […]

Determining if ip address is already in use for device eth0. how to fix the issue RHEL FEDORA CENTOS

[ OK ] [root@cluster3 ~]# /etc/init.d/network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining if ip address 192.168.1.42 is already in use for device eth0… [ OK ] [root@cluster3 ~]# ifconfig eth0 Link encap:Ethernet HWaddr […]

Tacacs server on Redhat / CentOS

Terminal Access Controller Access-Control System (TACACS) is a remote authentication protocol that is used to communicate with an authentication server commonly used in UNIX networks. TACACS allows a remote access server to communicate with an authentication server in order to determine if the user has access to the network. TACACS is defined in RFC 1492, […]

Google-authenticator in CentOS

yum install gcc gcc++ make python python-devel git pam-devel

cd /tmp git clone https://code.google.com/p/google-authenticator/ cd google-authenticator/libpam make make install cd /tmp rm -Rf google-authenticator/

  To enable ssh 2 factor:

sed -i ‘1 a\ auth required pam_google_authenticator.so’ /etc/pam.d/sshd Make sure that challenge response is listed as YES in your SSHD config

… ChallengeResponseAuthentication yes

Login […]

glances

Install: On CentOS 6.x with EPEL repository sudo rpm -ivh http://fr2.rpmfind.net/linux/epel/6/x86_64/epel-release-6-7.noarch.rpm sudo yum install python-pip python-devel sudo pip-python install glances

How to get the Disk informationhttp://rmohan.com/wp-admin/post-new.phps in linux

# hdparm -I /dev/sda —— information about the IDE/ATA disk (Linux) / disk performance # fdisk /dev/sda6 —— Display and manipulate the partition table # smartctl -a /dev/sda1 — Display the disk SMART info # diskinfo -v /dev/ad2 —- information about disk (sector/size) FreeBSD # dmidecode ——- dmidecode is a tool for dumping a computer’s […]

Linux Kerberos Configuration Guide

SERVER auth.example.com * yum install krb5-server krb5-workstation pam_krb5 * conf files – /etc/krb5.conf – /var/kerberos/krb5kdc/kdc.conf – /var/kerberos/krb5kdc/kadm5.acl – /etc/pam.d/system-auth

* kdb5_util create -r EXAMPLE.COM -s * kadmin.local -q “addprinc admin/admin” * kadmin.local -q \ “ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw” * kadmin.local -q “addprinc testuser” * kadmin.local -q “addprinc -randkey host/auth.example.com” * kadmin.local -q “ktadd -k […]

How To Enable NTFS Support in CentOS 6.3

In this how to I will describe how to enable NTFS support in CentOS 6.3. By default CentOS 6.x doesnt comes with NTFS support to mount NTFS partition either on hard disk or usb drives. Fedora provies EPEL repository for Red Hat Enterprise Linux. EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort […]

CPU architecture information under Linux operating

You can use /proc/cpuinfo file or use the lscpu command to get info about CPU architecture. It will display information like: Number of CPUs Threads Cores Sockets NUMA nodes Information about CPU caches, CPU family, model and stepping. in human-readable format. Alternatively, it can print out in parsable format including how different caches are shared […]