How to monitor LSI RAID Controller in CentOS

This tutorial shows you how to monitor LSI raid in centos with email alert.

1) cd ~
2) wget http://serverfreak.net/lsi/MegaCliLin.zip
3) unzip MegaCliLin.zip
4) rpm -ivh Lib_Utils-1.00-08.noarch.rpm; rpm -ivh MegaCli-8.01.06-1.i386.rpm
5) cd /opt/MegaRAID/MegaCli/
6) wget http://serverfreak.net/lsi/analysis.awk
7) cd /etc/cron.hourly
8) wget http://serverfreak.net/lsi/raidstatus
9) wget http://serverfreak.net/lsi/MegaRAIDcron
10) chmod 755 MegaRAIDcron raidstatus
11) vi /root/.forward
12) Enter your email address into .forward then save it.
13) Completed.

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

Using parted on > 2TB drives to create new partitions for LVM

fdisk utility doesn’t support storage device that is larger than 2TB. Therefore you need to use GNU “parted” to create your partition.

As root run ‘parted /dev/sdX’ where X is the SAS/SATA/whatever controller’s drive as presented to the Linux kernel.

At the ‘(parted)’ prompt, enter:

mkpart primary ext3 0 -1
set 1 lvm on

Then ‘quit’ Parted to save your changes to the partition table on the relevant drive.

This creates a new partition assigned the whole drive capacity and gives it the LVM partition type, then saves those changes & exits parted.

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

How to install WildCard SSL in cPanel

Install the SSL Server Certificate Files

  1. Login to cPanel
  2. Click SSL/TLS Manager > Certificates (CRT) > Generate, view, upload or delete SSL certificates
  3. In the Upload a New Certificate section click the Browse button and locate your SSL Server Certificate file your_domain_com.txt.
  4. Click the Upload button.
  5. Click the Go Back link to return to SSL/TLS Manger.

Setup the Domain

  1. Click SSL/TLS Manager > Setup a SSL certificate to work with your site. If this option is not available to you your ISP may have disabled it and you will need to contact them to complete your SSL setup.
  2. From the Domain drop down menu select the domain that will use the SSL Certificate. The system will attempt to Fetch the SSL Certificate and corresponding private key.
  3. Open SSL_Intermediate.txt in Notepad or other simple text editor (not Word). Copy-and-paste all the contents of the GeoTrust_Intermediate.txt file into the Ca Bundle (CABUNDLE) box.
  4. Click on Install Certificate. You should receive a message that the certificate was successfully installed. If you receive an error you may need to contact your web hosting provider for additional support.

How to set your subdomain SSL

  1. Open public_html/.htaccess and add the following code

    RewriteCond %{SERVER_PORT} ^443$
    RewriteCond %{HTTP_HOST} ^abc\.domain\.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/abc/
    RewriteRule ^(.*) /abc/$1

    /abc/ is your subdomain folder under public_html.

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

Recreate deleted ‘www’ symbolic link in cPanel

If you accidentally remove the ‘www’ shortcut to public_html folder in cPanel, please follow tutorial below to recreate it.

1) Go to cPanel user folder

cd /home/user/

2) Create back the symbolic link

ln -s public_html www

3) Change the ownership of the www sym link to the cPanel user’s ownership

chown -h user.user www

4) Done. Do a ls -al to double check the sym link.

ls -al

 

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

Migrating cPanel Accounts without homedir – The SSH Way

Step 1: Generate backups without the homedir and sync them one by one removing each backup after the transfer

Code:
for x in `\ls -A1 /var/cpanel/users/`; do /scripts/pkgacct --skiphomedir ${x} ; rsync -aP /home/cpmove-${x}.tar.gz -e ssh root@NEW-SERVER-IP:/home/ ; rm -f /home/cpmove-${x}.tar.gz ; done

Step 2: Restore all accounts on the new server

Code:
for x in `ls -A1 /home/cpmove*` ; do /scripts/restorepkg /home/${x} ; done

Step 3: Sync /home from old server to new server

Code:
 rsync -aP /home/ -e ssh root@NEW-SERVER-IP:/home/

 

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

Migrating cPanel Accounts – The SSH way

On server1 (legacy server), run:
1)

