Howto Set up your own Google wave sever on Ubuntu?
PyGoWave Server | Google wave server needs the following :
Python 2.6.1
Django 1.0.2
Orbited 0.7.7
RabbitMQ 1.6.0
Python libraries
lxml 2.2
PIL 1.1.6
carrot 0.5.0
Optional:
django-rosetta 0.4.0
JavaScript libraries:
MooTools 1.2
MochaUI 0.9.5
Get the dependencies :
sudo apt-get install python-mysqldb
sudo easy_install carrot
easy_install --find-links http://www.pythonware.com/products/pil/ Imaging
sudo apt-get install mercurial
Get Python : sudo apt-get install python
Get Django :
svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django
ln -s `pwd`/django-trunk/django/bin/django-admin.py /usr/local/bin
Get Orbited :
sudo apt-get install python-twisted
svn checkout http://orbited.org/svn/orbited/trunk/ [path]
python setup.py install
Get RabbitMQ:
sudo nano /etc/apt/sources.list
#Add these lines below
deb http://www.rabbitmq.com/debian/ testing main
#close and exit
# Get the keys
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
#Update and install
sudo apt-get update
sudo apt-get install rabbitmq-server
Install Apache2 and mod_python :
sudo apt-get install apache2 libapache2-mod-python
sudo /etc/init.d/apache2 -k restart
Database part:
Mysql:
mysql -u root -p
CREATE DATABASE `pygowave`;
CREATE USER 'pygowave'@'localhost' IDENTIFIED BY 'pygowave';
GRANT ALL PRIVILEGES ON `pygowave`.* TO 'pygowave'@'localhost' WITH GRANT OPTION;
Apache2:
{Sample file settings is be described below as per the GoogCode}
#The file you need to edit is apache2.conf
sudo gedit /etc/apache2/apache2.conf
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonOption django.root /pygowave
PythonDebug On
PythonInterpreter pygowave_django
PythonPath "['/srv/http/pygowave_project'] + sys.path"
Alias /pygowave/media /srv/http/pygowave_project/media
SetHandler None
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
ProxyRequests Off
ProxyPass /static http://localhost:9000/static
ProxyPass /tcp http://localhost:9000/tcp
To enable images and styles in Django's admin interface you might also need the following lines:
Alias /admin/media /usr/lib/python2.6/site-packages/django/contrib/admin/media
Order allow,deny
Allow from all
SetHandler None
Orbit :
{Need to edit /etc/orbited.cfg}
sudo nano /etc/orbited.cfg
#Add the line below
[global]
reactor=epoll
pid.location=/var/run/orbited.pid
user=http
group=http
proxy.enabled=1
[listen]
http://localhost:9000
[access]
* -> localhost:61613
[logging]
debug=SCREEN,/var/orbited/debug.log
info=SCREEN,/var/orbited/info.log
access=SCREEN,/var/orbited/info.log
warn=SCREEN,/var/orbited/error.log
error=SCREEN,/var/orbited/error.log
enabled.default=info,access,warn,error
[loggers]
Daemon=info,access,warn,error
TCPConnection=info,access,warn,error
Change "user=" and "group=" to your Apache's user and group. This is "apache2" on some systems.
RabbitMQ :
hg clone -r rabbitmq_v1_6_0 http://hg.rabbitmq.com/rabbitmq-stomp
cd rabbitmq-stomp
make RABBIT_SERVER_INCLUDE_DIR=/usr/lib/erlang/lib/rabbitmq_server-1.6.0/include
mkdir -p /usr/lib/erlang/lib/rabbitmq-stomp
cp -R * /usr/lib/erlang/lib/rabbitmq-stomp
sudo nano /etc/rabbitmq/rabbitmq.conf
#Add the lines below
NODENAME=rabbit
NODE_IP_ADDRESS=0.0.0.0
NODE_PORT=5672
LOG_BASE=/var/log/rabbitmq
MNESIA_BASE=/var/lib/rabbitmq/mnesia
SERVER_START_ARGS='
-pa /usr/lib/erlang/lib/rabbitmq-stomp/ebin
-rabbit
stomp_listeners [{"0.0.0.0",61613}]
extra_startup_steps [{"STOMP-listeners",rabbit_stomp,kickstart,[]}]'
#Now restart your rabbit server sudo rabbitmq-server if no error then the configuration is fine
#Set persimossions, add user and change password
rabbitmqctl change_password guest $RANDOM$RANDOM$RANDOM
rabbitmqctl add_user pygowave_client pygowave_client
rabbitmqctl add_user pygowave_server pygowave_server
rabbitmqctl set_permissions pygowave_client '^[^.]+\.[^.]+\.waveop$|^wavelet.direct$' '^[^.]+\.[^.]+\.(waveop|clientop)$|^wavelet.topic$' '^[^.]+\.[^.]+\.(clientop|waveop)$|^wavelet.direct$'
rabbitmqctl set_permissions pygowave_server '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.(topic|direct)$' '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.direct$' '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.(topic|direct)$'
Get PGW :
sudo mkdir -p /srv/http/
cd /srv/http
svn checkout http://pygowave-server.googlecode.com/svn/tags/alpha_0.3 pygowave_project
#Change the settings as per your DB
sudo nano settings.py
python manage.py syncdb
chown http media/gadgets media/avatars pygowave_client/cache locale pygowave_client/locale
Start up Orbited, RabbitMQ and Apache.
./launch-pygowave-rpc
That's it !! PyGoWave Server at http://localhost/pygowave.
Recent blog posts
- watir-webdriver web inspector
- gem list to gemfile
- Packing ruby2.0 on debian.
- Made it into The Guinness Book!
- to_h in ruby 2.0
- Filter elements by pattern jQuery.
- Better HTML password fields for mobile ?
- Grayscale image when user offline
- nth-child CSS pseudo-class Christmas colors
- EventEmitter in nodejs