Tricks and Tips about Systems/Network

August 31, 2010

Amazon : Configuring software RAID 0 on Windows 2008

Filed under: admins,Amazon EC2,Windows 2008 — Liju Mathew @ 6:24 pm

One of my Amazon client demands that he wants to use the large instance (ephemeral) storage and should be boosted to get the maximum preformance on disk I/O operations.

Basically instance storage in Windows AMI can be enable only by starting the instance from the command line. Now my two of 420GB drives are joined as 840GB single drive after the stripping. Here are the screen shots to how to do that,


Godaddy hosting : Setting values on php varible

Filed under: admins,Godaddy — Liju Mathew @ 6:02 pm

How do I change the default values set on my Godaddy’s shared hosting.

I had tried to change the values by modifying .htaccess and the php.ini file placed on the hosting root. But nothing found to be worked.

Godaddy suggesting me to use the “php5.ini “ copied on your hosting root rather than “php.ini”. I have created the file and settings were not reflected. The next step is, I need to stop all the php running in order to effect the new values.

Login to Godady hosting –> Products–webhosting–>launch control center–> Content –> Process

Then terminate all the process running. It’s will not harm any site functionality not for a long time. After that you can review the changes by looking on phpinfo page

This link would also help you to solve on different platform.

August 30, 2010

codeigniter : .htaccess entry for godaddy shared hosting

Filed under: admins,PHP — Liju Mathew @ 9:50 pm


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]

Enabling instance storage on Amazon Windows 2008 AMI

Filed under: admins,Amazon EC2 — Liju Mathew @ 6:54 pm

After login to the AWS console, anyone can start the AMI (either windows or Linux ) instance easily using the interface. But most of the windows 2008 AMI using EBS volume by default and the instance were stared with 30GB diskspace. The real issue is when we start the windows ami using the GUI, we can’t utilise/use the instance storage associated with that package. A small instance has 160GB instance storage (ephemeral) and large instance has 850GB. Unfortunately I didn’t get the ephemeral storage come up with Windows though GUI and client demand it to for the work.

After some goggling it has found that we can enable the instance storage for Windows AMI when it starts only from the command line. So I look forward to start the instance from CLI.

Here is the link will help you to mange the Amazon ec2 from the command line.

Here is the commands to enable ephemeral storage on Windows 2008 instance,

D:\ec2>ec2-run-instances –region us-east-1 -K pk-5SQGV63Y2CU62V4RUXUDHUKOFOSRGUH.pem -C cert-5SQGV63Y2CJU62V4RUXUDHUKOFOSRGUH.pem –block-device-mapping “/dev/sdc=ephemeral0” -block-device-mapping “/dev/sdd=ephemeral1” ami-d9e40db0 -g default -g default -t m1.large -k win-tmpl -z us-east-1c

1. –region : where the instance are running
2. -K pk-5SQGV63Y2CU62V4RUXUDHUKOFOSRGUH.pem : Private key for the SWI login
3. -C cert-5SQGV63Y2CJUdRUXUDHUKOFOSRGUH.pem : X.509 certificates
4. –block-device-mapping “/dev/sdc=ephemeral0” : I uses both ephemeral storage comes up with my large instance plan
5. ami-d9e40db0 : Windows 2008 64 bit AMI
6.-g default : Default security group
7. -t m1.large : Instance type
8. -k win-tmpl : key pair name which created for all widows instances
9. -z us-east-1c : Where EBS storage created.

Some tips,

If you want to expand the C drive volume more than 30GB, you may require to create a snapshot first and increase the volume of the snapshot later. It will create a new volume under “Volume” group and add this volume to the new instance.

You may need to stop the running instance and detached the the volume which attached currently. After that attache the new volume created by the snapshot copy. Pls choose the device name as “/dev/sda1” during the attaching time.

Pls note that choose the same region, the instance you are going to take the snapshot and the expanded volume to be attached which created from the snapshot. Otherwise you can’t attach the volume. Because both the region should be same for instance using and the volume created which is trying to attach.

How to manage Amazone EC2 from the commandline on Windows

Filed under: admins,Amazon EC2 — Liju Mathew @ 6:26 pm

After login to the AWS portal, Go through the menu Accounts—> Security Credentials–>Access Credentials

Then choose the “X.509 certificates” tab from the opend page. During the initial AWS account setup, you may ask to create a X.509 certificate along with a private key. Amazon will suppose to be created only 2 X.509 certificate at a time.
Pls see the attached window,

if you have already downloaded certificate file and private file, copied it in to a safest place. We need both these files to get in to command line login. You can also create the second “X.509 certificate’ file by clicking the ” generate new certificate” link on the same window and you will get a prompt to download certificate file and private key file.

Now you need to download the cli-api tools from here http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip. Download and copy it to “C:\EC2” folder where I wish to work. Now you need to complete the following steps.

1. Copy the certificate file (cert-5SQGV63Y2CJU62V4RUXUDHUKOFRGUH.pem ) and the private key file (pk-5SQGV63Y2CJU62V4RUXUDHUKOFOSRGUH.pem) inside the “c:\ec2″ folder
2. You also need to generate a key pair from AWS console and download it in to this ” c\ec2″ folder.
3. Install Java (jdk1.6.0_14)
4. Setting up path and environment variables.
You may need to set 4 environment variable showing as below.
a. JAVA_HOME =C:\Program Files\Java\jdk1.6.0_14
b. EC2_CERT = C:\ec2\certs\cert-filename.pem
c. EC2_HOME = C:\ec2
d. EC2_PRIVATE_KEY= D:\ec2\certs\pk-filename.pem
e. You need to add the “C:\ec2\bin” in system path list.

