MTConnect agent setup on Debian

This morning I had to set up the MTConnect agent on a Debian Wheezy system. Although I’ve used Ubuntu for several years, this was my first experience with proper Debian. Fortunately for me, there is already an excellent tutorial by Prince on setting up an MTConnect agent on Ubuntu to use as a starting point.

In the process, I found that my Debian install was missing some needed packages. I blame this on my own impatience: rather than wait for the full DVD download, I downloaded the “small CD” ISO image, which is smaller and probably excludes a lot of rarely-used packages.

Here’s what I ended up doing:

1) Install some packages.

apt-get install libxml2 libxml2-dev cmake git build-essential libcppunit-dev

The first few packages are listed on Prince’s blog. I included git so that I could fetch the MTConnect agent repository from GitHub. The build-essentials package probably would’ve been included had I downloaded the full distro DVD, and includes the C++ compiler. The libcppunit-dev package included the CppUnit package needed to build the agent.

2) Fetch the MTConnect agent source code.

git clone

3) Build the agent.

cd cppagent
cmake .

With all of the prerequisite packages in place, the build proceeded smoothly.

4) Run the agent.

cd agent
./agent daemonize

So is the agent running? Let’s check:

nestat -anp --tcp


There it is, running on port 5000. The next thing to do would be to test it with curl, but that’s not installed on this barebones system, either. Falling back to wget:

wget localhost:5000
wget localhost:5000/current

And now I have two files: index.html contains the result of my probe, and current contains the result of my current request. The MTConnect agent is working. Cool beans. On to setting up the adapters…


One thought on “MTConnect agent setup on Debian

  1. Very nice post.

    Okuma has been (and are) HUGE supporters of MTConnect. We can not thank Okuma enough for their support of MTConnect.

    Maybe we will see you at [MC]2 2013? ?


    –Dave Edstrom
    President and Chairman of the Board
    MTConnect Institute

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s