Latest Publications

Install and Configure MRTG Graphs Linux / Network Graphs / Open Source

Hi All,

Article Submitted by Mr. Vishal Girish Joshi. I want to Thank him for his contribution for All Linux User’s Blog.

Ever wondered how you can easily graph your traffic load on network links through a simple grapher called MRTG.

Follow the below steps to configure mrtg to monitor your network usage and for misc troubleshooting in adverse times.

MRTG Graph

MRTG Graph

1) We just need a mrtg source / rpm file into our machine.

# yum install mrtg

2) Ensure snmp is enabled on the devices/servers we want to monitor

3) Create a directory of your wish in your www root folder (generally, /var/www/html)

In my scenario, i am monitoring my router/switches, so we need to enable snmp in that too. Also make sure that you have set the same community name (generally, `public`) on both sides.

After installing mrtg, we need to create configuration files using an in-built utility. So for that, go to your directory, created previously, and run the below commands.

# cfgmaker –global ’WorkDir: /var/www/html/Cisco-MRTG’ public@1.1.1.1 > mrtg.cfg ( You can give any name to the config file)

This will create the cfg file, have a look into it. this file will have the mrtg configuration pulled from the respective remote end (via snmp).

4) After this, we need to create the index files using the utility, indexmaker, this will display the output of mrtg.cfg file in the html format.

# indexmaker mrtg.cfg > index.html ( Be sure you are in your respective newly created directory )

5) Now, sometimes you can directly run the mrtg command to start the mrtg. But sometimes, it fails. So here is the workaround.

# env LANG=C /usr/bin/mrtg /var/www/html/Cisco-MRTG/mrtg.cfg (This will build up your first mrtg graphs and webpage)

If still errors, then run the above command for 2-3 times. Error will be gone automatically.

6) Also put the below code into your crontab

*/5 * * * * env LANG=C /usr/bin/mrtg /var/www/html/Cisco-MRTG/mrtg.cfg

7) Open the browser and type-in your url

For eg: 1.1.1.1/mrtg

If you are not able to access the url, go to /etc/httpd/conf.d/mrtg.conf. Here you can set different directives of apache, like,
Alias, Location, Authentication, etc according to your needs.

I generally prefer as setting Alias directive as ` Alias /mrtg /var/www/html/Cisco-MRTG ` and then allow the ip addresses you want to allow to view the mrtg graphs. You can also set the authentication parameters as per your requirement over htaccess, ldap, etc.

Hope this guide successfully helps you to set up mrtg for your organization.

Have a nice day and enjoy Linux.

Thanks to Mr. Vishal Joshi for the article.

You can also Submit Article by Visiting http://www.tejasbarot.com/submit-an-article/

Hope this will helps you all, If you face any issue regarding the same or its not working for you some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy MRTG :) Enjoy Network Graphing :) Enjoy Linux :) Enjoy Open Source :)

Content Protection by DMCA.com

Skype Released: Install Skype 4.2.0.11 on Debian / Ubuntu / Fedora / Linux

Hello,

Skype 4.2.0.11 is now released Finally for Linux, So Today Sharing HowTo to Install Skype 4.2 on Linux / Debian / Ubuntu / Fedora.

Skype 4.2 released for 32-Bit Versions But You can try following HowTos for 64-Bit to it might work, I have only tried on 32-Bit Systems and it worked. Let me know wit your Feedback that it is working for 64-Bits or Not.

Skype New Version is Released with Minor Improvements and Bug Fixes.

Skype 4.2

Skype 4.2

Perform Following Steps to Install Skype on Debian / Ubuntu :-

Step 1:- Remove the Skype if you previously installed with Ubuntu Repository :-

tejas-barot@linux-support-ahmedabad:~$ sudo apt-get remove skype skype-bin

Step 2:- Download the Skype for Your Distribution from Below Link :-

http://www.skype.com/en/download-skype/skype-for-linux/

Step 3 :- To Install Skype Execute Following command :-

tejas-barot@linux-support-ahmedabad:~$ sudo dpkg -i skype*.deb

Step 4 :- Once it is done, It is possible that you won’t find Skype Indicator / Icon So Solve the same, Install Following Packages :-

tejas-barot@linux-support-ahmedabad:~$ sudo apt-get install sni-qt sni-qt:i386

