Thursday, November 27, 2014

Step to create ClearOS bootable USB in windows 7

URL ClearOS: http://www.clearfoundation.com/Software/downloads.html
URL Syslinux: https://www.kernel.org/pub/linux/utils/boot/syslinux/

Make sure you pick the highest version you can find and download the zip version of it.
Linux, like PC’s uses Master Boot Records and therefore cannot just boot any disk. You need to make that disk bootable. This is why we need Syslinux.

1. Connect the USB disk to a Windows Vista or 7 PC.

2. Create a FAT32 partition on it of at least 5GB using Disk Management.



3. Open the ClearOS iso file with WinRAR (open, not extract).




4. Copy the images and isolinux folders to the USB drive.



5. Rename the “isolinux” folder to “syslinux“. AND Open the “syslinux” folder, find and rename “isolinux.cfg” to “syslinux.cfg“.



6. Copy the ClearOS iso file to the root of the USB partition.

7. Find your Syslinux zipfile and extract it to a subfolder on your desktop.




8. Open a command prompt with Administrative privilege and navigate to the “win32” folder inside the Syslinux folder.
 Note:  Take note of the USB drive letter and run. My side USB drive is "L:"
 Run this command: syslinux.exe -m -f -a -d /boot/syslinux l:



This will make the drive bootable for Linux. Obviously replace l: with your drive letter.
And that’s it. You now have a bootable USB drive for ClearOS.

9. After creating Bootable USB, Go to BIOS and change the boot priority to USB.

10. After booting ClearOS select the "HardDisk" option selecte the partition.

That's it......... 

CentOS 6 CD/DVD/ISO to USB Installation in Windows 7


I tried various Linux ISO to USB software like UNetbootinUniversal-USB-Installer etc... to create CentOS 6 bootable Pendrive. But all have some problems or limitations which force me to use ISO2USB software, which help me to meet my need.

Create a CentOS 6 bootable USB which will support customized installation (by using kickstart configuration file).

UNetbootin: Bootable USB of CentOS 6 created by UNetbootin is not even booting the system using USB and not support kickstart configuration file.

Universal-USB-Installer: It successfully boot the CentOS 6 from USB but failed to install by kickstart configuration file and Copying section.

Prepare CentOS 6 bootable from ISO file or CD/DVD :

URL for Windows : https://sourceforge.net/projects/iso2usb/files/latest/download

1. Plug the USB drive to Windows XP/Vista/7 machine.

2.  After downloading, Execute the ISO2USB software.


3. Browse CentOS 6 ISO (with custom installation) file by using the highlighted browse button.


4. Click on OK button but before clicking on OK button; just make sure that correct USB drive should be selected.


5. Click Exit button, when finished.


6. Safely remove USB drive from Windows XP/Vista/7 system.

  USB drive is now ready to install CentOS 6 (with custom configuration file) on your system.

Wednesday, November 26, 2014

PHP mail function not working on CentOS server with WHM, testing in browser.



I configured LAMP server in VPS server, I tried to run PHP mail function in web browser, but it was not working in the 1st attempt. Later, I solved the issue.

1. Login to WHM with username and password.


2. Go to Server Configuration => Tweake Setting.


3.  In side the Tweake Settings go to Mail option,  change the 'Prevent “nobody” from sending mail' to Off Default Mode.




4. Create the PHP mail function script in the Document root "test.php".

<?php
  $to = "Destination mail ID";
  $message = "Hello World";
  $subject = "User Activated";
  $headers = 'MIME-Version: 1.0' . "\r\n";
  $headers = 'Content-type: test/html; charset=iso-8859-1' . "\r\n";

  //Additional Header
  $headers = 'From: Easyship <info@easyshipping.com>' . "\r\n";
  
  //send email
  mail($to, $subject, $message, $header);
  
  //Email response
  dir ("Reach Here"); 
?>

5. Go to web browser and test the PHP mail function script in browser.
    URL:-    http://IP Address/~easy/easyshipping/test.php    or   DomainName/test.php
     

6. If there is no error, go to the mail box and check for php test mail.



That's it...






Wednesday, November 12, 2014

Installing Composer Globally on CentOS 6.4

Installing Composer Globally on CentOS 6.4


Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compile flags are also required, but the installer will warn you about any incompatibilities.

To install it globally on CentOS follow the steps below.
1. First, go to the /tmp directory. 

      [root@centos ~]# cd /tmp

2. Download the composer.phar file.

       [root@centos tmp]# curl -sS https://getcomposer.org/installer | php

3. You can run these commands to easily access composer from anywhere on your   system: Move it to /usr/local/bin/

       [root@centos tmp]#  mv composer.phar /usr/local/bin/composer

4. Then, just run composer in order to run Composer instead of
        [root@centos ~]#  php composer.phar

Reference URL :   https://getcomposer.org/doc/00-intro.md