Now everything are in place and now you need to test it out. Open command line window and type ” ec2-describe-regions” Out put should look like this,

All are set !!

August 25, 2010

How to serve .flv file on IIS

Filed under: admins,IIS,Windows 2003 — Liju Mathew @ 10:17 pm

I’m using Windows 2003 server.

Adding .flv MIME type in IIS

1) Select the site to configure in IIS, right click and select “Properties”
2) Under HTTP Headers Tab, select “File Types” under the MIME Map section and select “New Type
3) Type “.flv” as the associated extension and “video/x-flv” as the content type.
4) Select “OK” and you’re ready to fly!

August 17, 2010

Download a file protected by Basic authentication

Filed under: admins,Linux — Liju Mathew @ 6:22 am


I have a requirement to download a url which protected by the password on a remote server. I can't do it locally since the download file is in GB size.

[root@host.domain.com] feeds >> wget http://clients.xmlteam.com/downloads/feedfetcher/basic/feedfetcher-basic.2007.01.16.tar.gz
--13:13:18-- http://clients.xmlteam.com/downloads/feedfetcher/basic/feedfetcher-basic.2007.01.16.tar.gz
=> `feedfetcher-basic.2007.01.16.tar.gz'
Resolving clients.xmlteam.com... 204.15.197.99
Connecting to clients.xmlteam.com|204.15.197.99|:80... connected.
HTTP request sent, awaiting response... 401 Authorization Required
Authorization failed.

The correct usage is $wget –http-user=user –http-password=pass

[root@host.domain.com] feeds >> wget http://clients.xmlteam.com/downloads/feedfetcher/basic/feedfetcher-basic.2007.01.16.tar.gz --http-user=user --http-password=pass
--13:23:04-- http://clients.xmlteam.com/downloads/feedfetcher/basic/feedfetcher-basic.2007.01.16.tar.gz
=> `feedfetcher-basic.2007.01.16.tar.gz.1'
Resolving clients.xmlteam.com... 204.15.197.99
Connecting to clients.xmlteam.com|204.15.197.99|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 120,493 (118K) [application/x-gzip]

100%[====================================>] 120,493 494.43K/s

13:23:04 (494.16 KB/s) - `feedfetcher-basic.2007.01.16.tar.gz.1' saved [120493/120493]

That works !!!!

Filed under: admins,CentOS,Linux — Liju Mathew @ 12:36 am

I’m looking for the software which can able to store the skype voice conversation in Linux. Most of the threads are leading to this program ‘skype-call-recorder’ hosted on http://atdot.ch/scr/download/. But I didn’t get any luck with it on my Centos 5.5 box which showing errors while on running.

So I find other solution !! scx-tools from http://scx-tools.sourceforge.net/. During the installation I got the error
-bash: qmake: command not found That program uses qt library to compile the source and I had installed the qt packages using the yum command and still getting the same errors.

Finally I found that qmake installed path is not added in system path during the yum installation. I found it under “/usr/lib/qt4/bin” and update the system path as well
PATH=$PATH:/usr/lib/qt4/bin;export PATH

Then the compilation will work nicely.

$ qmake -project "LIBS += -lQtNetwork -lasound"
$ qmake
$ make
#cp cp scx-recorder /usr/bin/

August 14, 2010

Configure relay SMTP server on Windows 2008

Filed under: admins,Windows,Windows 2008 — Liju Mathew @ 1:05 am

I have a Windows 2008 server and installed Apache as web server for my php projects. Some application uses email functionality to send subscriptions email and welcome mails.

But the default server configuration did not send the email from the server even though I installed SMTP service integrated with the server.

You may need to do two things,
1. Install SMTP service
2. Enable relay on SMTP service

The following screen shots will help you to do that.

a. Open the server manager and add the role–> choose SMTP server and install.

Now we need to enable the smtp relay in it.

It the time to check mail relay is enabled. Pls note that we are enabled email relay only from the server. If you want to use this server as relay server for your network, You must add your static ip. So all the mails are relayed through this server.

August 10, 2010

pdo_mysql.so: undefined symbol: php_pdo_declare_long_constant

Filed under: Uncategorized — Liju Mathew @ 6:02 pm
Tags:

After the mysql_pdo installation on new Centos 5.5 server, I got the error
pdo_mysql.so: undefined symbol: php_pdo_declare_long_constant” I have done the installation and uninstall pdo_mysql using pecl package but still the error is live.

After googling I found that, PDO library is already installed which bind with php binary. But “pecl” installed uses it’s own pdo build which can able to work with “pdo_mysql” pecl installer. So I need to unbind the pdo from the php binary. I have recompiled the php using “–disable-pdo” and installed the pdo_mysql using pecl.

a quick rebuild of PHP with –disable-pdo and then enabling pdo from PECL instead

That’s all make sense to me.
1. #pecl uninstall PDO
2. #pecl uninstall PDO_MYSQL
3. Recompile php using “–disable-pdo”
4. #pecl install PDO
5. #PHP_PDO_SHARED=1 pecl install PDO_MYSQL
6. [root@rc-021 php-5.2.14]# php -r 'phpinfo();' |grep "pdo"
pdo_mysql

Next Page »

Create a free website or blog at WordPress.com.