Step 5 :- If you are Facing Audio Issues, Install Following Package :-

tejas-barot@linux-support-ahmedabad:~$ sudo apt-get install libsound2-plugins:i386

Perform Following to Install Skype on Fedora :-

Step 1 :- Download Skype for Fedora from Below Link :-

http://www.skype.com/en/download-skype/skype-for-linux/

Or To Download from Command Linke

[root@tejas-barot-linux-support-ahmedabad ~] # wget http://download.skype.com/linux/skype-4.2.0.11-fedora.i586.rpm

Step 2:- Install Dependencies for Skype :-

[root@tejas-barot-linux-support-ahmedabad ~] # yum install pulseaudio-libs.i686 qt.i686 qt-x11.i686 libXv.i686 pulseaudio-libs-glib2.i686 alsa-plugins-pulseaudio.i686 libXScrnSaver.i686 qtwebkit.i686 alsa-lib.i686

Step 3 :- Install the Downloaded RPM by Executing Following command :-

[root@tejas-barot-linux-support-ahmedabad ~] # rpm -ivh skype-4.2.0.11-fedora.i586.rpm

That’s It 

Hope this will helps you all, If you face any issue regarding the same or its not working for you some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy Skype 4.2.0.11 :) Enjoy Linux :) Enjoy Open Source :)

 

Content Protection by DMCA.com

Download Mageia 3 Final Release / CD / DVD / ISO / Linux / 32-Bit / 64-Bit

Dear All,

Very Happy to share a Links of One Another Distribution in Linux and It is Mageia Linux. Mageia is RPM Based Distribution.

At Last I have Mentioned a Link to Download Mageia 3 Linux for 32-Bit ( i386,i686 ) and X86_64 ( 64-Bit ) Architecture.

Mageia 3 - Linux

Mageia 3 – Linux

Major Features in Mageia 3 :-

Updates to RPM (4.11) and urpmi, which has been given a good Mageia turnout and cleanup
Kernel 3.8
systemd 195
GRUB is the default bootloader; GRUB2 is available to test.
Revamped package groupings for installation and rpmdrake
KDE 4.10.2
GNOME 3.6.
Xfce 4.10
Libreoffice 4.0.3

To Download Version of your Choice Go to this Link :- https://www.mageia.org/en/downloads/

You can Read Release Notes here for Mageia 3 :- https://wiki.mageia.org/en/Mageia_3_Release_Notes

Hope this will helps you all, If you face any issue regarding the same or its not working for you some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy Mageia 3 :) Enjoy Linux :) Enjoy Open Source :)

Content Protection by DMCA.com

Send SMTP email from Command Line Linux / SSMTP / GMAIL

Dear All,

It is not possible that on every Single System there is mail server available.

There is no mail server configured on your System and You want to send e-mail using SMTP Authentication then you can send mail by ssmtp utility.

You can use the Same Method for RHEL / CentOS / Fedora / Ubuntu.

So In this Article, I will show you that How can can send e-mail using Gmail Authentication using SMTP.

SMTP Mail

SMTP Mail

In this Article, We will use utility called SSMTP.

SSMTP RPM / DEB / Package Must be installed to Use this utility.

To Perform this HowTo :-

Step 1. You have to be root to Install and Perform this Howto.

Step 2. Open the ssmtp.conf in /etc/ssmtp/ssmtp.conf and Add the Following lines as per your requirement.

[root@linux-support-tejas-barot-ahmedabad ~]# vim /etc/ssmtp/ssmtp.conf 

Add the Following Configurations to /etc/ssmtp/ssmtp.conf and SAVE and EXIT 

root=smtpauth@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=smtpauth@gmail.com
AuthPass=P@ssw0rd
UseSTARTTLS=yes

Step 3. Now Let’s say Now You want to send a Particular message. Like :-

Subject will be “Check the Server Health” and Body will be your “Cannot Access Server“.

So For the same Create a File called /root/message.txt and Add Following content to file :-

[root@linux-support-tejas-barot-ahmedabad ~]# vim /root/message.txt
Subject: Check the Server Health
Cannot Access Server

Step 4. Now to Send an e-mail Execute Following command :-

Syntax is ssmtp -vvvv recipientmail@domain.com < <message-file>

