Friday, 20 September 2013

How to Reset "root" Password Using Single User Mode in Ubuntu

While your system booting hold the Shift Key. You will get the GRUB screen like below


Select the first Grub entry and press e to edit the the Grub entry that splash screen like below



Find and change the line 

linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx ro  quiet splash to linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx rw init=/bin/bash


After changed above line Press crtl+x or F10 to boot. Now you logged in without password



Now you can able to reset the root password using following command



Enjoy....

Monday, 2 September 2013

How to install php-pecl-solr on Centos

You can download php-pecl-solr from this link https://github.com/ecaron/php-pecl-solr and Extract that file.

           [root@manivel ]# unzip php-pecl-solr-master.zip

Go to php-pecl-solr-master directory

           [root@manivel ]# cd php-pecl-solr-master/

You need to install some package before install the php-pecl-solr

           [root@manivel ]# yum install curl curl-devel
           [root@manivel ]# yum install libxml2-devel
          [root@manivel ]# yum install php-devel

The phpize command is used to prepare the build environment for a PHP Extension

          [root@manivel php-pecl-solr-master]# phpize 
          Configuring for:
          PHP Api Version:         20090626
          Zend Module Api No:      20090626
          Zend Extension Api No:   220090626

 Run these command to compile and install the php-pecl-solr

          [root@manivel php-pecl-solr-master]# ./configure 

          [root@manivel php-pecl-solr-master]# make 

          [root@manivel php-pecl-solr-master]# make install

A successful install will have created solr.so and You need to add extension=solr.so in php.ini file

         [root@manivel php-pecl-solr-master]# vi /etc/php.ini

               extension=solr.so

           :wq

After that restart the httpd service

          [root@manivel php-pecl-solr-master]# service httpd restart

I hope and it helps.....