Tag Archives: linux

Manually running MongoDB in Kubuntu

When I am developing against MongoDB I don’t want the server to run all the time and use up my memory. Instead, what I do is manually start/stop the server and specify config files so that it can run on various data directories.

To set it up, I downloaded MongoDB to ~/Downloads, and then extracted to a directory where I keep various apps: ~/Apps/mongodb-linux-x86_64-2.0.1.

Inside the MongoDB directory is a bin directory. I create a symbolic link to everything there from my home bin directory (~/bin).

When I log in, the ~/.bashrc file in Kubuntu adds everything in ~/bin to the $PATH. This way I can easily run mongod from the bash manually and specify a config file for mongod to use (so I can switch between database directories easily for different projects).

Force Restart in Linux

When the computer freezes (as has happened multiple times under Ubuntu w/Unity to me), press ALT + PrintScreen/SysRq + R + E + I + S + U + B.

Hate Unity, Upgraded to Ubuntu 11.10…now to fix the UI

As many folks, I do not like the Unity interface in the latest versions of Ubuntu. In Ubuntu 11.04, I had used the “Classic” mode when logging in, but after upgrading to 11.10 I’ve had to take additional steps to avoid the Unity UI.
Continue reading

gunzip Multiple Files in Different Subdirectories

Recently I had to unzip a lot of files located in subdirectories. To do this, I used a combination of the “find” and “gunzip” commands in Ubuntu:

find * -maxdepth 1  -name '*.gz' -exec gunzip {} \;

This finds all of the files with .gz extensions to a subdirectory depth of 1 maximum and then executes the gunzip command on the file.

Setting up a GIT repository server with Gitolite for source control

There are lots of instructions for getting setup with git around on the web, however all of them seem very verbose and since this is the third time I’ve set up a git server I decided to write down a short version.

Continue reading