[root@linux-support-tejas-barot-ahmedabad ~]# ssmtp -vvvv recipient@domain.com < message.txt

That’s IT

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy SMTP :) Enjoy SSMTP :) Enjoy Open Source :) 

Content Protection by DMCA.com

Changing LDAP User’s Password Web-Based / 389-ds / Redhat-ds / Fedora-DS / LDAP

Hello,

This article will show you how to change password of LDAP Users.

In This Article, I have demonstrated that How to change your Password for those users which are in 389-ds or Redhat-ds.

This is very simple you just need to change few parameters and You will able to change password of Ldap users from 389-ds.

Note :- If you have not Customized LDAP Attributes or Access Rights for Changing Password then it will work, I have Successfully tested the same on RHEL / CentOS 5.x / CentOS 6.x / RHEL 6.x and 389-ds.

Perform Following steps for the same.

Step 1:- Make Sure your LDAP Configured and You have correct Suffix ( i.e dc=tejasbarot,dc=com )

Step 2 :- Make Sure php-ldap Package is installed.

[root@tejas-barot-linux-support-ahmedabad ~]# yum install php-ldap

Step 3 :- Download the Following PHP Script, Thanks to the Original Script I have Modified Suffix for Understanding Purpose.

[root@tejas-barot-linux-support-ahmedabad ~]# wget -c http://www.tejasbarot.com/Scripts/ldap_pass_change.phps

Steps 4:- Now Rename the Script from ldap_pass_change.phps to ldap_pass_change.php

Step 5 :- Now Modify the Suffix in .php file, Open PHP File and Modify 3rd Line which Contains $dn

Change $dn 
from 
$dn = "dc=tejasbarot,dc=com"
TO
$dn = "dc=your,dc=suffix"
Save and Exit from File

Step 6:- Put this Script to your WebRoot Directory (i.e. /var/www/html/ )

Step 7:- Make Sure That PHP Script is executable by your Webserver through URL (i.e. http://ldap.tejasbarot.com or http://localhost/ldap_pass_change.php or http://192.168.1.10/ldap_pass_change.php )

You will able to see Following Screen :-

LDAP Change Password

LDAP Change Password

 

Step 6:- Now Put Values Like Below Screen Shot :-

 

Fill the Text Boxes

Fill the Text Boxes

 

Step 7 :- Once Password get changed, You will get a Notifications like below :-

 

Successful Password Change

Successful Password Change

 

Thanks to Original Script :- http://www.warden.pl/docs/pass.phps

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy LDAP :) Enjoy Changing Passwords :) Enjoy Linux :) Enjoy Open Source

 

Content Protection by DMCA.com

Virtualization With KVM On A CentOS 6.4 Server

Dear,

This guide explains how you can install and use KVM for creating and running virtual machines on a CentOS 6.4 server. I will show how to create image-based virtual machines and also virtual machines that use a logical volume (LVM). KVM is short for Kernel-based Virtual Machine and makes use of hardware virtualization, i.e., you need a CPU that supports hardware virtualization, e.g. Intel VT or AMD-V.

I do not issue any guarantee that this will work for you!

Virtualization

Virtualization

1 Preliminary Note

I’m using a CentOS 6.4 server with the hostname server1.example.com and the IP address 192.168.0.100 here as my KVM host.

I had SELinux disabled on my CentOS 6.4 system. I didn’t test with SELinux on; it might work, but if not, you better switch off SELinux as well:

vi /etc/selinux/config

Set SELINUX=disabled…

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

… and reboot:

reboot

We also need a desktop system where we install virt-manager so that we can connect to the graphical console of the virtual machines that we install. I’m using a Fedora 17 desktop here.

 

2 Installing KVM

CentOS 6.4 KVM Host:

First check if your CPU supports hardware virtualization – if this is the case, the command

egrep ‘(vmx|svm)’ –color=always /proc/cpuinfo

should display something, e.g. like this:

[root@server1 ~]# egrep ‘(vmx|svm)’ –color=always /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall
nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy misalignsse
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall
nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy misalignsse
[root@server1 ~]#

If nothing is displayed, then your processor doesn’t support hardware virtualization, and you must stop here.

Now we import the GPG keys for software packages:

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

To install KVM and virtinst (a tool to create virtual machines), we run

yum install kvm libvirt python-virtinst qemu-kvm

