Month: December 2015

Installing CentOS7 on Raid 1 Proliant microserver Gen8

This blog is for installing the CentOS 7 on HP Proliant Microserver Gen8. It can work on other raid devices too.

The tutorial covers the manual partition as some servers are not able to find the boot devices.

Please proceed to following steps.

First of all Go in the

Step1: Go into Bios enter BIOS (press F9 during boot)
– press CTRL+A (Service Option is hidden by default)
– select “Service Options” -> Processor Power and Utilization Monitoring -> Disable


please see for details

Also setup System Options -> SATA Controller Options -> Embedded SATA Configuration and select RAID configuration


Step2: Go to system Storage configuration by pressing F5 and in it create a RAID 1 logical drive using both the harddisks

Step 3: Now boot system and insert your centos dvd

Step4: Select Language and the version you want to install

Step5: Go in select disk section and select both the disk. At the bottom select manual partition

Step 6: Select New mount point as LVM and click on +

Step 7: Mount point is Boot and desired capacity as 512MB (make sure it is 512 MB on main screen too)

Step 8 Device Type as RAID, File System: ext4, Raid Level is Raid1

Step 9: click on update settings

Step 10: Again click on + from bottom and select new Mount point as ‘/’. Add space how much you want to allot leaving atleast 7GB. I am adding desired capacity as 215GB

Step 11: Now here Device Type is LVM, filesystem as ext4 and now click on Modify for Volume Group

Step 12: Select Raid level in this as RAID1, size policy as Fixed, name as shavg1 and save and then click on update settings

Step 13: Again click on + and now Mount point as SWAP and desired capacity as 6GB

Step 14: Select filesystem as SWAP, device type as LVM and then click on volume group and Modify

Step 15 : Select size policy as Fixed, Raid Level as RAID1 and click save.

Step 16: Check all the values again and click on done

Step 17: There will be summary of changes with top 2 as Destroy format in Red on sdb

Step 18: Accept changes and Click on Begin installation

Step 19: This will take its own time, By the time you can create your root password and create user

Step 20: Reboot the system and it should be good to go.






.htacess redirect and rewrites

I am writing this blog for a very simple usage of htaccess for redirects and rewriting the url

The first things that needs to be understand for the htaccess REWRITE and REDIRECT modules are the synstax


marks the start of line. It means anything that starts with

$ marks the end of line.

(.*) means any character within the url. This gets replaced by $1 at first occurence and $2 as second occurence

L means last code and do not execute anything after this.

R means redirect the page, so the url will be changed. However if you do not add that, it will be same.



Now here are some sample code


RewriteRule ^styles/ - [L,NC]

Now the above code means that if any url starts with style, just let it go through it. for example


RewriteRule ^resources/image/thumb/(.*)/?$ /download/file.php?id=$1&t=1 [NC,L] # Handle product requests

If any url starts with resources/image/thumb/(.*){THIS COULD BE ANY STRING}/

Go to looking for$1&t=1

Here $1 is (.*){THIS COULD BE ANY STRING}/



RewriteRule ^resources/image/(.*)/rokbox.jpg?$ /download/file.php?id=$1&mode=view/rokbox.jpg [NC,L] # Handle product requests

RewriteRule ^(.*)/$ $1.html [R,NC,L] # Permanent Move
RewriteRule ^(.*)/(.*)$ $2 [R,NC,L] # Permanent Move



To exclude a file from htaccess rule: follow this

RewriteCond %{REQUEST_URI} !^/google89b2a81fd1609a6e\.html$