tag:blogger.com,1999:blog-65875242895821838322024-03-13T09:35:07.869+05:30My Experiences With LinuxOpen Your Eyes To A New Worldസമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.comBlogger57125tag:blogger.com,1999:blog-6587524289582183832.post-87961427087078757472015-02-25T14:10:00.000+05:302015-02-25T14:10:34.799+05:30Centos7 Upgrading Kernel to 3.19<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Centos 7 is the latest release from the community. Centos7 is shipped with 3.10 Kernel. Many times people may need the latest Kernel. This article telling about how to upgrade from 3.10 to latest upstream kernel.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b># rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org</b></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b># rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm</b></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b># yum --enablerepo=elrepo-kernel install kernel-ml</b></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Once the installation is finished, make sure you have got new kernel.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b># <span style="background-color: #f9f9f9; font-size: 14.875px; line-height: 1.3em;">awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg</span></b></span></div>
<div style="text-align: justify;">
<span style="background-color: #f9f9f9; font-size: 14.875px; line-height: 1.3em;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14.875px; line-height: 19.3374996185303px;"><span style="color: #38761d; font-family: Verdana, sans-serif;">CentOS Linux, with Linux 3.19.0-1.el7.elrepo.x86_64</span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14.875px; line-height: 19.3374996185303px;"><span style="color: #38761d; font-family: Verdana, sans-serif;">CentOS Linux, with Linux 3.10.0-123.el7.x86_64</span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14.875px; line-height: 19.3374996185303px;"><span style="color: #38761d; font-family: Verdana, sans-serif;">CentOS Linux, with Linux 3.10.0-123.20.1.el7.x86_64</span></span></div>
<span style="color: #38761d; font-family: Verdana, sans-serif;"><span style="background-color: #f9f9f9; font-size: 14.875px; line-height: 19.3374996185303px;"></span></span><br />
<div style="text-align: justify;">
<span style="font-size: 14.875px; line-height: 19.3374996185303px;"><span style="color: #38761d; font-family: Verdana, sans-serif;">CentOS Linux, with Linux 0-rescue-b6ea1092b61e4ac7a546ba4454bd63d0</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #252525; font-size: 14.875px; line-height: 23.7999992370605px;"><span style="font-family: Verdana, sans-serif;">If the CentOS kernel version 3.19.x is listed first, then set grub to use 0 which will set the system to boot off the newer kernel. You might want to leave some of the older 3.10.x kernels on the system in case you decide to revert to the stock CentOS 7 kernel, but you can always modify the default kernel to use later on.</span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #252525; font-size: 14.875px; line-height: 23.7999992370605px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b><span style="background-color: white; font-size: 14.875px; line-height: 23.7999992370605px;"># </span><span style="background-color: #f9f9f9; font-size: 14.875px; line-height: 1.3em;">grub2-set-default 0</span></b></span></div>
<div style="text-align: justify;">
<span style="background-color: #f9f9f9; font-size: 14.875px; line-height: 1.3em;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #252525; font-size: 14.875px; line-height: 23.7999992370605px;"><span style="font-family: Verdana, sans-serif;">Update the grub2 config so it's aware of the changes we just made.</span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #252525; font-size: 14.875px; line-height: 23.7999992370605px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><b><span style="background-color: white; font-size: 14.875px; line-height: 23.7999992370605px;"># </span><span style="font-size: 14.875px; line-height: 23.7999992370605px;">grub2-mkconfig -o /boot/grub2/grub.cfg</span></b></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><b><br /></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><span style="color: #783f04;"><b># reboo</b></span><span style="color: #252525;">t</span></span></span></div>
<div style="text-align: justify;">
<span style="color: #252525; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #252525; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;">Check the new kernal.</span></span></div>
<div style="text-align: justify;">
<span style="color: #252525; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #783f04; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><b># uname -a</b></span></span></div>
<div style="text-align: justify;">
<span style="color: #252525; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #252525; font-family: Verdana, sans-serif;"><span style="font-size: 14.875px; line-height: 23.7999992370605px;">Linux compute1 3.19.0-1.el7.elrepo.x86_64 #1 SMP Mon Feb 9 09:57:29 EST 2015 x86_64 x86_64 x86_64 GNU/Linux</span></span></div>
<br />
<br />
<br /></div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com1tag:blogger.com,1999:blog-6587524289582183832.post-21780070366987503752015-02-02T15:29:00.000+05:302015-02-19T10:58:19.485+05:303 Node MySQL Cluster using Percona<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="color: #666666; font-size: 14px; line-height: 22.3999996185303px;"><span style="font-family: Verdana, sans-serif;">Percona XtraDB Cluster is an active/active high availability and high scalability open source solution for MySQL clustering. It integrates Percona Server and Percona XtraBackup with the Galera library of MySQL high availability solutions in a single package which enables you to create a cost-effective MySQL high availability cluster. </span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-size: 14px; line-height: 22.3999996185303px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-size: 14px; line-height: 22.3999996185303px;"><span style="font-family: Verdana, sans-serif;">Here following a 3 node mysql cluster using Percona. The infrastructure is as follows.</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-size: 14px; line-height: 22.3999996185303px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">All the Nodes are running on Centos 6.6. The IPAddress / Hostnames of the Nodes are as follows. Turn off IPTABLES in all these nodes, OR allow traffic between these nodes.</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.1 cluster-node1</b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.2 cluster-node2</b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.3 cluster-node3</b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Add these entries in each and every nodes /etc/hosts files.</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><b><i>#vim /etc/hosts</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.1 cluster-node1</b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.2 cluster-node2</b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b>192.168.1.3 cluster-node3</b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: red; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Disable SELINUX</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif; font-size: 14px; line-height: 22.3999996185303px;">Set Up SSH Keys and place into authorized_keys so all the id_rsa.pub values are in authorized_keys on all servers.</span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># ssh-keygen -t rsa</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cd /root/.ssh/</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cp id_rsa.pub authorized_keys </i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># chmod 600 /root/.ssh/authorized_keys</i></b></span></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># chmod 700 /root/.ssh/</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Install the Needed Repositories for Percona & Socat.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># yum -y install http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># yum -y install http://mirror.pnl.gov/epel/6/x86_64/epel-release-6-8.noarch.rpm</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wget http://www.percona.com/downloads/RPM-GPG-KEY-percona /etc/pki/rpm-gpg/RPM-GPG-KEY-percona </i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wget http://www.percona.com/downloads/RPM-GPG-KEY-percona /etc/pki/rpm-gpg/RPM-GPG-KEY-percona </i></b></span></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># yum -y install socat</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Remove the following applications to avoid the dependencies, Later we can bring them back.</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #134f5c; font-size: 14px; line-height: 22.3999996185303px;"><b><i># rpm -e mysql-libs postfix cronie redhat-lsb-core redhat-lsb-printing redhat-lsb-graphics libcgroup numad redhat-lsb sysstat crontabs cronie-anacron redhat-lsb-compat</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Install the Percona Cluster Packages (Repeat the following Commands in all the Nodes)</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#yum -y install Percona-XtraDB-Cluster-full-56</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Start the Server.</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node1 ~]# /etc/init.d/mysql start</i></b></span></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)......... SUCCESS! </i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node2 ~]# /etc/init.d/mysql start</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)......... SUCCESS!</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node3 ~]# /etc/init.d/mysql start</i></b></span></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)......... SUCCESS! </i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Run the following Commands</span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" </i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"</i></b></span></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"</i></b></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Bring in Back the removed packages</span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">#</span></span><span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="font-family: Verdana, sans-serif;">yum -y install postfix cronie redhat-lsb-core redhat-lsb-printing redhat-lsb-graphics libcgroup numad redhat-lsb sysstat crontabs cronie-anacron redhat-lsb-compat</span></span></span></i></b></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #666666; font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #666666; font-family: Verdana, sans-serif;">Create the my.cnf file in first node and insert the following contents</span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #666666; font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="font-family: Verdana, sans-serif;"><b><i>#vim /etc/my.cnf</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[mysqld]</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>datadir=/var/lib/mysql</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>user=mysql</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># Path to Galera library</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_provider=/usr/lib64/libgalera_smm.so</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># Cluster connection URL contains the IPs of node#1, node#2 and node#3</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-node 1 192.168.1.1</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 2 192.168.1.2</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 3 192.168.1.3</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_address=gcomm://192.168.1.1,192.168.1.2,192.168.1.3</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># In order for Galera to work correctly binlog format should be ROW</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>binlog_format=ROW</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># MyISAM storage engine has only experimental support</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>default_storage_engine=InnoDB</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># This changes how InnoDB auto increment locks are managed and is a requirement for Galera</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>innodb_autoinc_lock_mode=2</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># Node #1 address</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_node_address=192.168.1.1</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># SST method</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#wsrep_sst_method=xtrabackup</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i> wsrep_sst_method=rsync #</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=rsync_wan #</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=mysqldump # SLOW</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># Cluster name</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_name=percona_cluster</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># Authentication for SST method</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_sst_auth="root:password" </i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># server_id</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>server_id=3232235553 #SELECT INET_ATON('192.168.1.1')</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#[client]</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>socket=/var/lib/mysql/mysql.sock</i></b></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><b><u>Start the First Clustering Node.</u></b></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #4c1130; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#/etc/init.d/mysql start --wsrep-cluster-address="gcomm://"</i></b></span></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: #4c1130; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)...................................... SUCCESS!</i></b></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="color: red; font-size: 14px; line-height: 22.3999996185303px;">Read the grastate.dat file . (It will be in /var/lib/mysql)</span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node1 mysql]# cat grastate.dat</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i># GALERA saved state</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i>version: 2.1</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i>uuid: 68aa64c3-a966-11e4-96dd-b6bab6cb5af6</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i>seqno: -1</i></b></span></span><br />
<b><i><span style="color: #a64d79;"><br /></span></i></b>
<span style="font-family: Verdana, sans-serif;"><span style="color: #a64d79; font-size: 14px; line-height: 22.3999996185303px;"><b><i>cert_index:</i></b></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><b><i><u>Check the Cluster Status.</u></i></b></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql>select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span><br />
<b><i><span style="color: #0b5394;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">*************************** 1. row ***************************</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node1</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: #0b5394;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">*************************** 1. row ***************************</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 3</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><b><i><u>#Now copy the following Contents in /etc/my.cnf file of Second Node</u></i></b></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">#vim /etc/my.cnf</span></span><br />
<span style="font-family: Verdana, sans-serif; font-size: 14px; line-height: 22.3999996185303px;"><span style="color: #38761d;"><b><i>[mysqld]</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">datadir=/var/lib/mysql</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>user=mysql</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Path to Galera library</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_provider=/usr/lib64/libgalera_smm.so</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Cluster connection URL contains the IPs of node#1, node#2 and node#3</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-node 1 192.168.1.1</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 2 192.168.1.2</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 3 192.168.1.3</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_address=gcomm://192.168.1.1,192.168.1.2,192.168.1.3</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># In order for Galera to work correctly binlog format should be ROW</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>binlog_format=ROW</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># MyISAM storage engine has only experimental support</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>default_storage_engine=InnoDB</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># This changes how InnoDB auto increment locks are managed and is a requirement for Galera</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>innodb_autoinc_lock_mode=2</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Node #1 address</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_node_address=192.168.1.2</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># SST method</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#wsrep_sst_method=xtrabackup</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i> wsrep_sst_method=rsync #</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=rsync_wan #</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=mysqldump # SLOW</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Cluster name</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_name=percona_cluster</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Authentication for SST method</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_sst_auth="root:password" </i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># server_id</span></span></i></b></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>server_id=3232235553 #SELECT INET_ATON('192.168.1.2')</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">#[client]</span></span></i></b></span><br />
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>socket=/var/lib/mysql/mysql.sock</i></b></span></span><br />
<span style="color: #38761d;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Start the Cluster in Second Node.</span></span></i></b></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="color: #741b47; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node2]#/etc/init.d/mysql start</i></b></span></span><br />
<b><i><span style="color: #741b47;"><br /></span></i></b>
<span style="font-family: Verdana, sans-serif;"><span style="color: #741b47; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)........................... SUCCESS!</i></b></span></span><br />
<br />
<br />
<br />
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #666666; font-family: Verdana, sans-serif;"><b><i><u>Now check the Status in Both Nodes.</u></i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #666666; font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: #0b5394; font-family: Verdana, sans-serif;"><b><i>First Node</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql> select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node1</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 2</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Second Node</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql> select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node2</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i><br /></i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 2</i></b></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<div style="text-align: left;">
<span style="font-family: Verdana, sans-serif;"><span style="color: #0b5394; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><i><b><u>Now, We are adding 3 Node to the Cluster. </u></b></i></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">#Now copy the following Contents in /etc/my.cnf file of Third Node</span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><b><i>#vim /etc/my.cnf</i></b></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<br />
<div style="text-align: justify;">
<span style="color: #38761d; font-family: Verdana, sans-serif; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><b><i>[mysqld]</i></b></span></div>
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">datadir=/var/lib/mysql</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>user=mysql</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Path to Galera library</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_provider=/usr/lib64/libgalera_smm.so</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Cluster connection URL contains the IPs of node#1, node#2 and node#3</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-node 1 192.168.1.1</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 2 192.168.1.2</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># cluster-nod3 3 192.168.1.3</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_address=gcomm://192.168.1.1,192.168.1.2,192.168.1.3</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># In order for Galera to work correctly binlog format should be ROW</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>binlog_format=ROW</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># MyISAM storage engine has only experimental support</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>default_storage_engine=InnoDB</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># This changes how InnoDB auto increment locks are managed and is a requirement for Galera</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>innodb_autoinc_lock_mode=2</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Node #1 address</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_node_address=192.168.1.3</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># SST method</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>#wsrep_sst_method=xtrabackup</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i> wsrep_sst_method=rsync #</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=rsync_wan #</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i># wsrep_sst_method=mysqldump # SLOW</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Cluster name</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_cluster_name=percona_cluster</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># Authentication for SST method</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>wsrep_sst_auth="root:password" </i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"># server_id</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>server_id=3232235553 #SELECT INET_ATON('192.168.1.3')</i></b></span></span><br />
<b><i><span style="color: #38761d;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">#[client]</span></span></span></i></b><br />
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: #38761d; font-size: 14px; line-height: 22.3999996185303px;"><b><i>socket=/var/lib/mysql/mysql.sock</i></b></span></span><br />
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: #741b47; font-size: 14px; line-height: 22.3999996185303px;"><b><i>[root@cluster-node3]#/etc/init.d/mysql start</i></b></span></span><br />
<span style="color: #741b47;"><b><i><br /></i></b></span>
<span style="font-family: Verdana, sans-serif;"><span style="color: #741b47; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Starting MySQL (Percona XtraDB Cluster)........................... SUCCESS!</i></b></span></span><br />
<span style="color: #741b47;"><b><i><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
</i></b></span><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><span style="color: #741b47;"><b><i>Now Check the Cluster status in Each nodes.</i></b></span><span style="color: #666666;"> </span></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<br />
<div style="text-align: justify;">
<span style="font-size: 14px; line-height: 22.3999996185303px; text-align: left;"><span style="color: magenta; font-family: Verdana, sans-serif;"><b><i>First Node</i></b></span></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql> select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node1</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">*************************** 1. row ***************************</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 3</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Second Node</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql> select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node2</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">*************************** 1. row ***************************</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 3</i></b></span></span><br />
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Third Node</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>mysql> select @@hostname\G show global status like 'wsrep_cluster_size' \G</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>*************************** 1. row ***************************</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>@@hostname: controller-node2</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">*************************** 1. row ***************************</span></span></span></i></b><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>Variable_name: wsrep_cluster_size</i></b></span></span><br />
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i> Value: 3</i></b></span></span><br />
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><b><i><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px; text-align: left;"></span></i></b></span></div>
<span style="font-family: Verdana, sans-serif;"><span style="color: magenta; font-size: 14px; line-height: 22.3999996185303px;"><b><i>1 row in set (0.00 sec)</i></b></span></span><br />
<b><i><span style="color: magenta;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">You can see that, the Value has changed to 3. All are Good Now.</span></span></span></i></b><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Testing.</span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;">Create a Test Database in First Node, You can see that it will be replicated in Another nodes.</span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span>
<br />
<div style="text-align: left;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
<div>
<span style="color: #666666; font-family: Verdana, sans-serif;"><span style="font-size: 14px; line-height: 22.3999996185303px;"><br /></span></span></div>
</div>
<head>
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//elearn.awal.com.sa/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//elearn.awal.com.sa/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
</head>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com1tag:blogger.com,1999:blog-6587524289582183832.post-2786480104324696542015-01-28T11:09:00.001+05:302015-01-28T11:09:45.067+05:30CommunicationError: Error communicating with http://XX.XX.XX.XXX:9292 [Errno 111] ECONNREFUSED<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Some times, when you trying to deploy a machine, you may ended up with the following error. In my case, the infrastructure is as follows.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">One Controller Node, Two compute Nodes, One cinder and One Neutron node. All are Centos 6.6 with Icehouse Release.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-size: 17px; line-height: 27.625px;"><span style="color: #38761d; font-family: Verdana, sans-serif;"><i>2013-10-30 12:34:03.574 15487 TRACE nova.api.openstack CommunicationError: Error communicating with http://192.168.72.100:9292 [Errno 111] ECONNREFUSED</i></span></span></div>
<div style="text-align: justify;">
<span style="color: #333333; font-size: 17px; line-height: 27.625px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Even your glance_host configuration parameter in the /etc/cinder/cinder.conf is right, you will face this issue. To resolve this issue, add the following in the /etc/nova/nova.conf file of Controller node.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<br />
<div style="text-align: justify;">
<b style="color: #741b47; font-family: Verdana, sans-serif;"><i><span style="font-size: 17px; line-height: 27.625px;">image_service=nova.image.</span><wbr style="box-sizing: border-box; font-size: 17px; line-height: 27.625px;"></wbr><span style="font-size: 17px; line-height: 27.625px;">glance.GlanceImageService</span></i></b></div>
<span style="color: #741b47; font-family: Verdana, sans-serif;"><div style="text-align: justify;">
<b><i><span style="font-size: 17px; line-height: 27.625px;">glance_api_servers=192.168.72.</span><wbr style="box-sizing: border-box; font-size: 17px; line-height: 27.625px;"></wbr><span style="font-size: 17px; line-height: 27.625px;">145:9292 #IPis the Glance Host</span></i></b></div>
</span><br />
<div style="text-align: justify;">
<span style="color: #333333; font-size: 17px; line-height: 27.625px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #333333; font-size: 17px; line-height: 27.625px;"><span style="font-family: Verdana, sans-serif;">Restart the Nova scheduler and API services in Controller node.</span></span></div>
<div style="text-align: justify;">
<span style="color: #333333; font-size: 17px; line-height: 27.625px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="color: #333333; font-size: 17px; line-height: 27.625px;"><span style="font-family: Verdana, sans-serif;">You are good to Go !!!</span></span></div>
</div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-11901435889823801872015-01-15T10:33:00.000+05:302015-01-15T10:33:39.286+05:30VirtualInterfaceCreateException: Virtual Interface creation failed : Openstack Compute Error<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Some times, you may face this issue in your KVM hypervisor. This is because libvirt wait for neutron to confirm plugging before boot. This makes the libvirt driver use the instance event mechanism to wait for neutron to confirm that VIF plugging is complete before actually starting the VM. Which will put the vm status to error and in the compute.log you can see the following error.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #0c343d;"><i>TRACE nova.compute.manager [instance: 2a9464d0-0fed-423d-b855-a56f7a5f85a9] VirtualInterfaceCreateException: Virtual Interface creation failed</i></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Inorder to prevent this, you have to add the following parametres in the nova.conf of the compute node.</div>
<div style="text-align: justify;">
<b><span style="color: #990000;"><br /></span></b></div>
<b><span style="color: #990000;">vif_plugging_is_fatal: false </span></b><br />
<b><span style="color: #990000;"> </span></b><b><span style="color: #990000;">vif_plugging_timeout: 0</span></b><br />
<br />
And restart the compute Node.<br />
<br />
<b><i><span style="color: blue;">/etc/init.d/openstack-nova-compute restart</span></i></b><br />
<br />
The error will disappear.<br />
<br />
Tested with Openstack Icehouse, KVM having Kernel 3.18 and a separate node for Neutron. </div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-44217393964926348772015-01-14T11:19:00.000+05:302015-01-14T11:20:29.728+05:30Over-Committing And Ballooning in KVM<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Over-Committing the resource is a vital part in Virtualization. Idea of over-committment is to allocate more memory to guest machines than the host really has. Suppose a 2GB host is running two guest operating system who is having 2GB memory, in this case we can say its over committed.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In Ballooning process, Host have a right to take the free memory from Guest machines if its there. Consider the above said example, where suppose one virtual machine is using 1GB and other 1GB is free, host can ask the guest to return the free memory. Guest will give it back and host can allocate somewhere else. And if the reduced guest wants to run an application that consumes more than the 1G it currently has, it has to grow again. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #0b5394;"><u><b>virtio_balloon</b></u></span> - This is the driver who open a communication pathway between Host and the Guest virtual machines. Hypervisor (Host) uses this communication pathway to over-committ the resource from Guest machines. If you are not loaded the virtio_balloon driver, you are not able to do the following.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="color: #cc0000;"><i>1. The guest operating system ignores memory requests from the hypervisor.</i></span><br />
<span style="color: #cc0000;"><i>2. The hypervisor cannot over-commit the memory.</i></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The main problem is, this ballooning process is not automatic. it's entirely manual. Someone (or some tool) is supposed to be watching
the pressure in the host and guest and then operate the balloon
accordingly. In 2013 October KVM forum, Redhat introduced Automatic Ballooning. You can find the presented slides <a href="http://www.linux-kvm.org/wiki/images/f/f6/Automatic-ballooning-slides.pdf" target="_blank">here</a>, and its available with from Kernel 3.10 onwards. I would say, its still experimental and need more feedback.</div>
</div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com1tag:blogger.com,1999:blog-6587524289582183832.post-51408479100873879922015-01-13T11:30:00.000+05:302015-01-13T11:37:25.524+05:30Adding Aggregater in Openstack<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
People may have little bit of confusion about Host Aggregates and Availabaility Zones in Nova. Here I am trying to explain how these things are worked together. All configuration options aer based on Icehouse release of Openstack.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A host aggregate is a grouping of hosts with associated metadata. A host can be in more than one host aggregate. The concept of host aggregates is only exposed to cloud administrators. A host aggregate may be visible to users in the form of an availability
zone. When you create a host aggregate, you have the option of providing
an availability zone name.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The following will create a Availability zone called Ezone-IND with a Name of enterprise. </div>
<br />
[root@controller ~]# <b>nova aggregate-create enterprise Ezone-IND</b><br />
+----+------------+-------------------+-------+-------------------------------+<br />
| Id | Name | Availability Zone | Hosts | Metadata |<br />
+----+------------+-------------------+-------+-------------------------------+<br />
| 3 | enterprise | Ezone-IND | | 'availability_zone=Ezone-IND' |<br />
+----+------------+-------------------+-------+-------------------------------+<br />
<br />
List the available hypervisor list to add under this zone.<br />
<br />
[root@controller ~]# <b>nova hypervisor-list</b><br />
+----+----------------------+<br />
| ID | Hypervisor hostname |<br />
+----+----------------------+<br />
| 1 | compute |<br />
| 4 | domain-c15(Cluster1) |<br />
| 5 | compute1 |<br />
+----+----------------------+<br />
<br />
Now, we are going to add hypervisor "compute1" under Ezone-IND<br />
<br />
[root@controller ~]# <b>nova aggregate-add-host 3 compute1</b><br />
Host compute1 has been successfully added for aggregate 3 <br />
+----+------------+-------------------+------------+-------------------------------+<br />
| Id | Name | Availability Zone | Hosts | Metadata |<br />
+----+------------+-------------------+------------+-------------------------------+<br />
| 3 | enterprise | Ezone-IND | 'compute1' | 'availability_zone=Ezone-IND' |<br />
+----+------------+-------------------+------------+-------------------------------+<br />
<br />
Now you can see the Host Compute1 is under Ezone-IND.<br />
<br />
<br /></div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-42219992967772412932015-01-07T16:36:00.001+05:302015-01-07T16:36:38.254+05:30How to Know Interface is Connected to network - Linux<div dir="ltr" style="text-align: left;" trbidi="on">
If you are managing the Linux server remotely, and your Data Center technician informed you that he already connected the Cable to an interface, but in case of Blade servers he cannot identify he connected to which interface (Not only him, nobody). Most of the cases there will be more than 3 interfaces, in this case identify which interface is connected you can use the following command.<br />
<br />
<span style="color: purple;"><i>[root@compute ~]# ethtool em1<br />Settings for em1:<br /> Supported ports: [ TP FIBRE ]<br /> Supported link modes: 10baseT/Half 10baseT/Full <br /> 100baseT/Half 100baseT/Full <br /> 1000baseT/Full <br /> Supported pause frame use: No<br /> Supports auto-negotiation: Yes<br /> Advertised link modes: 10baseT/Half 10baseT/Full <br /> 100baseT/Half 100baseT/Full <br /> 1000baseT/Full <br /> Advertised pause frame use: No<br /> Advertised auto-negotiation: Yes<br /> Speed: Unknown!<br /> Duplex: Unknown! (255)<br /> Port: Twisted Pair<br /> PHYAD: 2<br /> Transceiver: internal<br /> Auto-negotiation: on<br /> MDI-X: Unknown<br /> Supports Wake-on: g<br /> Wake-on: d<br /> Link detected: no</i></span><br />
<span style="color: purple;"><i>[root@compute ~]# </i></span><br />
<br />
Here is the output, and you can see the parameter Link detected: no. Which mean its not connected.<br />
<br />
<span style="color: #351c75;"><i>[root@compute ~]# ethtool p3p1<br />Settings for p3p1:<br /> Supported ports: [ FIBRE ]<br /> Supported link modes: 10baseT/Half 10baseT/Full <br /> 100baseT/Half 100baseT/Full <br /> 1000baseT/Full <br /> 2500baseX/Full <br /> 10000baseT/Full <br /> Supported pause frame use: Symmetric Receive-only<br /> Supports auto-negotiation: Yes<br /> Advertised link modes: 10baseT/Half 10baseT/Full <br /> 100baseT/Half 100baseT/Full <br /> 1000baseT/Full <br /> 2500baseX/Full <br /> 10000baseT/Full <br /> Advertised pause frame use: Symmetric Receive-only<br /> Advertised auto-negotiation: Yes<br /> Link partner advertised link modes: 1000baseT/Full <br /> 10000baseT/Full <br /> Link partner advertised pause frame use: No<br /> Link partner advertised auto-negotiation: Yes<br /> Speed: 10000Mb/s<br /> Duplex: Full<br /> Port: FIBRE<br /> PHYAD: 1<br /> Transceiver: internal<br /> Auto-negotiation: on<br /> Supports Wake-on: d<br /> Wake-on: d<br /> Current message level: 0x00000000 (0)<br /> <br /> Link detected: yes<br />[root@compute ~]# </i></span><br />
<br />
<br />
<br />
In the second attempt but with another interface you can see the Link detected: yes. Change the interfaces names accordingly. In my case those are em1 and p3p1<br /></div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-41361271118114992672014-12-24T11:31:00.001+05:302014-12-24T11:31:27.484+05:30NovaException: Unexpected vif_type=binding_failed - Openstack<div dir="ltr" style="text-align: left;" trbidi="on">
Some time you may face and error<br />
<i><span style="color: blue;"><b>"NovaException: Unexpected vif_type=binding_failed</b>" </span></i><br />
in the compute log of nova compute node while trying to deploy a virtual machine. The detailed log is looks like below.<br />
<br />
<u><b>INFRASTRUCTURE</b></u><br />
<span style="color: #a64d79;">Centos 6.5 in All the nodes with Kernel 2.6.32-504.1.3 (64B)</span><br />
<span style="color: #a64d79;">Centos 6.5 in Compute node with Kernel 3.18.1 (64B). RBD module is not loaded automatically in 2.6.2, thats why i am using 3.18.1 in Compute node. </span><br />
<span style="color: #a64d79;">Openstack Icehouse.</span><br />
<br />
<i><span style="color: #38761d;">TRACE nova.compute.manager [instance: 84ff8ab0-7bc1-41ac-b7a7-d5a86fceaa0e] NovaException: Unexpected vif_type=binding_failed</span></i><br />
<br />
This is normally happens because of a wrong configuration parameter in the Layer2 plugin configuration in the Neutron node and Compute node. You can change it like below.<br />
<br />
<div class="p1">
Edit <b><span style="color: #4c1130;"><em>/etc/neutron/plugins/ml2/ml2_conf.ini</em></span></b> on both compute and network node</div>
<div class="p1">
<br /></div>
<div class="p1">
Change <span style="color: red;"><b>‘tunnel_type = gre’ to ‘tunnel_types = gre’</b></span></div>
<div class="p1">
<br /></div>
<div class="p1">
And Restart the services.</div>
<div class="p1">
<br /></div>
<div class="p1">
<u><b>COMPUTE NODE</b></u></div>
<div class="p1">
<span style="color: #38761d;">service openvswitch restart</span></div>
<div class="p1">
<span style="color: #38761d;">service neutron-openvswitch-agent restart</span></div>
<div class="p1">
<br /></div>
<div class="p1">
<u><b>NEUTRON NODE</b></u></div>
<div class="p1">
<span style="color: #38761d;">service neutron-openvswitch-agent restart</span></div>
<div class="p1">
<span style="color: #38761d;">service neutron-l3-agent restart</span></div>
<div class="p1">
<span style="color: #38761d;">service neutron-dhcp-agent restart</span></div>
<div class="p1">
<span style="color: #38761d;">service neutron-metadata-agent restart</span></div>
<div class="p1">
<br /></div>
<div class="p1">
Everything will be fine after this. </div>
<div class="p1">
<br /></div>
<div class="p1">
<br /></div>
</div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-57585448405763776342014-12-21T14:57:00.000+05:302014-12-21T15:07:04.283+05:30<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
When you want to use <a href="http://ceph.com/docs/next/start/intro/" target="_blank">CEPH</a> as the backend of <a href="http://en.wikipedia.org/wiki/OpenStack" target="_blank">Openstack</a>, you may face this error in ceph admin while MAP your newly created volume.<br />
<br />
<span style="color: #cc0000;"><b> ERROR: modinfo: could not find module rbd<br /> FATAL: Module rbd not found.<br /> rbd: modprobe rbd failed! (256)</b></span><br />
<br />
This is because RBD module is not loaded in the <a href="http://en.wikipedia.org/wiki/Linux_kernel" target="_blank">Kernel</a>. I have searched a lot in internet on how to enable RBD module in the Kernel. I am summarise my finding here.<br />
<br />
<br />
<br />
<u><b>CURRENT SYSTEM</b></u><br />
<br />
<b><span style="color: #38761d;">COMPONENT CINDER<br /><br />OPENSTACK ICEHOUSE<br /><br />OS CENTOS 6.6<br /><br />KERNEL 3.18.0 (64)</span></b><br />
<br />
I had updated kernel to the latest build using the following way.<br />
<br />
<span style="color: purple;"><i><b><span style="font-size: x-small;">#rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org<br />#rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm<br />#yum --enablerepo=elrepo-kernel install kernel-ml # will install 3.11.latest, stable, mainline </span></b></i></span><br />
<br />
After finishing the installation, change the default boot kernel to newly installed one<br />
<br />
#<i><b><span style="color: orange;">vim /etc/grub.cfg</span></b></i><br />
<br />
Change the following 1 TO 0<br />
<br />
<i><b><span style="color: orange;">default=0</span></b></i><br />
<br />
Reboot the system, now you will have new kernel with 3.18.1-1<br />
<br />
<span style="color: orange;"><i><b>#uname -r</b></i></span><br />
<br />
<i><b><span style="color: orange;">3.18.1-1</span></b></i><br />
<br />
Try to search for RBD Module.<br />
<br />
<i><span style="color: blue;"><b>[root@cinder ~]# lsmod | grep rbd<br />rbd 57971 0<br />libceph 166955 1 rbd<br />[root@cinder ~]#</b></span></i></div>
സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-84035656707400355192012-05-28T11:46:00.001+05:302012-05-28T11:46:23.315+05:30Make Skype Icon Visible in Gnome Desktop Ubuntu 12.04If you are using Ubuntu 12.04 with Gnome - Classic Desktop , you may experience a problem with not displaying SKYPE icon in the system tray. This can be solved in an easy method. You need to install <a href="https://launchpad.net/sni-qt">Status NotifierItem plugin</a>. If you are using 64Bit install of Ubuntu , you need to install i386 version of sni-qt.<br />
<br />
<b><span style="color: #274e13;">sudo apt-get install sni-qt:i386</span></b><br />
<br />
Thats it !!! login to skype and skype icon will be displayed in your system tray.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-tKyQElVNq1w/T8MYJekvUxI/AAAAAAAAAt0/TWL0V4Y014g/s1600/skype_icon_systray.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-tKyQElVNq1w/T8MYJekvUxI/AAAAAAAAAt0/TWL0V4Y014g/s1600/skype_icon_systray.png" /></a></div>
<br />സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com3tag:blogger.com,1999:blog-6587524289582183832.post-80360540126186909052012-05-02T16:06:00.000+05:302012-05-02T16:06:27.965+05:30Reverse SSH Tunneling OR "Poor mans VPN"In corporate networks , the servers will be placed behind a NAT for security reasons. Its not possible to access the server behind the NAT from outside network. And here comes a way to access servers behind NAT through SSH , its called Reverse SSH Tunneling OR Poor Mans VPN.<br />
<br />
Scenario.<br />
<br />
IP Address of the Server you need to access <span class="system">192.168.20.55</span><br />
<span class="system">IP Address of the Client from which you are trying </span>150.57.9.9<br />
<br />
<br />
<b>1. SSH from the destination to the source (with public ip) using command below:</b><br />
<span class="system"><br /></span><br />
<div style="color: red;">
ssh -R 2080:localhost:22 sourceuser@150.57.9.9</div>
<br />
<b>2. Now you can SSH from source to destination through SSH tuneling:
</b><br />
<div class="command">
<br /></div>
<div class="command" style="color: blue;">
ssh localhost -p 19999</div>
<br />
<br />സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com1tag:blogger.com,1999:blog-6587524289582183832.post-61877867320348437682012-05-01T12:14:00.002+05:302012-05-01T12:14:47.134+05:30KVM (Virtualization) Tips<br /><br />KVM Tips.<br /><br /><br />Assumptions<br /><br />1.You should have a working KVM Environment<br />2.You should have knowledge in Linux and little Networking.<br />3.You should have basic level knowledge in Virtualisation<br /><br /><b>1.To Check whether KVM has been installed</b><br /><br />virsh -c qemu:///system list<br /><br />You will see the following...<br /><br />[root@server1 ~]# virsh -c qemu:///system list<br /> Id Name State<br />----------------------------------<br /><br />[root@server1 ~]#<br /><br />Which means your KVM server is up and running.<br /><br /><b>2.To View all the running Guests</b><br /><br />virsh --connect qemu:///system<br /><br />virsh# list -all<br /><br />Id Name State<br />----------------------------------<br /> 3 vm11 running<br /> - vm10 shut off<br /><br />virsh #<br /><br /><b>3.Start a Virtual Machine</b><br />virsh# start vm10<br /><br /><b>4.Stop a Virtual Machine</b><br />virsh# shutdown vm10<br /><br /><b>5.Suspend a Virtual Machine</b><br /><br />virsh# suspend vm10<br /><br /><b>6.Forcefully Shutdown a virtual Machine (ie remove power plug)</b><br /><br />virsh# destroy vm10<br /><br /><b>7.Exit the Virtual shell</b><br />virsh# Exitസമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-49619227262549744452012-05-01T11:52:00.000+05:302012-05-01T11:52:09.995+05:30Static Route in Linux<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">Static Route is using for improving the overall performance of your network. Also you can use static route for implementing Sub Networks. Suppose you are having different branch office to be connected with a Head office who is linked with a T1 line , Static route will be use full.</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">1.To View the routes in your system</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">ip route show</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">route -n</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">2.Adding a route in the Linux Machine.</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">route add default gw 10.10.100.1 eth0</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">This will create a ROUTE in the interface eth0 for a gateway to 10.10.100.1</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">This will be lose once you restart the network. For Adding a static route , you should follow the below steps.</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><code>vi /etc/sysconfig/network-scripts/route-eth0</code></span></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><code>Append the following</code></span></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><code>10.10.1.0/8 via 10.120.194.5</code></span></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<span style="font-family: Verdana,sans-serif; font-size: small;"><code>This will byepass all the traffic to 10.120.194.5 router through eth0 </code></span><code><br /></code>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-44066587002399483962012-04-22T14:11:00.000+05:302012-04-22T14:11:25.114+05:30DTMF Issue With Asterisk - Solution.<div style="font-family: Verdana,sans-serif;">
<a href="http://en.wikipedia.org/wiki/Asterisk_%28PBX%29" target="_blank">Asterisk</a> is nothing but a Software implementation of Private Branch Exchange. Mark Spencer of Digium has wrote this application once he is not able to find a PBX for his company. Now this application is using by lot of people for medium , and large scale enterprises.</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<u><b>ISSUE</b></u></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
The signals from a <a href="http://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling" target="_blank">DTMF</a> system is not recognised by the Asterisk. Specifically key press from Smart phones and Mobile phones who is sending DTMF signals. </div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<u><b>ASSUMPTION</b></u></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
You have a working Asterisk system</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
Add the following line in <b><span style="color: orange;">chan-dahdi.conf</span></b> file</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="color: orange; font-family: Verdana,sans-serif;">
<b>relaxdtmf=yes<br />toneduration=300</b></div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
Save and Exit.</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
Reload the Asterisk.</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
Now you will be able to receive the Signals from DTMF devices.</div>
<br />സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-79720437596222881552012-04-22T13:35:00.002+05:302012-04-22T13:35:49.894+05:30VLAN With Hypervisor - KVM<div dir="ltr" id="internal-source-marker_0.09367186957060136" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline;">IDEA.</span></div>
<div dir="ltr" id="internal-source-marker_0.09367186957060136" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" id="internal-source-marker_0.09367186957060136" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" id="internal-source-marker_0.09367186957060136" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; vertical-align: baseline;">Some times we need a VLAN inside the Linux machine to communicate with outside network. Specifically when we are dealing with Blade Servers. KVM Hypervisor only allows outside traffic through this VLAN only OR Management IP. We are not considering management NIC here. </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline;"></span></div>
<div dir="ltr" id="internal-source-marker_0.09367186957060136" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline;"><br /></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">The
traffic from BladeS erver is allowed to main switch only through this VLAN.
When a packet come from the Blade , the particular port of the switch
will ask challenge to the packet for VLAN information. So we need to
create a separate VLAN inside the Linux machine.</span></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline;">HowTO</span></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.300</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">vi /etc/sysconfig/network-scripts/ifcfg-eth0.300</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Find the Word </span><span style="background-color: transparent; color: red; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DEVICE</span><span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> and change its name to eth0.300 (Normally that should be eth0)</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><span style="color: black;">Add the Line</span><b style="color: black;"> </b> </span><span style="background-color: transparent; color: red; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">VLAN=yes</span></div>
<span style="background-color: transparent; color: red; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Restart the Network /etc/init.d/network restart.</span></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Adding a new VLAN</span></b></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">vconfig add eth0 5</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Assigning an IPAddress to the VLAN</span></b></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ifconfig eth0.5 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 up</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">For Shutting down a VLAN</span></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ifdown eth0.300</span></div>
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">For Remove a VLAN</span></div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br /><div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: blue; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">vconfig rem eth0.300</span></div>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-88651934060283149092011-10-07T14:10:00.000+05:302011-10-07T14:12:00.740+05:30Monitor your changed files in real-time in Linux<p style="font-family: arial;">Everybody knows <i>top</i> or <i>htop</i>. Ever wished there was something similar but to monitor your files instead of CPU usage and processes? Well, there is.<br />Run this:</p> <p><b>watch -d -n 2 ‘df; ls -FlAt;’</b></p> <p style="font-family: arial;">and you’ll get to spy on which files are getting written on your system. Every time a file gets modified it will get highlighted for a second or so. The above command is useful when you grant someone SSH access to your box and wish to know exactly what they’re modifying.</p>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-7914261299854902010-01-19T12:45:00.003+05:302010-01-19T12:55:52.278+05:30Knowing Apache Logs<div style="text-align: justify;">LOG is the main friend of an Apache Administrator. We can see error_log , access_logs under LOG directory in Apache web server. It contain many things. Here I am briefly explaining what all the fields mean in a single line of Apache Log. CLF or Common Log Format is the core of logging in Apache. A module called mod_log_config is responsible for all these logging activities.<br /><br />The CLF log file contains a separate line for each request. A line is composed of several tokens separated by spaces:<br /><br /><span style="font-weight: bold;"><span style="color: rgb(255, 102, 102);">host</span> <span style="color: rgb(255, 0, 0);"> ident</span> <span style="color: rgb(204, 0, 0);">authuser</span> <span style="color: rgb(153, 0, 0);">date</span> <span style="color: rgb(102, 0, 0);">request</span> <span style="color: rgb(255, 153, 102);">status</span> <span style="color: rgb(255, 153, 0);">bytes</span></span><br /><br /><span style="color: rgb(0, 0, 0);"><span style="font-weight: bold;">host</span> : The fully qualified domain name of the client, or its IP address<br /><br /><span style="font-weight: bold;">ident</span> : If the IdentityCheck directive is enabled and the client machine runs<br />identd, then this is the identity information reported by the client<br /><br /><span style="font-weight: bold;">authuser </span> :If the requested URL required a successful Basic HTTP authentication,</span><br /><span style="color: rgb(0, 0, 0);">then the user name is the value of this token.<br /><br /><span style="font-weight: bold;">date</span> : The date and time of the request. The date field can be [day/month/year:hour:minute:second zone]<br /><br /><span style="font-weight: bold;">request</span> : The request line from the client, enclosed in double quotes (“).<br /><br /><span style="font-weight: bold;">status</span> : The three-digit HTTP status code returned to the client.<br /><br /><span style="font-weight: bold;">bytes</span></span> : The number of bytes in the object returned to the client, excluding all<br />HTTP headers.<br /><br /><br /><br /></div>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-9898640666310879212010-01-03T15:38:00.006+05:302010-01-03T15:45:55.247+05:30Multitail - For viewing multiple logs simultaneoulsy<span><br />Tail is a command in unix like systems for viewing log files. We can view only one log at a time , for viewing multiple log files we can use multitail.</span><br /><br /><span style="font-weight: bold;">1.Installation</span><br /><br /><span style="color: rgb(0, 153, 0);">yum install multitail (For Redhat , Centos )</span><br /><br /><span style="color: rgb(0, 153, 0);">apt-get install multitail (Ubuntu ,Debian )</span><br /><br /><span style="font-weight: bold;">2.Usage</span><br /><br /><span style="color: rgb(0, 153, 0);">multitail -f /var/log/httpd/error_log /var/log/httpd/access_log</span><br /><br /><span style="font-weight: bold;">3.Also you can run a command and watch its output</span><br /><br /><span style="color: rgb(0, 153, 0);">multitail -f /var/log/iptable.log "ping server.com"</span><br /><br /><span style="font-weight: bold;">4.You can see 3 files in 2 columns</span><br /><br /><code style="color: rgb(0, 153, 0);">multitail -s 2 /var/log/qmail_pop.log /var/log/qmail_send.log /var/log/spamassassin.log </code><br /><br /><span style="font-weight: bold; font-style: italic;">Enjoy !!!</span>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-76486588029326936102010-01-03T15:14:00.003+05:302010-01-03T15:29:07.718+05:30OpenSSH Security Tips<a href="http://en.wikipedia.org/wiki/OpenSSH">OpenSSH</a> is tool used for connecting and managing remote linux machines. And this should be secured. I am here by telling some security tips to make the SSH server perfect.<br /><br />1.<span style="font-weight: bold;">The following iptable rule will drop incoming connections which make more than 5 connection attempts upon port 22 within 60 seconds</span><br /><br /><span style="color: rgb(0, 153, 0);">iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set</span><br /><span style="color: rgb(0, 153, 0);">iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 5 -j DROP</span><br /><br /><span style="font-weight: bold;">2.Disable Empty Passwords</span><br /><br />Open the file /etc/sshd/sshd_config and<br /><br /><span style="color: rgb(0, 153, 0);">PermitEmptyPasswords no</span><br /><br /><span style="font-weight: bold;">3.TCPWrappers</span><br /><br /><span style="color: rgb(0, 153, 0);">open --> vi /etc/hosts.deny</span><br /><span style="color: rgb(0, 153, 0);">sshd:ALL</span><br /><br />then<br /><br /><span style="color: rgb(0, 102, 0);">open --> vi /etc/hosts.allo</span><br /><br /><span style="color: rgb(0, 102, 0);">sshd:192.168.1.32 192.168.1.21 (Change to your desired IP)</span><br /><br /><span style="font-weight: bold;">4.Change the SSH Port</span><br /><br />The Idea behind this , suppose we change the port 22 to something other say Oracle 1521 , the attackers thinks that this is an Oracle server and will try oracle hacking tools :)<br /><br /><pre class="ini"><span style="color: rgb(0, 153, 0);">Port 300</span><br /><br /><span style="font-weight: bold;">5.Force Logout for Idle Sessions</span><br /><span style="color: rgb(0, 153, 0);">ClientAliveInterval 300</span><br /><span style="color: rgb(0, 153, 0);">ClientAliveCountMax 0</span><br /><br /><br /><span style="font-weight: bold; font-style: italic;">And to be continued .......</span><br /></pre>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-70643664110121420402009-08-17T17:36:00.003+05:302009-08-17T17:39:03.774+05:30Search Google from Linux commandlineNothing to say about google. You can search google for a result even from your linux command line.<br /><br /><span style="font-weight: bold; color: rgb(204, 51, 204);">curl -A Mozilla http://www.google.com/search?q=</span><i style="font-weight: bold; color: rgb(204, 51, 204);">Linux</i><span style="font-weight: bold; color: rgb(204, 51, 204);"> |html2text -width 80</span><br /><br />You need to install CURL and HTML2TEXT in your box.<br /><br />apt-get install curl html2text (Debian / Ubuntu)<br />yum install curl html2text (Fedora / Centos / RHEL)<br /><br />Enjoy ....സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com1tag:blogger.com,1999:blog-6587524289582183832.post-14980747671407294242009-08-17T16:09:00.003+05:302009-08-17T16:12:26.337+05:30Update Twitter from a Linux Shell<div style="text-align: justify;">Everybody knows now about TWITTER. It is a free social networking and micro-blogging service that enables its users to send and read messages known as tweets. Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers. Senders can restrict delivery to those in their circle of friends or, by default, allow open access. Users can send and receive tweets via the Twitter website, Short Message Service (SMS) or external applications. While the service costs nothing to use, accessing it through SMS may incur phone service provider fees.<br />There is a lot of APIs available to update twitter now like TwitterFox (Firefox Addon) TweetDeck. But now how can I update twitter from my Linux terminal ? Here follows the answer. This is simple using CURL.<br /></div><br /><span style="font-weight: bold; color: rgb(204, 51, 204);">curl -u user:password -d status=”Your status message” http://twitter.com/statuses/update.xml</span><br /><br />Wher <span style="color: rgb(204, 51, 204);">user</span> is your twitter username and <span style="color: rgb(204, 51, 204);">password</span> is your twitter password .<br /><br />If curl is not installed do the following<br /><br />apt-get install curl (Debian / Ubuntu)<br />yum install curl (Fedora / RHEL / Centos)<br /><br />So keep in touch with twitter if you are in Datacentre .....സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-70546300460683692472009-06-18T14:36:00.003+05:302009-06-18T14:43:59.038+05:30Apache Error - No space left on device: Couldn't create accept lock or Cannot create SSLMutex<div>Some times you people may face this following error in your Apache Server. The error is as follows while trying to restart.after a configuration changes or something like that</div><div><br /></div><div><span class="Apple-style-span" style="color:#CC0000;">[emerg] (28)No space left on device: Couldn't create accept lock</span></div><div><span class="Apple-style-span" style="color:#CC0000;">OR</span></div><div><span class="Apple-style-span" style="color:#CC0000;">[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed</span></div><div><span class="Apple-style-span" style="color:#CC0000;">OR </span></div><div><span class="Apple-style-span" style="color:#CC0000;">[Wed Dec 07 00:00:09 2005] [error] (28)No space left on device: Cannot create SSLMutex</span></div><div><br /></div><div>This is happened due to someking of memory leaking. Normally people do the following to fix this.</div><div><br /></div><div><span class="Apple-style-span" style="color:#FF6600;">1.Checking the harddisk space usage</span></div><div><span class="Apple-style-span" style="color:#FF6600;">2.To explicetely different Lockfiles using the LockFile-directive</span></div><div><span class="Apple-style-span" style="color:#FF6600;">3.non-default AcceptMutex (flock) which then solved the acceptlock-issue and ended in the rewrite_log_lock-issue.</span></div><div><span class="Apple-style-span" style="color:#FF6600;">4.Reboot</span></div><div><br /></div><div>The fourth option will only work,because this is due to the following reason</div><div>There were myriads of semaphore-arrays left, owned by my apache-user. Removing this semaphores immediately solved the problem</div><div>Do the following as ROOT</div><div><br /></div><div><span class="Apple-style-span" style="color:#006600;">[root@apache.org] ipcs -s | grep apache | perl -e 'while (<stdin>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}' -- (If You Love Perl)</stdin></span></div><div><span class="Apple-style-span" style="color:#006600;"><br /></span></div><div><span class="Apple-style-span" style="color:#006600;">[root@apache.org] ipcs -s | grep apache | awk ' { print $2 } ' | xargs ipcrm sem (If you Love Sh)</span></div><div><span class="Apple-style-span" style="color:#006600;"><br /></span></div><div><span class="Apple-style-span" style="color:#333333;">Have a great Day with Apache !!!</span></div>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-10402980773607757592009-05-23T13:31:00.005+05:302009-05-23T13:36:37.418+05:30Apache Real Time monitoring APACHETOPApache top is another tool for apache real time monitoring. This is just like the TOP command in *nix based systems. Here this can show a lot of informations from the Apache Web Server.<br /><br /><span style="color: rgb(204, 0, 0);">[root@apache.org]mkdir -p /opt/src</span> <span style="color: rgb(204, 0, 0);"><br /><br />[root@apache.org]cd /opt/src</span><br /><br /><span style="color: rgb(204, 0, 0);">[root@apache.org]wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz</span> <span style="color: rgb(204, 0, 0);"><br /><br />[root@apache.org]tar -zxf apachetop-0.12.6.tar.gz</span><br /><br /> <span style="color: rgb(204, 0, 0);">[root@apache.org]cd apachetop-0.12.6</span> <span style="color: rgb(204, 0, 0);"><br /><br />[root@apache.org]./configure --with-logfile=/var/log/httpd/access_log</span><br /><br /><span style="color: rgb(204, 0, 0);">[root@apache.org]make</span> <span style="color: rgb(204, 0, 0);"><br /><br />[root@apache.org]make install</span><br /><br />OK,Lets trigger it....<br /><br /><span style="color: rgb(153, 51, 0);">[root@apache.org] apachetop</span><br /><br />Following Screenshot says it all. This was taken from my local test machine.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_3Lgl7ZQyPyk/ShetrUZNCoI/AAAAAAAAAIg/R_scC5mJ8eY/s1600-h/apachetop_general.jpg"><img style="cursor: pointer; width: 200px; height: 66px;" src="http://4.bp.blogspot.com/_3Lgl7ZQyPyk/ShetrUZNCoI/AAAAAAAAAIg/R_scC5mJ8eY/s200/apachetop_general.jpg" alt="" id="BLOGGER_PHOTO_ID_5338926842991413890" border="0" /></a><br /><br />Try <span style="color: rgb(0, 153, 0);">apachetop --help</span> for more available switchesസമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-49492815467679172652009-05-23T13:07:00.005+05:302009-05-23T13:39:08.973+05:30Apache RealTime Monitoring MOD_STATUS<div style="text-align: justify;">There is number of tools available to monitor apache in realtime. Like Nagios,Cacti etc. But those tools are little difficult to configure for the first time (Experts Please excuse :-) ). Here I would like to introduce couple of simple tools which help the Webserver admin to monitor his Apache webserver in real time through Web and Console.<br /></div><br />Mod_Status<br /><div style="text-align: justify;">Status Module is a builtin module for apache for a default installation. First checkout whether this module is compiled with your Apache.<br /></div><br /><span style="color: rgb(204, 0, 0);">[root@apache.org] cat /etc/httpd/conf/httpd.conf | grep status_module</span><br /><br /><span style="color: rgb(0, 153, 0);">LoadModule status_module modules/mod_status.so</span><br /><br />Make sure this line was not comment out. OK,Lets take the backup of your current configuration file<br /><br /><span style="color: rgb(204, 0, 0);">[root@apache.org]cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_backup</span><br /><br /><span style="color: rgb(204, 0, 0);">[root@apache.org]vim /etc/httpd/conf/httpd.conf</span><br /><br />Goto Last Line and Paste the following<br /><br /><span style="color: rgb(255, 102, 0);"><location></location></span><span style="color: rgb(255, 102, 0);"><location></location></span><span style="color: rgb(255, 102, 0);"><location></span><br /><span style="color: rgb(255, 102, 0);"> SetHandler server-status</span><br /><span style="color: rgb(255, 102, 0);"> Order Deny,Allow</span><br /><span style="color: rgb(255, 102, 0);"> Allow from all</span><br /><span style="color: rgb(255, 102, 0);"><\Location ></span><br /><span style="color: rgb(255, 102, 0);"> </span><br /><br />Search for the Line "<span style="color: rgb(51, 0, 153);">ExtendedStatus</span>". Normally this line is commented out. Uncomment it.<br /><br />Save and Exit<br /><br />Take your browser. <span style="color: rgb(153, 51, 0);">http://your.domain.com/server-status</span><br /><br />Take a look at the values,Its Realtime values from the Apache. To view this page continuously,I mean refreshing automatically<br /><br /><span style="color: rgb(204, 51, 204);">http://your.domain.com/server-status?refresh=N</span><br />(This N is any number).സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0tag:blogger.com,1999:blog-6587524289582183832.post-5362676102440911502009-05-18T13:42:00.005+05:302009-05-18T14:01:29.357+05:30Update notification through email RHEL / CentosAs everybody know,the system should be update. So an administrator should be vigilant on the new updates and patches from the vendor. But how do we know there is a patch available in the remote server. Here a way to get notified when an update is available.<br /><br />#vim /etc/yum/yum-updatesd.conf<code><br /><br /><br /></code><pre class="ini"><span style="color: rgb(0, 0, 102); font-weight: bold;"><span style="">[</span>main<span style="">]</span></span><br /># how often to check for new updates <span style="">(</span>in seconds<span style="">)</span><br /><span style="color: rgb(0, 0, 153);">run_interval </span>=<span style="color: rgb(102, 0, 102);"> <span style="">3600</span></span><br /># how often to allow checking on request <span style="">(</span>in seconds<span style="">)</span><br /><span style="color: rgb(0, 0, 153);">updaterefresh </span>=<span style="color: rgb(102, 0, 102);"> <span style="">600</span></span><br /><br /># how to send notifications <span style="">(</span>valid: dbus, email, syslog<span style="">)</span><br /><span style="color: rgb(0, 0, 153);">emit_via </span>=<span style="color: rgb(102, 0, 102);"> email</span><br /># who to send the email<br /><span style="color: rgb(0, 0, 153);">email_to </span>=<span style="color: rgb(102, 0, 102);"> admin@adminguru.co.nr</span><br /><br /># who send the notifications<br /><span style="color: rgb(0, 0, 153);">email_from </span>=<span style="color: rgb(102, 0, 102);"> updates@backup.server.com</span><br />#<br /># should we listen via dbus to give out update information/check for<br /># new updates<br /><span style="color: rgb(0, 0, 153);">dbus_listener </span>=<span style="color: rgb(102, 0, 102);"> yes</span><br /><br /># automatically install updates<br /><span style="color: rgb(0, 0, 153);">do_update </span>=<span style="color: rgb(102, 0, 102);"> no</span><br /># automatically download updates<br /><span style="color: rgb(0, 0, 153);">do_download </span>=<span style="color: rgb(102, 0, 102);"> no</span><br /># automatically download deps of updates<br /><span style="color: rgb(0, 0, 153);">do_download_deps </span>=<span style="color: rgb(102, 0, 102);"> no<br /><br /><span style="font-family:arial;">Save and Exit</span><br /><br /><span style="font-family:arial;">Restart the Yum updater</span><br /><br /><span style="font-weight: bold;font-family:arial;" >#/etc/init.d/yum-updatesd restart</span><br /><br /><span style="font-family:arial;">You will be notified when an update is available. Sample Email is as follows.</span><br /><br /></span><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >Hi,</span><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >This is the automatic update system on server.backup.com.</span><br /><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >There are 2 package updates available. Please run the system updater.</span><br /><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >Packages available for update:</span><br /><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" > kernel-2.6.18-92.el5</span><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" > kopete </span><br /><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >Thank You,</span><br /><span style="font-style: italic; color: rgb(51, 0, 153);font-family:arial;" >Your Computer</span><br /></pre><br /><code><br /><br /><br /></code>സമാധാനംhttp://www.blogger.com/profile/08749973752947029979noreply@blogger.com0