Then start the libvirt daemon:

/etc/init.d/libvirtd start

To check if KVM has successfully been installed, run

virsh -c qemu:///system list

It should display something like this:

[root@server1 ~]# virsh -c qemu:///system list
Id Name                 State
———————————-

[root@server1 ~]#

If it displays an error instead, then something went wrong.

Next we need to set up a network bridge on our server so that our virtual machines can be accessed from other hosts as if they were physical systems in the network.

To do this, we install the package bridge-utils…

yum install bridge-utils

… and configure a bridge. Create the file /etc/sysconfig/network-scripts/ifcfg-br0 (please use the IPADDR, PREFIX, GATEWAY, DNS1 and DNS2 values from the /etc/sysconfig/network-scripts/ifcfg-eth0 file); make sure you use TYPE=Bridge, not TYPE=Ethernet:

vi /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE="br0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=192.168.0.100
PREFIX=24
GATEWAY=192.168.0.1
DNS1=8.8.8.8
DNS2=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System br0"

Modify /etc/sysconfig/network-scripts/ifcfg-eth0 as follows (comment out BOOTPROTO, IPADDR, PREFIX, GATEWAY, DNS1, and DNS2 and add BRIDGE=br0):

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
#BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
UUID="73cb0b12-1f42-49b0-ad69-731e888276ff"
HWADDR=00:1E:90:F3:F0:02
#IPADDR=192.168.0.100
#PREFIX=24
#GATEWAY=192.168.0.1
#DNS1=8.8.8.8
#DNS2=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
BRIDGE=br0

Restart the network…

/etc/init.d/network restart

… and run

ifconfig

It should now show the network bridge (br0):

[root@server1 ~]# ifconfig
br0       Link encap:Ethernet  HWaddr 00:1E:90:F3:F0:02
inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
inet6 addr: fe80::21e:90ff:fef3:f002/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:460 (460.0 b)  TX bytes:2298 (2.2 KiB)

eth0      Link encap:Ethernet  HWaddr 00:1E:90:F3:F0:02
inet6 addr: fe80::21e:90ff:fef3:f002/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:18455 errors:0 dropped:0 overruns:0 frame:0
TX packets:11861 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26163057 (24.9 MiB)  TX bytes:1100370 (1.0 MiB)
Interrupt:25 Base address:0xe000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2456 (2.3 KiB)  TX bytes:2456 (2.3 KiB)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:AC:AC:8F
inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@server1 ~]#

 

3 Installing virt-viewer Or virt-manager On Your Fedora 17 Desktop

Fedora 17 Desktop:

We need a means of connecting to the graphical console of our guests – we can use virt-manager for this. I’m assuming that you’re using a Fedora 17 desktop.

Become root…

su

… and run…

yum install virt-manager libvirt qemu-system-x86 openssh-askpass

… to install virt-manager.

(If you’re using an Ubuntu 12.04 desktop, you can install virt-manager as follows:

sudo apt-get install virt-manager

)

 

4 Creating A Debian Squeeze Guest (Image-Based) From The Command Line

CentOs 6.4 KVM Host:

Now let’s go back to our CentOS 6.4 KVM host.

Take a look at

man virt-install

to learn how to use virt-install.

We will create our image-based virtual machines in the directory /var/lib/libvirt/images/ which was created automatically when we installed KVM in chapter two.

To create a Debian Squeeze guest (in bridging mode) with the name vm10, 512MB of RAM, two virtual CPUs, and the disk image /var/lib/libvirt/images/vm10.img (with a size of 12GB), insert the Debian Squeeze Netinstall CD into the CD drive and run

virt-install –connect qemu:///system -n vm10 -r 512 –vcpus=2 –disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/cdrom –vnc –noautoconsole –os-type linux –os-variant debiansqueeze –accelerate –network=bridge:br0 –hvm

Of course, you can also create an ISO image of the Debian Squeeze Netinstall CD (please create it in the /var/lib/libvirt/images/ directory because later on I will show how to create virtual machines through virt-manager from your Fedora desktop, and virt-manager will look for ISO images in the /var/lib/libvirt/images/ directory)…

dd if=/dev/cdrom of=/var/lib/libvirt/images/debian-6.0.5-amd64-netinst.iso

… and use the ISO image in the virt-install command:

