Archive for August, 2009

Link to a good blog on desktop-blogging-clients-the-ultimate-list

August 5th, 2009

http://www.hongkiat.com/blog/desktop-blogging-clients-the-ultimate-list/

Retweet this post

Customize Amazon AMI (link to another post)

August 4th, 2009

http://alestic.com/2009/06/ec2-ami-bundle

http://robrohan.com/2009/01/30/saving-a-customised-linux-amazon-instance-ec2-and-s3/

I will post my experience later. I wanna blog like these guys.. really great posts.

Retweet this post

OpenESB integration

August 4th, 2009

I am still preparing the doc on my experience on OpenESB/GlassfishESB.

Until I post that let me share these links which would be helpfulful:

https://open-esb.dev.java.net/60mintutorial/exercise1.html

https://open-esb.dev.java.net/60mintutorial/exercise2.html

http://java.dzone.com/articles/introduction-integration-and-o

Retweet this post

fix for Error: sudo: must be setuid root

August 3rd, 2009

Error: sudo: must be setuid root

1.chown root:root /usr/bin/sudo
2.chmod 4111 /usr/bin/sudo
3.If this doesnt work make sure that the commnd used (eg:sudo gem list) is added to user’s permission at /etc/sudoers and check the command path is correct say gem can be on /usr/local/bin/gem or /usr/bin/gem. The same can be happened with other commands too. You may find the path of a command by $which gem (the command name)

Retweet this post

Apache + Mongrel+ Mod_deflate for Ruby On Rails ( compression of scripts and CSS to increase perfomance in page loading on Rails)

August 3rd, 2009

1.Download latest version of Apache HTTP Server.

2.Untar the file and change directory to the httpd folder created on uncompression.

3.Do the Apche compilation as Root user as follows:

#./configure –prefix=/opt/installs/apache2 –enable-deflate –enable-proxy –enable-proxy-html –enable-proxy-balancer –enable-rewrite –enable-cache–enable-mem-cache –enable-ssl –enable-headers

#make

#make install

*note it should be –enable so edit it if ists shown as ‘-’ on copying ..I had faced that many times on copy-paste ;)

Add the following entries at end of httpd.conf

#note: This to connect Apache with Mongrel on 4000 and 4001 ports, if you wanna add a differnt server use that servers local or public IP instead of 127.0.0.1

#added on rails clustering by anoop

<Proxy balancer://mycluster>

# cluster member 1

BalancerMember http://127.0.0.1:6000

BalancerMember http://127.0.0.1:6001

</proxy>

#these virtual host contains the main configurations including mod deflate rules
<VirtualHost *:80>

ServerAdmin admin@greentripp.in

ServerName localhost.localdomain

ServerAlias localhost

ProxyPass / balancer://mycluster/

ProxyPassReverse / balancer://mycluster/

ErrorLog /var/log/apache_error_log

CustomLog /var/log/apache_access_log combined

#Deflate rules used in LB1 by anoop

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/xml

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE application/xml

AddOutputFilterByType DEFLATE application/xhtml+xml

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

DeflateCompressionLevel 9

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

DeflateFilterNote Input instream

DeflateFilterNote Output outstream

DeflateFilterNote Ratio ratio

</VirtualHost>

Confs. over

Now start mongrel_cluster from the root folder of your rails application

# mongrel_rails start -d -e production -p 6000

# mongrel_rails start -d -e production -p 6001 -P logs/mongrel2.pid

*you may add

Start Apache HTTP server:

#/opt/installs/apache2/bin/apachectl -k start

Retweet this post

Linux Command Tips

August 3rd, 2009

Change directory:

chnage to home of the logged in user

cd ~

Change to previous directory

cd -

To re-enter a command entered previously

!starting-letters of the command

eg:

!netstat

To list listening ports and PID:

netstat -nlp

Eg:

To list all ruby ports:

netstat -nlp | grep ruby

for tomcat n all

netstat -nlp | grep java

Retweet this post