Using the new X.commerce, you can combine the power of Magento, PayPal and eBay (and many more services like Facebook) to create cool new applications in the cloud - or actually the XFabric. The X.com site explains you how to install the X.commerce Developer Package in Windows or MacOS. This tutorial explains the steps for Fedora Linux.
XFabric allows you to build a so-called capability: A piece of software (for instance written in PHP) that uploads or downloads data into the XFabric cloud. To learn how this works, it's best to view the documentation over at X.com. To develop capabilities locally, you'll want to have your own copy of XFabric running locally, plus you need to install libraries to actually connect to it.
For running XFabric locally, Java and MongoDB are required. So let's go install this in Fedora Linux.
The Mongo database can be installed from the command-line using the following command:
yum install mongodb mongodb-server libmongodb mongo-java-driver
Next, the Mongo database needs to be started:
If you want the Mongo database to be started at every boot, run the following:
chkconfig mongod on
Installing the X.Manager Developer Pack
The X.Manager Developer Pack contains tools based on Java. Also, Ant is required for running the various scripts. To install the packages, run the following:
yum install ant java-1.6.0-openjdk
Note that this installs version 1.6.0 of the OpenJDK version of Java. You might also choose for the official Sun Java SDK distribution instead. The version 1.6.0 might change over time, so check the requirements on the X.com website.
After downloading the X.Manager Developer Pack, you can unpack the archive contents somewhere. This could be your home-directory or a new folder in /opt. We'll use the folder /opt/x_commerce_devpack for now.
Configuring the XFabric
Open up the file /opt/x_commerce_devpack/environment.properties and modify the line with mongodb.bin.dir:
Next, try to startup the XFabric:
A lot of Ant-messages should occur, but if the messages end after a while with the notice Started, then you have XFabric up and running. Note that the terminal needs to stay open for the XFabric to keep running. You could also create a daemon for this, or just simply use the nohup command, so that closing the terminal does not end the ant-process.
nohup ant xfabric.start
After this, the XFabric service should be up and running on port 8080. This port can be changed in the properties-file:
The next step is to create your own capabilities and add them to the XFabric service. We'll discuss this in upcoming tutorials.