virt-install –connect qemu:///system -n vm10 -r 512 –vcpus=2 –disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.5-amd64-netinst.iso –vnc –noautoconsole –os-type linux –os-variant debiansqueeze –accelerate –network=bridge:br0 –hvm

The output is as follows:

[root@server1 ~]# virt-install –connect qemu:///system -n vm10 -r 512 –vcpus=2 –disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.5-amd64-netinst.iso –vnc –noautoconsole –os-type linux –os-variant debiansqueeze –accelerate –network=bridge:br0 –hvm

Starting install…
Allocating ‘vm10.img’              |  12 GB     00:00
Creating domain…                 |    0 B     00:00
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[root@server1 ~]#

Click on Link for Page 2 :- http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.4-server-p2

Click on Link for Page 3 :- http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.4-server-p3

Click on Link for Page 4 :- http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.4-server-p4

Click on Link for Page 5 :- http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.4-server-p5

Original Link :- http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.4-server

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy Virtualization on Linux :) Enjoy Linux :) Enjoy Linux Open Source :)
Content Protection by DMCA.com

Howto: Configure Linux Warnquota for Fedora / Ubuntu / RHEL / CentOS

Hello,

In Linux, Most of the People Implement User Quota and Group Quota on Linux and The Might want to send e-mail warnings to the User by e-mail.

It Becomes very Important when the Mail Server is Running and You have implemented Disk Quota / User Quota / Group Quota for Users, So Its the First Basic requirement that We have to inform Users on Their Quota Usage at the Limit which we have configured.

So I am writing this article for Those Who have implemented a Quota and Do not know How to configure quota warning by e-mail.

quota

 

 

1. quota / quota-warnquota package must be Installed.

To Confirm :-

On RHEL / CentOS :- [root@tejas-barot-linux-support ~]# rpm -qa | grep quota # Output should not be empty

On Ubuntu :- root@tejas-barot-linux-support:~# dpkg –list | grep quota # Output should not be empty

2. Partition / Device must be mounted with usrquota

On RHEL / CentOS / Ubuntu :- [root@tejas-barot-linux-support ~]#mount | grep quota # Output should not be empty

3. Quota Must be Enabled on Partition.

4. If Above command is giving you proper output then you are good to go for Further Configuration.

5. Now Open /etc/warnquota.conf and Modify Following values as per your requirement.

Enjoy Disk Quotas :) Enjoy WarnQuota :) Enjoy Linux :) Enjoy Open Source :)

   MAIL_CMD        = "/usr/sbin/sendmail -t"
   FROM            = "linuxsupport@tejasbarot.com"
   SUBJECT         = NOTE: Your mailbox has exceeded allocatted disk space limits
   CC_TO           = "ahmedabad@tejasbarot.com"
   SUPPORT         = "linuxblog@tejasbarot.com"
   PHONE           = "000 111-2222"
   MESSAGE         = Your mailbox has exceeded the allotted limit\
    on this server|Please delete any unnecessary email in your mailbox on:|
   SIGNATURE       = This message is automatically generated by the mail system.

Once you are done with Configuring this Parameters Save and Exit from File

Description of above Configurations :-

MAIL_CMD = Command which used to send an e-mail.

FROM = Which E-Mail ID it will display to Recipient.

SUBJECT = Subject line which you want to Mention for Warning e-mail.

CC_TO = On Which ID it will Send Carbon Copy of the Mail.

SUPPORT =  Email ID which you have to mentioned as Support or anybody else where it should inform too.

PHONE = Of-course It will be a Number which you want to display as your Contact Number.

MESSAGE = Detailed Message OR Instructions Which you want to Send to the User. In Short, Body of the Mail.

SIGNATURE = Text which you have to set as your Signature.

6. Once It is configured properly, then To Send E-mail to all those users who exceeded quota then Execute Following command :-

Execute Command To Send E-Mail to All Those Users / Groups who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota

Execute Command To Send E-Mail to Particular User who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota -u <user-name>

Execute Command To Send E-Mail to Particular Group who exceeded quota or Grace Limit :-

[root@tejas-barot-linux-support ~]# warnquota -g <user-name>

7. That’s IT. Warning for Quota is configured.

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy Disk Quotas :) Enjoy WarnQuota :) Enjoy Linux :) Enjoy Open Source :)

