Linux

Mounting Host Devices/Partitions/Directories In A Container With Bind Mounts

where you need to mount a hard drive, partiiton or directory from the OpenVZ host inside an OpenVZ container explains how you can mount host devices/partitions/directories in an OpenVZ container with bind mounts

1 Preliminary Note

an OpenVZ container with the container ID 101 which is running MySQL. I add a second hard drive to the host and want to put the container’s MySQL directory /var/lib/mysql on the second hard drive

2 Preparing The Host

a new hard drive to the host

fdisk -l

the hard drive is /dev/sdb:

root@server1:~# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00029d5c

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3793    30461952   83  Linux
/dev/sda2            3793        3917      992257    5  Extended
/dev/sda5            3793        3917      992256   82  Linux swap / Solaris

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0×00000000

Continue reading “Mounting Host Devices/Partitions/Directories In A Container With Bind Mounts” »

Be the first to comment - What do you think?  Posted by Aniruddh - August 8, 2012 at 6:27 pm

Categories: Linux   Tags:

Benchmark Your System CPU, File IO, MySQL

Benchmark suite which allows you to quickly get an impression about system performance which is important if you plan to run a database under intensive load.

not issue any guarantee that this will work for you

1 Installing sysbench

Debian/Ubuntu, sysbench can be installed

apt-get install sysbench

a look

man sysbench

2 CPU Benchmark

benchmark your CPU performance

sysbench –test=cpu –cpu-max-prime=20000 run

root@server1:~# sysbench –test=cpu –cpu-max-prime=20000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Continue reading “Benchmark Your System CPU, File IO, MySQL” »

Be the first to comment - What do you think?  Posted by Aniruddh - at 6:22 pm

Categories: Linux, MySQL   Tags:

Configuring An Email Gateway With Scrollout F1 Anti-Spam & DLP

Email gateway installed between Internet and the email server.to protect the email server by filtering incoming messages, via SMTP protocol, from Internet an email gateway may be used as an outgoing gateway in case you want to add some new email features as Secondary a quality improvement for message delivery

Basic Configuration

CONNECT

Set the network connection: IP address, subnet mask, gateway and DNS.

TRAFFIC

mention your domains and the responsible email server for each domain. The servers can have same value in case you are using one email server for multiple domains.

for receiving emails gateway system will become responsible Optionally the gateway for sending outgoing messages DKIM signature and the values that are necessary to be used in your DNS server for each domain. In case that your email servers are using IP addresses different than standard intranet CIDR (10.0.0.0/8, 192.168.0.0/24, 172.16.0.0/12) you must mention the range or IP in CIDR format by clicking “DKIM”

SECURITY

set the aggressiveness by clicking on a number between 1 and 10

COUNTRIES

Set the geographical area in which you have business

COLLECT

two roles of SPAM & LEGIT

Continue reading “Configuring An Email Gateway With Scrollout F1 Anti-Spam & DLP” »

Be the first to comment - What do you think?  Posted by Aniruddh - at 6:17 pm

Categories: Linux, Mail Server   Tags:

Creating Backups & Clones Of Running Virtual Machines (No Downtime) With LVM Snapshots

use LVM volumes for your VirtualBox VMs This lesson shows using LVM snapshots to create backups and clones of running VirtualBox VMs without downtime

1 Preliminary Note

Installed VirtualBox on a headless server use phpvirtualbox as the VirtualBox GUI here. use the original VirtualBox GUI then only it will be perfect.

Running virtual machine named vm10 located on the LVM volume /dev/vg0/vm10.

logged in as root

sudo su

Should run as root user

2 Create A Backup Of A Running VM With LVM Snapshots

create a backup of the running virtual machine vm10 Snapshots can be smaller than the original volume – 512MB

lvcreate -L5G -s -n vm10_snap /dev/vg0/vm10

use dd to read the contents from the snapshot and pipe it to gzip to create a gzipped backup image in the directory

dd if=/dev/vg0/vm10_snap bs=64k | gzip -c > /backup/vm10.img.gz

your backup of vm10 is now located in /backup/vm10.img.gz.

remove the LVM snapshot

Continue reading “Creating Backups & Clones Of Running Virtual Machines (No Downtime) With LVM Snapshots” »

Be the first to comment - What do you think?  Posted by Aniruddh - at 6:09 pm

Categories: Backup, Linux, Storage   Tags:

Install MyUnity On Linux Mint 13

you can install MyUnity, the extended Unity desktop configuration tool, on Linux Mint 13. MyUnity can usually only be used on Ubuntu operating systems, however you can get it to run under Mint as well with a little source-file customization

