Installing ZeroMQ with node.js

Recently, I installed zeromq with node.js and zeromq.node. I had some difficulties, so I thought that I would generate a brief how to.

ZeroMQ installed without much difficulty. On Ubuntu, install the following prerequisite.
apt-get install uuid-dev
On CentOS, install:
yum install libuuid-devel uuid-devel

Then, unpack the tarball and execute: configure, make
As the super user, execute: make install
This will install ZeroMQ in /usr/local/bin

Download and install the latest stable version of node.js. Just unpack the tarball and execute: configure, make

Resizing your root file system on Ubuntu with the logical volume manager (LVM)

I recently add some disk space to my root file system on a live, mounted file system using Ubuntu 10.10. I was using a virtual machine, so I changed the size of my disk drive in the virtual machine manager. Then, I logged into Ubuntu as root and executed the following commands.

Partitioned the new drive space with fdisk.
fdisk /dev/hda
In fdisk, "n" (new partition), "p" (primary), "3" (partition number), selected all remaining space on the drive, "t" change the type of partition to "8e" (LVM Volumn), "w" write the changes. I created a new partition on /dev/hda3.

MongoDB versus Riak Datastore: Some Benchmarks

I was doing some google searches, and I found some benchmarks of MongoDB and Riak.

Mr. Howe benchmarked MongoDB. He was able to get 1,750 GET requests per second from Mongo, when the keys could be stored in memory.
http://www.colinhowe.co.uk/2011/02/23/mongodb-performance-for-data-bigge...

In contrast, the folks at Joyeur were able to get 6,650 GET requests per second on a five-node Riak cluster and 13,700 GET requests per second on a 10-node cluster. These are "highly optimized" Riak clusters, using the "protocol buffers" interface.

Upgrading the pear installer with pear

I recently tried to install the latest version of PHPUnit, and I ran into a bit of trouble. When I installed pear on SLE 10 (zypper install php5-pear), the installer version was too old to download and install PHPUnit. So, I had to upgrade the pear installer to the latest version before I could install PHPUnit. To do this, simply run 'pear upgrade pear' from the command line (or in a shell). After you do that, PHPUnit should install without problems.

To install PHPUnit will all dependencies, execute the following from the command line (or in a shell).

NGINX configuration

I recently configured NginX to run on port 8080, and I thought that I would share my configuration file (nginx.conf).


#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log debug;
#pid logs/nginx.pid;

events {
worker_connections 10240;
}

http {
include mime.types;
default_type application/json;
log_format gzip '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent"';

Installing a subversion client on SLE 10

I just noticed that SUSE Linux Enterprise Server 10 does not have Subversion in the core repository. Apparently, one has to download a 2.9 GB "developer kit" to get the subversion client RPM.

I did some searching on the internet, and I discovered the RPMs at the following location. I am using x86_64 of SLE 10. You can check your version with the following command: lsb_release -d

wget http://download.opensuse.org/repositories/devel:/tools:/scm:/svn/SLE_10/...

Compile PHP 5.3 on Red Hat Linux

I recently compiled PHP 5.3 on RHEL 5.3, and I thought that I would share my configuration options.

First install the dependencies:
yum install mysql mysql-server mysql-devel perl-DBD-MySQL perl-DBI httpd httpd-devel httpd-suexec apr apr-devel apr-util apr-util-devel gd gd-devel gd-progs libjpeg-devel libpng-devel freetype-devel freetype-utils libxml2-devel curl-devel

./configure \
--build=i386-redhat-linux \
--host=i386-redhat-linux \
--target=i386-redhat-linux-gnu \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \

Setup name based virtual hosts in Apache

Setting up name based virtual hosts in Apache is fairly easy. Create a new file in /etc/httpd/conf.d, which on Red Hat will be loaded automatically by /etc/httpd/conf/httpd.conf.

Using the vi editor, I will create the following file.
vi /etc/httpd/conf.d/virtualhosts.conf

The file contents:

Options Indexes FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all

NameVirtualHost *:80

ServerAdmin webmaster@sample.com
DocumentRoot "/www/docs/www.sample.com"

Encrypt a partition with Dm-crypt and Linux Unified Key Setup

Dm-crypt is preferred over TrueCrypt, since dm-crypt is included in the linux kernel and since most distributions include the cryptsetup or cryptsetup-luks package. Moreover, volume encryption (rather than the per file encryption that you get with ecryptfs) is preferred, unless you need to do incremental backups of your file system. LUKS (or Linux Unified Key Setup) is the upcoming standard for Linux hard disk encryption. So, I recommend the cryptsetup-luks package.

How to build a Debian package

The following are some notes on how to build a Debian package. It is not really a complete tutorial.

I will assume that you are using subversion, and I will assume that you will add your package to an apt repository.

*) Install dependencies
apt-get install svn-buildpackage gcc debhelper dh-make epm fakeroot

*) Make a directory for your source code
mkdir -p packageName/branches
mkdir -p packageName/tags
mkdir -p packageName/packageName-0.1

*) Enter packageName-0.1 directory and touch a fake tarball

Syndicate content