Content Protection by DMCA.com

Create your own high-performance NAS using GlusterFS

GlusterFS is used in environments where high performance, redundancy and reliability are of a premium. The best part is that it’s exceedingly easy to use

GlusterFS is a file system that is designed to provide network storage that can be made redundant, fault-tolerant and scalable. It’s particularly well suited to applications that require high-performance access to large files. With GlusterFS, you can have enterprise- or scientific-research-grade storage up and running in minutes, but it wouldn’t be our first choice for the type of simple file sharing that Samba or NFS are usually used for.

Although GlusterFS can do striping (chopping the files into parts), it isn’t the preferred approach. Typically, additional storage nodes, or ‘bricks’ as they are called, are used for either replicated (redundant) data or
for distributed storage that adds capacity and improves performance.

GlusterFS expects the clients to be running the FUSE (user-space) file system driver, but since version 3.x, GlusterFS automatically enables NFS access to the volumes. The built- in NFS server offers better performance when accessing lots of small files for applications such as web serving or a remote /home directory. Bear in mind, getting GlusterFS’s NFS working alongside existing NFS shares is outside the scope of this tutorial. The most amazing thing about GlusterFS is that it’s very simple to use and maintain, as we intend to show you here.

NAS
This tutorial will work with any of the major distributions

Resources

Multiple Linux boxes
A network
GlusterFS

Step by Step

Step 01

Set up the network

GlusterFS is at its best when connected to Gigabit Ethernet and a large array of servers and storage devices. However, a combination of two computers or even two VMs are sufficient when learning how to use GlusterFS.

Step 02

Become root

Become root by typing:

sudo -i

…on Ubuntu and derivatives. This saves having to type ‘sudo’ before every command. Use the ‘su’ command on other distros. Consider opening a terminal on another tab, for example, to carry out actions as a standard user.

Step 03

Install server

Compare version numbers between your distro and the website. If you manually install a newer server, you might have to update the clients as well. If your distro is offering a recent enough version, you can install by typing:

apt-get install glusterfs-server

Step 04

Switch to static IP

Open /etc/network/interfaces in a text editor. If present, remove the line:

iface eth0 inet dynamic

Add the lines

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
network 192.168.0.0

adjusting the details for your network. Restart the machine and test the network.

Step 05

Adding and removing volumes

Use the following command:

gluster volume create testvol 192.168.0.100:/data

This creates a volume called ‘testvol’ that is stored on the server at 192.168.0.100. The files are located in a directory called /data in the root file system of the server, and this is what GlusterFS refers to as a brick. Then, type:

gluster volume start testvol

Type

gluster volume info

to verify that it works. You can remove this volume, later on, by typing:

gluster volume stop testvol

and then

gluster volume delete testvol

Step 06

Mount the volume locally

We’ll now mount the volume, locally, from the server itself. Create a mount point using:

mkdir /mnt/gluster

Use the command:

mount.glusterfs 192.168.0.100:/ testvol /mnt/glusterfs

to mount it. Type:

echo “It works” > /mnt/gluster/test. txt

…then browse to the mount point to check it works.

Step 07

Mount the volume remotely

On a client machine, install the GlusterFS client packages (sudo apt-get install glusterfs-client on Ubuntu). Create a mount point and mount the GlusterFS volume with:

mkdir /mnt/gluster

and then

sudo mount.glusterfs 192.168.0.100:/testvol /mnt/gluster

Step 08

Mount on startup

Make the mount permanent on any client machine by adding it to /etc/fstab.

As root, open /etc/fstab in a text editor, and add the line:

192.168.0.100:/testvol /mnt/gluster glusterfs defaults,_netdev 0 0

Step 09

Share over NFS

Recent versions of GlusterFS automatically enable NFS access to volumes. To make it work, you need to add the portmap package to the server. Then, you can mount the volume using NFS by adding a mount point:

sudo mkdir /mnt/nfsgluster

and then typing

sudo mount -t nfs 192.168.0.100:/ testvol /mnt/nfstest/ -o tcp,vers=3

To make a client mount the share on boot, add the details of the GlusterFS NFS share to /etc/fstab in the normal way. For our example, add the line:

192.168.0.100:7997:/testvol / mnt/nfstest nfs defaults,_netdev 0 0

