Installing Orbited on Windows ¶
Orbited is written in Python and requires Python 2.5 or newer (for a workaround for <2.5, see ticket #24 and this discussion). Orbited also requires Twisted, which it installs automatically on most platforms (and is otherwise installed trivially). Additionally, from 0.5 and onwards Orbited enables a revolutionary interaction model centered around the TCPSocket.
Python ¶
- First of all, let's install Python. Download and run the installer.
- In order to call Python and Python scripts from the command line without specifying the directory every time, you have to add 2 directories to the Windows path list. In Windows XP/2000 you go to System Properties-->Advanced-->Environment Variables, and in the System Variables section scroll down to "Path" and click edit. There will be a list of directories separated by semicolons in the Variable Value Field. Add the the directory where you installed Python as well as the Python scripts directory to this list using semicolon separators and click OK. Example:
Before:
%SystemRoot%/system32;%SystemRoot%;
After:
%SystemRoot%/system32;%SystemRoot%;C:/Python25;C:/Python25/scripts
Twisted ¶
Twisted is a dependency of Orbited 0.6. Installers are available on their website.
Orbited ¶
There are two ways to install Orbited itself: from an official release and from the development version.
Installing an Official Release ¶
Although it is not required, setuptools is by far the easiest way to get an official release of Orbited running.
1. Download ez_setup.py
2. Go to a command line, navigate to the directory containing ez_setup.py, and type:
python ez_setup.py setuptools
Then, to install orbited, go to a command line and type:
easy_install orbited
The configuration file for 0.6 is located at /trunk/daemon/orbited.cfg The configuration file must be downloaded separately from SVN and placed in the following directory, which you should create:
/Program Files/Orbited/etc/
Installing the Development Version ¶
The first step is to checkout the development version from the repository using svn:
svn checkout http://orbited.org/svn/orbited/trunk/ [path]
Export the folder to a new folder. This is necessary because of an issue with Orbited and setuptools. If you don't do this the install will fail with the error nameerror: global name 'log' is undefined.
svn export [SVN DIRECTORY] [TARGET DIRECTORY]
Then run the following command from the directory you checked out Orbited to:
python setup.py install
The configuration file orbited.cfg in the main checkout directory needs to be copied to /Program Files/Orbited/etc/
Verify the Installation Works ¶
To make sure the installation was successful, run this simple test:
Enter your Python interpreter:
python
See whether Orbited loads:
import orbited
If you don't see an error, the installation worked! Now you can run Orbited by exiting the Python interpreter and typing orbited (see Deployment for more details). Check out the demos and tests by going to http://localhost:8000/static (replace localhost with a different address if necessary). Orbited can be configured by editing the orbited.cfg file.
Post-Installation Notes ¶
Orbited encodes data as JSON, using a library called demjson. If you are looking for ways to speed up your project, try installing a super-fast C-based JSON library such as cjson or simplejson. Remember easy_install? It works here, too:
easy_install cjson
or
easy_install simplejson
Orbited is installed, and you're ready to build fast, scalable, cutting-edge network applications for the web. Congratulations!