Change mongodb data path to portable hard drive

Background I have a 1TB portable usb hard drive which I want to host mongodb data. The OS is ubuntu 15.04   Procedure stop your mongodb service sudo service mongod stop   edit `/etc/fstab` so that the computer automatically mounts your portable drive under “mongodb” user everytime the OS boots up: UUID=018483db-1b1c-4dd2-a373-58a6aa5a10be / ext4 errors=remount-ro …

Create mongodb replica sets on different machines

Important prerequisites: Confirm connectivity between machines you want to set as replica set Confirm the same version of Mongodb is installed on each machine. I tried one with mongo 2.6 and another with mongo 3.0 and totally failed. Then I installed mongo 3.0 on every machine. Don’t set authentication for all the machines before you …

Install Latex distribution, editor and packages on Ubuntu

1. Install TexLive. This is the latex environment. https://www.tug.org/texlive/quickinstall.html We recommend to use .install-tl script to install TexLive. TexLive is usually installed at “/usr/local/texlive/year/bin/x86_64-linux/….” Although you can install vanilla TexLive via sudo apt-get install texlive, we often observe it misses advanced accessories such as fonts.   2. Install Texmaker http://www.xm1math.net/texmaker/ *** Note: On Ubuntu, Texmaker can …

Collection of statistical hypothesis tests

This post is a collection of hypothesis test methodologies. The full collection is listed here: http://www.biostathandbook.com/testchoice.html. My post just goes over several hypothesis tests that are relevant to my research.   One-way ANOVA: http://www.biostathandbook.com/onewayanova.html If you have one measurement variable and one nominal variable, and the nominal variable separates subjects into multiple groups, you want to test  …

Unclean uninstallation of fcitx causes login loop on Ubuntu

Whether you realize or not, fcitx, a popular input method, if not properly uninstalled, can cause the notorious login loop issue on Ubuntu (i.e., every time you type your password and enter, you get asked to type your password again on the same login window). Here is the post talking about how to fully uninstall …

alsamixer automatically mutes headphones and speakers

http://askubuntu.com/questions/280566/my-headphones-mute-alsamixer-when-i-plug-them-in-hp-dv6-12-04 http://askubuntu.com/questions/541847/is-there-any-way-to-save-alsamixer-settings-other-than-alsactl-store The two links above are two popular links about dealing with the auto-mute problem of alsamixer. However, the two don’t help my situation.   My solution 1. Type the following command: sudo alsamixer 2. Use `RightArrow` key to navigate to right until you see “auto-mute” 3. Use `UpArrow` or `DownArrow` key to set …