Step 10

Add second server

Begin by setting up a new server, as shown in the earlier steps. Give the new server an IP address such as 192.168.0.101. Note that you can run these commands on any GlusterFS server. Type:

gluster peer probe 192.168.0.101

and then type

gluster peer status

to check the status of the new server.

Step 11

Edit hosts file

Admin can be carried out from any Gluster server, so add the servers to the hosts file of your admin machine if you prefer to work with names rather than IP addresses. For example, edit /etc/hosts with a text editor, and add a line such as 192.168.0.100 server1 for each server.

Step 12

Add storage volume (distributed)

Add a distributed volume to the system by typing:

gluster volume create test-volume 192.168.0.100:/storage1 192.168.0.101:/storage2

Note that on a setup like this, a single server becoming damaged or unavailable is going to lead to a major loss of files.

Step 13

Add storage volume (duplicated)

To create a duplicated volume, for redundancy, type:

gluster volume create test-volume replica 2 192.168.0.100:/storage1 192.168.0.101:/storage2

To create a volume that is both duplicated and distributed, type:

gluster volume create test-volume replica 2 192.168.0.100:/ storage1 192.168.0.101:/ storage2 192.168.0.100:/storage3 192.168.0.101:/storage4

The order in which the servers are specified ensures that each contains a brick and a copy of the other brick, an arrangement that maintains redundancy if either server fails or becomes unavailable.

Step 14

Authorise clients

By default, any client can connect to a GlusterFS server. However, you can limit access using the command:

gluster volume set testvol auth. allow [list of addresses]

Note that this command supports the use of wildcards to authorise a range. You might find it more convenient to locate the configuration file for the volume in /etc/glusterd/vols/[name of volume]/. Open the file up in a text editor and scroll down to ‘option auth.addr./data.allow’. Replace the asterisk with a list or range of authorised client IP addresses.

Step 15

Adding and removing bricks

You can add extra bricks on the fly, but they must be in multiples of the existing storage. For example, if you have a duplicated storage volume, you must add two bricks to expand it. Use:

gluster volume add-brick testvol 192.168.0.100:/media/storage/extra

…to add an extra brick. New bricks are empty when they are first added, so they need to be rebalanced with this command:

gluster volume rebalance testvol start

You can remove bricks with a command like this:

gluster volume remove-brick testvol 192.168.0.100:/storage4

Note that the information stored on the brick will become inaccessible, but the data is not deleted.

Step 16

Examine the log directory

By default, GlusterFS stores its logs under /var/log/ and they are comprehensive. You can change the log directory for a volume with the command:

gluster volume log [directory]

…and you can locate the logs associated with a volume using:

gluster volume log locate [name of log]

Step 17

Add striped volumes

Striping, chopping files up and distributing them is possible but not the preferred option. If you have a use case that will benefit from this approach, use the following command:

gluster volume create striped-volume stripe 2 192.168.0.100:/storage1 192.168.0.101:/storage2

Step 18

Preparing a storage drive

You may like to prepare a blank storage drive for GlusterFS bricks. Ext4 and ext3 are supported along with XFS. Which one you choose depends on your requirements and your experience with each, but the consensus is that the advantages of XFS only start to come to the fore under huge loads and enormous storage spaces.

Step 19

Examine the storage

The easiest way to check on your mounted storage is with the df -h command. gluster volume info lists all mounted and active volumes and the bricks that they are composed of. You can examine the bricks and their contents by browsing the directories normally.

Original Link :- http://www.linuxuser.co.uk/tutorials/create-your-own-high-performance-nas-using-glusterfs

 

Hope this will helps you all, If you face any issue regarding the same or its not working for your some how then please raise your questions / issues at http://linuxforums.tejasbarot.com

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Ask for Linux Commercial Support :- http://www.tejasbarot.com/linux-commercial-support/

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Please Keep in Touch with Social Networking :- 

Facebook :- https://www.facebook.com/tejasbarot.official

Facebook Page :- https://www.facebook.com/AllLinuxUsersBlog

Twitter :- https://www.twitter.com/imtejasbarot

LinkedIn :- http://in.linkedin.com/in/imtejasbarot

Enjoy GlusterFS :) Enjoy Linux :) Enjoy Open Source :)

Content Protection by DMCA.com