Table contents
The installation will be done on a Ubuntu 12.04 operating system, you can choose a higher version, but then the requirements might be different.
Sync API can be installed in the same machine than eyeOS or in another independent machine.
If installed in another independent machine the directories /var/www/eyeos/APISync must be copied in that machine.
- MongoDb
\# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

\# echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

\# apt-get update

\# apt-get install mongodb-org=2.6.0 mongodb-org-server=2.6.0 mongodb-org-shell=2.6.0 mongodb-org-mongos=2.6.0 mongodb-org-tools=2.6.0

\# echo "mongodb-org hold" | sudo dpkg –set-selections
\# echo "mongodb-org-server hold" | sudo dpkg --set-selections
\# echo "mongodb-org-shell hold" | sudo dpkg --set-selections
\# echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
\# echo "mongodb-org-tools hold" | sudo dpkg –set-selections

\# mongo –version

\# service mongod status

In case of an error 111 Connection refused:
\# sudo rm /var/lib/mongodb/mongod.lock
\# sudo service mongod restart
-
PyMongo
# apt-get install build-essential python-dev
# apt-get install python-pip
# pip install pymongo
It is needed to configure two things in settings.py:
- host: server IP
- port: listening port
Then run, with administrator privileges, the script 'installServerAPISYNC.sh':
# ./installServerAPISYNC.sh
Once the installation is completed, it should be verified that the services are running:
# service serverAPISYNC status