Code:
mkdir /home/old_files && mv /home/*.tar.gz /home/old_files

2)

Code:
ls -1 /home/|grep -v '^\.'|sed -e 's/\///'|while read a; do /scripts/pkgacct ${a}; done &> /tmp/backup.log &

3) Review /tmp/backup.log

4)

Code:
scp /home/*.tar.gz root@server2:/home/

On server2 (new server):

1) Verify all accounts have been transfered from step 4 above

2)

Code:
 ls -1 /home/|grep gz$|while read f; do /scripts/restorepkg /home/${f}; done &> /tmp/restore.log &

3) Verify that no errors are to be found in /tmp/restore.log

 

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

ServerFreak – The FASTEST PHP 5 & MySQL 5 Hosting 30% Lifetime Discount

ServerFreak Technologies Sdn Bhd

Need help moving your site? No problem, we’ll do it for you! Just contact support after you’ve signed up for more details.

The ServerFreak Difference

ServerFreak is a Malaysia web hosting company founded with the vision of offering the highest quality service coupled with unparalled support and the latest web technologies. Our ideology is to provide not only the necessary resources needed to power your web presence, but to serve as a second set of hands to help your business thrive. Today, ServerFreak is home to thousands of websites, ranging from personal blogs to e-commerce and corporate websites.

ZERO Overselling

It has become a general trend in the industry for hosting companies to offer unfeasible amounts of storage and transfer in hopes of gaining customers on that notion alone. However, at ServerFreak, we promise to never allocate more resources than we have available!

Software

- cPanel / DirectAdmin
- Apache + Varnish (Web acceleration)
- MySQL 5 (phpMyAdmin available)
- PHP 5.2.X
- Zend Optimizer
- ionCube


ServerFreak is celebrating 8 years anniversary this month and we are giving 30% off for LIFE.
* Offer is available to new accounts only (new customers, or as an additional account for an existing customer).

Coupon Code: lyn308

Packages

Deluxe
2GB Space
50GB Bandwidth
Free Domain!!!
Monthly: MYR12.60 (Normally MYR18)
Annual: MYR126 (Normally MYR180)
Order Now

Elite
10GB Space
100GB Bandwidth
Free Domain!!!
Monthly: MYR21 (Normally MYR30)
Annual: MYR210 (Normally MYR300)
Order Now

Platinum
30GB Space
150GB Bandwidth
Free Domain!!!
Monthly: MYR34.93 (Normally MYR49.90)
Annual: MYR349.30 (Normally MYR499)
Order Now

Gold
60GB Space
200GB Bandwidth
Free Domain!!!
Monthly: MYR48.93 (NormallyMYR69.90)
Annual: MYR489.30 (Normally MYR699
Order Now

Features

- Free Assistance with Account Migration
- 24x7x365 support
- Dual Quad Core Xeon CPUs, 16GB+ RAM
- RAID 10, High Performance Storage
- Daily Backups to Off-site system
- Optimized PHP5 and Apache + Varnish
- Zend Optimizer
- (SSH) Shell Access
- Unlimited MySQL 5 Databases
- Unlimited FTP Accounts
- Unlimited E-mail Accounts
- E-mail access via POP3, IMAP, and Webmail (Encrypted)
- Unlimited Sub-Domains
- Softaculous (150+ Scripts)
- Secure Access to control panel

FAQ: http://www.web-hosting.net.my/faq.html
Sales e-mail: sales [AT] web-hosting.net.my
Helpdesk: https://secure.web-hosting.net.my/support/

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

Mozilla Firefox 4 Released

Mozilla’s official Firefox webpage hasn’t been updated yet to show the release of Firefox 4, but expect this to be done within the next 24 hours. Firefox 4 was supposed to be shipped to customers in November 2010, but several delays caused the release date to be pushed back on multiple occasions.

Firefox 4 sports many new features, such as: a refreshed user interface with tabs-on-top, improved tab organization, improved add-on organization, improved support for HTML 5 and CSS 3, and improved performance with JavaScript.

Download links for Firefox 4 are available below:

* Firefox 4 for Windows
* Firefox 4 for Mac OS X
* Firefox 4 for Linux (x86 and x64)

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]

How to Setup Software RAID for Windows Server 2003

Hi. Today I’m going to show you on how to setup a software RAID as usual. But this time, it will not be based on Linux or Unix operating system. Today I’m going to show how to setup for Windows Server 2003. Yes, Windows Server 2003 has a built-in function that almost similar to Software RAID function.

Please make sure before this installation, you will need 2 identical hard disk with same space connected to the server. But the truth is, you don’t need to same hard disk with the same space amount, but as long as you partitioned the space equally then it would be good as well. But for beginner, it is better to get a hard disk that got the same space quantity, less percentage that you would get yourself confused.

Below are the steps on how to enable the Software RAID inside Windows Server 2003:
Continue reading

[del.icio.us] [Digg] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Windows Live] [Yahoo!]