River5 is the latest in a series of RSS News Aggretators written by Dave Winer. You can read his announcement here. These notes describe how to set up a River of News on a Virtual Server (VS) purchased or rented from CloudAtCost and freshly imaged with Ubuntu 14.04.
These notes assume that you have done some work in configuring your VS with a user, other than root, that has super user privileges. If you need help doing the initial setup of your VS, look here.
VS’s don’t have graphical displays. Everything needs to be done from the command line. You can execute these commands from the the console provided by the CloudAtCost panel. However, I find the response to be slow. An SSH client tends to work better for me. If you are running from Windows, I find the PuTTY SSH client to be very good.
In the command examples below, the input you would type is preceded by the command prompt. On my system, this is set up to show what directory I am in, followed by a dollar sign ($) and a space. When there is output displayed by a program, it follows a command and is not preceded by the prompt with the dollar sign.
The version of node.js available from the package manager on Ubuntu is typically woefully behind the current mature, stable release available from nodejs.org. But it’s easy to install a current version without the package manager. Execute these commands to download the current version. Note that in my case, the current version was v4.3.0. Vist the Node.js download page to determine the appropriate version number when you install.
This retrieves the package of pre-compiled binaries. If you want to compile the version from source, well, that’s a subject for another article.
There is some controversy over where to place the contents of the package in the file system. I’ve used several locations with success, but the consensus seems to be that Node.js should reside in `/usr/local``. To unpack the package there, execute:
and supply the
sudo password when prompted. After a few seconds, the command prompt should return with no additional messages displayed.
To assure that Node is in place and ready to run try:
This shows that Node is indeed installed in the
/usr/local directory tree and that it has the expected version number.
Likewise, to assure that
npm, the Node package manager, is present and working run:
Remember that these version numbers are those that were produced on my system when I wrote these notes. The values that you see might be different.
Installing River5 is even easier. First install the
git version control tool.
git to retrieve River5 from its repository.
To install other packages needed by the program:
This will display a relatively long list of packages needed by the program.
To start it up:
You should see a list of feeds and article titles go scrolling by. After a few minutes point a browser at
your_domain is a domain name that points to your server. If you have not obtained a domain name (or the DNS has not updated to the new IP address obtained when you imaged your server), you can also use the IP address provided when you imaged your VS.
If you log off of your server now, River5 will also stop operating. Go ahead and try it now. Just close the command shell on the server and try to refresh the web page. It won’t work.
In order to keep the river flowing, even when you aren’t logged in, you need to do a little additional work.
There are a few ways to keep processes running when you aren’t logged in, but my favorite is Forever. This is a package that is installed with
On my system, I got a message about an optional dependency failing. (It was for an event handling package for Macs – not needed on Ubuntu.) You can safely ignore it.
Then use Forever to start River5.
Again, you may see a few warnings that can be safely ignored. (They relate to some advanced configuration options for Forever, which we don’t need.)
That should do it. Within moments, you should be able to refresh you browser and see the web page again. It may take a few more minutes for new content to appear.
I have exercised these notes on different VS’s with differing levels of resources. The minimum system I have used is 1 CPU, 512 MB RAM, and 10 GB disk. (That’s the smallest system supported by CloudAtCost too.) I have also tried it on servers with 4 CPUs, 3 GB RAM and 40 GB of disk space. Seems to work fine.
When you look at your server on the panel at CloudAtCost, you may be alarmed to see memory usage at 80% or above, even if you are on a VS that is rather well equipped with RAM. Don’t panic, you aren’t really running out of memory. Log in to your server and run:
to show how your memory is really being used. For example, on a system with only 512 MB, I received the following output.
As you can see, a large portion of the memory is cached and the system is not even using any swap space. (For additional information on interpreting the output of
free, see this link.)
Version 14.04 LTS 64-bit is the only version of Ubuntu supported by CloudAtCost. However, there don’t seem to be any instructions in these notes that would prevent them from being used with another recent LTS release. Untested though.