Category Archives: Ubuntu

Install LetsEncrypt for Multiple Sites in Nginx

Turn on one site at a time and install new certificate.  Once all certificates are installed you can turn on all the sites.  The installation client may be confused when more than one site are hosted on the same server … Continue reading

Posted in Ubuntu | Tagged , | Comments Off on Install LetsEncrypt for Multiple Sites in Nginx

MongoDB Test2

Using a two-core server generating enough traffics and achived over 8000 ticks/s. mongod runs 65% CPU time.

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Test2

MongoDB Test 1

Simple test in simulated ticks: single node process had throughput of 2394 ticks per second. mongod runs at 44% CPU usage.

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Test 1

MongoDB Build

Spent a few hours building a simple MongoDB cluster with Digital Ocean VPS. Three nodes: Primary, Secondary and Arbiter. Primary node is located in New York and Secondary node is in San Francisco. Arbiter is also in New York leveraging … Continue reading

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Build

Reset CouchDB Instance

It’s really easy to clean up a CouchDB instance as fresh as new. Just delete the database files and .delete folder in /usr/local/var/lib/couchdb and restart the CouchDB service. $ sudo /etc/init.d/couchdb stop $ cd /usr/local/var/lib/couchdb $ sudo rm -rf * … Continue reading

Posted in NoSQL, Ubuntu | Tagged | Comments Off on Reset CouchDB Instance

Tunneling via Putty

When you use putty to log in CouchDB server, you can also set up tunneling to access its admin console restricted to localhost. Here’s the additional configurationĀ over your normal setup.

Posted in Ubuntu | Tagged , , | Comments Off on Tunneling via Putty

Running CouchDB Admin Console Remotely

CouchDB default configuration allows only localhost access to its admin console via Futon or curl. Without compromising server security and access, you can use ssh to tunnel to your CouchDB. Below is how to set up the tunnel. First, make … Continue reading

Posted in Ubuntu | Tagged | Comments Off on Running CouchDB Admin Console Remotely

Mount Box.net to Ubuntu

I have this box.net account with 50GB free space unused. As Box supports DAV, we can mount it as backup storage. Below lists the commands to get you there. $ sudo apt-get install davfs2 #assume you don’t have davfs2 installed … Continue reading

Posted in Ubuntu | Tagged , | Comments Off on Mount Box.net to Ubuntu

Add Swap Space in Ubuntu

Many vendors provide no default swap partition in their images. If you use Ubuntu, here’s a quick way to add swap space, which is useful when you may run out of allocated physical memory. $ swapon -s $ sudo dd … Continue reading

Posted in Ubuntu | Tagged , | Comments Off on Add Swap Space in Ubuntu