Tuesday, April 9, 2013

Nginx-php-fpm Installation With Yum on Centos.

Install Nginx with php-FPM
 rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

yum install nginx  php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-xcache php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

vi /etc/nginx/conf.d/domain.conf
server {
   listen 80;
   server_name www.domain domain;
   root /usr/share/nginx/html;
   location / {
       index  index.html index.htm index.php;
   location ~ \.php$ {
       include /etc/nginx/fastcgi_params;
       fastcgi_index index.php;
       fastcgi_param  SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;

/etc/init.d/nginx restart

 /etc/init.d/php-fpm restart

You can check php-fpm if it is running
[root@yo html]# netstat -anltup | grep php-fpm
tcp        0      0    *                   LISTEN      23249/php-fpm

Thursday, April 4, 2013

PV Name unknown device

If you allocate the one volume to one VM and you did created PV after that you did dettach the volume without unmounting the volume.
So here is the procedure how to troubleshoot with it.

[root@localhost ~]#  pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               19.89 GB / not usable 19.49 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              636
  Free PE               0
  Allocated PE          636
  PV UUID               KhAEcp-48eH-a3nz-HFzF-sXPt-4duo-Vl0NAa

  --- Physical volume ---
  PV Name               unknown device
  VG Name               VolGroup00
  PV Size               10.00 GB / not usable 32.00 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              319
  Free PE               319
  Allocated PE          0
  PV UUID               7CeL4J-wKL1-EigZ-YpWc-qufr-Gbwp-UcFOne

[root@localhost ~]# vgreduce --removemissing --force

Now just check following things.. your issue is resolved.
[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               29.84 GB
  PE Size               32.00 MB
  Total PE              955
  Alloc PE / Size       636 / 19.88 GB
  Free  PE / Size       319 / 9.97 GB
  VG UUID               7o4aWW-Euef-k2Ti-n4rt-QTB0-6RZr-4u7Y9w