Sunday, November 30, 2008

How to change Redhat Linux timezone

Our dedicated server is in CST timezone, so we thought of changing the timezone to PST, where we are. Here are the instructions I followed:


This is a visual way of setting the timezone, but I am not sure if it actually did anything.

So, I tried manual way by following these steps:
#mv /etc/localtime /etc/localtime-old
#ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
#rdate -s

Because of our server firewall, the above step timedout. So I tried the following, which timed out too:

So I set the time manually, and then synced the hardware clock:
#date -s "3:38"
#hwclock --systohc --utc
#hwclock --show

Thursday, November 20, 2008

Redmine - email notification auth error

If you want to set up email notification and you are get the following error

504 5.3.3 AUTH mechanism LOGIN not available

Edit your config/email.yml
and comment out the authentication line:
#authentication: :login

Also, I found that for address value, localhost didnt work. I got the following error:
getaddrinfo Name or service not known

So either add entry for localhost in hosts,
or what I did was just specify address value as:

Thursday, November 13, 2008

cakephp - ignoring tmp from subversion

Some files like contents of tmp need to be ignored from versioning system like subversion.

I was being lazy, so instead of figuring it out, I did a google search and found this blog post that does exactly that:

Basically, here is the command I used from that post:
svn propset svn:ignore 'tmp' .
svn ci -m 'Ignoring "tmp" directory.'

Wednesday, November 12, 2008

mod rewrite and virtual hosts (and displaying html in post)

So we are using cakephp, which uses mod rewrite. I am still very new to cakephp, and have mixed feelings.

Anyhow, I spent about an hour trying to figure out why cake php didnt work when we pushed our first version to QA server. So I hope this saves someone an hour.

I narrowed it down to simply mod rewrite was not configured correctly.

Further digging proved that I have to put a 'directory' directive too if I am using virtualhost. That did the trick.
So here is what my working virtualhost looks like:

DocumentRoot /usr/local/qa/app/webroot/
ErrorLog logs/qa-error_log
CustomLog logs/qa-access_log common
AllowOverride All

As a PS, just in case if wondering: to display html in a post, I replaced <, > with html lt and gt respectively.

Tuesday, November 11, 2008

typos or errors in apache conf file

While editing the conf files, I always used to restart/reload the config, then go to error log to see the line number with typo/error; I found that there is a simpler way
apachectl -t
(can also take -f file-name)

Monday, November 10, 2008


I am going to use this blog to document little things I learn here and there as a CTO and cofounder of an early stage technology startup.

Mostly it will have things about technology that took me few hours to figure out, but its not limited to anything in specific.

This blog is also to reach out to other entrepreneurs out there.