1 Preliminary Note

MyUnity was originally designed to work only with Ubuntu systems none have occured to me until now though.
you have already installed the Unity desktop. If not, install it by entering the following into a terminal

sudo apt-get install ubuntu-desktop

while installing will be asked which login-manager you would like to use. mdm is the one Mint 12 uses by default, lightdm is the one Ubuntu uses.

2 Downloading MyUnity Source Files

want to modify one of MyUnity’s source files already installed any version of MyUnity you need to uninstall it first.

sudo apt-get remove myunity

change to the Downloads directory

cd ~/Downloads

Log in

su

download the myunity sources and install the tools

wget https://launchpad.net/myunity/trunk/3.0/+download/myunity-3.1.5.tar.gz
tar -zxvf myunity-3.1.5.tar.gz
cd ./myunity-3.1.5/
apt-get install gambas2-dev gambas2-gb-gtk gambas2-gb-form gambas2-gb-gtk-ext build-essential vim-nox

3 Compiling

appropriate source file so that it recognizes our operating system as Ubuntu 12.04

Open Main.module and look for the line Uversion = Right$(Tmp_split[1], 5  replace it with following codes

vi Main.module
[...]
Uversion = "12.04" ’Uversion = Right$(Tmp_split[1], 5)
[...]
ready to compile
make
make install
exit
To run MyUnity
myunity



Be the first to comment - What do you think?  Posted by Aniruddh - at 2:08 am

Categories: Linux   Tags:

How To Upgrade Kubuntu 10.04 (Lucid Lynx) To 10.10 (Maverick Meerkat)

The new Kubuntu 10.10 (Maverick Meerkat) has just been released. This guide shows how you can upgrade your Kubuntu 10.04 desktop installation to Kubuntu 10.10.

1 Upgrade
Go to Applications > System

and open a terminal

In the terminal

sudo su

Then open /etc/update-manager/release-upgrades

vi /etc/update-manager/release-upgrades

and change the line Prompt=lts to Prompt=normal

Close the terminal

Now go to Applications > System > Software Management

KPackageKit opens. In KPackagekit, go to Software Updates. You should find a message there that a distribution upgrade is available

Click on Continue to confirm that you want to do the distribution upgrade

A window with the release notes for 10.10 comes up. Click on Upgrade

The upgrade tool is now being downloaded, and the upgrade is being prepared

Continue reading “How To Upgrade Kubuntu 10.04 (Lucid Lynx) To 10.10 (Maverick Meerkat)” »

Be the first to comment - What do you think?  Posted by Aniruddh - July 10, 2012 at 8:16 pm

Categories: Linux, Ubuntu   Tags:

Install Linux Without Burning An ISO To CD/DVD – Use The ISO Downloaded To Your Hard Drive

describing here a method to install Linux without using a DVD ROM or CD Drive; I have checked it myself. There are many ways to do so you can install Linux by 1) booting from the network; 2) having an ISO image on your hard disk; 3) booting from USB; 4) installing a linux system from scratch by building your own.

I am assuming that Linux is not installed on your system and neither grub or lilo is there. This method is using an OpenSuse 10.2 Image but is same for Fedora or Debian or any other distro. There is one check point in case you used Nero to copy CD or DVD image then it might have been possible that you copied the image and it is file with dot nrg extension in that case you need to get the ISO from NRG.

I have installed by all the above methods but I am describing here the simplest one since there are many new comers who would not be able to understand other methods. Before doing all this make sure:

that you have enabled the option of viewing file extensions in View Options of folder view.
If you use Fedora or any other distribution do not use the NTFS partition to store the image although OpenSuse 10.2 can work from NTFS partition I have done it using NTFS partition only but will not suggest you to do the same.
Most important do not install Linux on the same partition on which you have the ISO from which you are installing everything since it will format that hard disk that holds the image you are using.

There is an image named openSUSE-10.2-GM-DVD-i386.iso which you would have downloaded rename it to suse.iso (not necessary to do so but will make your life simple).

Similarly for any other linux distro you might have an image of fedora or debian etc. rename it to some simple filename. The image is 3.6 GB then download the grub for dos from: http://sourceforge.net/projects/grub4dos

Before someone reads the following lines I want to inform you while you install winzip or winrar by default they are associated with ISO filetype so you may see your downloaded ISO as an icon that says it can be extracted via Winrar; just go and disable this in options tab from Winrar menu; if you want to burn the ISO directly to CS just go to Nero and select burn image to disk and select the ISO; you do not need to make it a bootable CD or DVD.

