Friday, July 4, 2014

lvm commands not found

-bash: pvscan: command not found
-bash: lvdisplay: command not found
-bash: vgcreate: command not found
-bash: lvcreate: command not found
-bash: lvscan: command not found
-bash: pvdisplay: command not found
-bash: lvm: command not found

If you are using CentOS or fedora or RHEL and you are getting these errors again and again when you try to run lvm commands. It means lvm is not installed or corrupted on your system. Reinstall lvm again.
yum install lvm2
If it is not able to find lvm2 package and shows
No package lvm2 available.
It means your repositories do not have this package.
Enable appropriate repository like base, remi, rpmforge or epel and install it again.

If you have enabled all available repositories and still it shows "No package available."
Check the file /etc/yum.conf

The lvm2 package should not be there in exclude packages.
Repos do not list exclude packages and do not install them. If it is under exclude attribute, remove it and run install command again.
It should be installed.

Create Case insensitive databases and tables in mysql

Linux is case sensitive system. You can create Test or test or tesT files in same directory.
That's why you can create Test and teST both databases in mysql.
But if you do not want case sensitivity while creating databases and tables in mysql. Here is solution for you.

Add following attribute in the file my.cnf
lower_case_table_names = 1
Restart mysql.
It disables case sensitivity. Now you can not create linuxamination or Linuxamination or LinuXamination all three databases. You can create any one of three. Same rule is applicable for tables.

If you do not want this feature, remove this line or set the attribute 0.

Configure: error: not found. Please provide a path to MagickWand-config or Wand-config program. ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed

/tmp/pear related errors while installing imagick

If you are facing this error in Ubuntu or Debian
sudo apt-get install libmagickwand-dev libmagickcore-dev
If you are facing this error in fedora or CentOS
sudo yum install imagemagick php-magickwand php-pecl-imagick