MongoDB + power outage = downtime

MongoDB handles unexpected shutdowns quite appallingly, one thing that I always forget is the general server language for speaking with the server and getting the info I need to get her back up and running. $ sudo status mongodb $ sudo stop mongodb $ sudo start mongodb $ sudo restart mongodb To see whats going on… If you see “Error: couldn’t connect to server 127.0.0.1} (anon):1137″ This condition is largely

Apache Address already in use: make_sock: could not bind to port 80 error and solution

Just had this delightful problem tonight, fix: First make sure port 80/443 is not used by any other service or application with netstat command: # netstat -tulpn| grep :80 If port 80 is bind to httpd, kill all process: # killall -9 httpd Now start the httpd: # /etc/init.d/httpd start Make sure it’s a user capable of sudo Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit

Creating a soft or symbolic link in ubuntu

Sometimes you want to link to a directory that isn’t necessarily within the web root for the particular site you are on. Simple enough solution for it though. ln -s /webroot/home/httpd/test.com/index.php /home/sbramley/index.php or ln -s /webroot/home/httpd/test /home/sbramley/ So you can link to a directory of file easyyyyy Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on

Switch to our mobile site