Extract the downloaded grub4dos using winzip or winrar, you will get a folder name grub – copy it to C drive then create a folder name boot in C drive of your windows partition (C drive is not necessary but makes life simple ). Now copy grldr from grub to C:

boot.ini (even if I have mentioned the README there says it all). Now different distributions of Linux have different kernel names like:

Fedora: vmlinuz and initrd.img

Suse: linux and initrd

Mandriva: vmlinuz and all.rdz

Ubuntu: vmlinuz and initrd.gz

Gentoo: gentoo and gentoo.igz

Knoppix: vmlinuz and initrd.img

Slackware: bzImage and initrd.img

Debian: vmlinuz and initrd.gz

Continue reading “Install Linux Without Burning An ISO To CD/DVD – Use The ISO Downloaded To Your Hard Drive” »

Be the first to comment - What do you think?  Posted by Aniruddh - December 17, 2011 at 2:52 pm

Categories: Linux   Tags:

How To Change The Date And Time From The Console

This short tutorial explains how you can modify your system date and time from the console.

To change the date on Linux from the console type.

date -d mm/dd/yy

or

date --date=mm/dd/yy

where mm=month, dd=day and yy=year

To change the time on Linux from the console type:

Continue reading “How To Change The Date And Time From The Console” »

Be the first to comment - What do you think?  Posted by Aniruddh - December 16, 2011 at 11:53 am

Categories: Linux   Tags:

Installing Linux Integration Services v2.1 Hyper-V R2 On CentOS 5

When installed on a virtual machine that is running a supported Linux operating system, Linux Integration Services for Hyper-V provides the following functionality:

Driver support for synthetic devices: Linux Integration Services supports the synthetic network controller and the synthetic storage controller that were developed specifically for Hyper-V.
Fastpath Boot Support for Hyper-V: Boot devices now take advantage of the block Virtualization Service Client (VSC) to provide enhanced performance.
Timesync: The clock inside the virtual machine will remain synchronized with the clock on the host.
Integrated Shutdown: Virtual machines running Linux can be shut down from either Hyper-V Manager or System Center Virtual Machine Manager, using the “Shut Down” command.
Symmetric Multi-Processing (SMP) Support: Supported Linux distributions can use up to 4 virtual processors (VP) per virtual machine.

1. Download Linux Integration Components v2.1

a. Download Linux Integration Components v2.1 from Microsoft Download site.

b. Extract the .exe file into a temp folder. You will need only LinuxIC v21.iso file.

c. Place the LinuxIC v21.iso file into your VM host server where you can mount the ISO as a CDROM for your Centon Virtual Machine.

2. Installation

You will need Development Tools installed to be able to compile the Integration Components. You could do that by running yum

yum groupinstall "Development Tools"

As the root user, mount the CD in the virtual machine by issuing the following commands at a shell prompt

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

Copy Linux Integration Services to the virtual machine and unmount CDROM that no longer needed

mkdir /opt/linux_ic_v21_rtm
cp –R /mnt/cdrom/* /opt/linux_ic_v21_rtm
umount /mnt/cdrom

Continue reading “Installing Linux Integration Services v2.1 Hyper-V R2 On CentOS 5” »

Be the first to comment - What do you think?  Posted by Aniruddh - December 12, 2011 at 7:05 am

Categories: CentOS, Linux   Tags:

How To Monitor Your Linux Server With SMS Alerts And Performance Graphs

you can monitor your Linux server with a tool from Bijk – with email and SMS alerts. Bijk is an open source application, for creating live graphs and alerts, thus monitoring your server performance. With the Basic version of Bijk, you can easily set up email alerts for monitoring almost everything on your server (system overload, disk space usage, Apache troubles, MySQL, etc.).

To install Bijk on your Linux server, go to the page http://www.bijk.com, sign up, download and add it to your server in a few easy steps.

You can try theOnline Demo first.

Bijk is ready for Debian, Ubuntu, CentOS and RedHat and you need only about three minutes to install Bijk on a server.

Creating alerts about the status of your server could not be easier

1) Go to the alerts set-up page and find the function you want to monitor.

2) Choose the email or SMS where you want to receive the alert.

3) Bijk automatically chooses the critical range to monitor so you only change this if you wish

Continue reading “How To Monitor Your Linux Server With SMS Alerts And Performance Graphs” »

Be the first to comment - What do you think?  Posted by Aniruddh - December 6, 2011 at 8:12 pm

Categories: Linux   Tags:

Next Page »