Setting Up Shindig On Windows

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Setting up Shindig on Windows

This guide will walk you through the steps to get Shindig up and running on windows.

Installing 'WAMP'

The WAMP stack stands for apache, mysql and php on windows, and is required for running Shindig. In this guide I'll use an easy
to run and configure free (GPL) stack called 'wampserver'.
First download the wampserver from: http://www.en.wampserver.com/ and install it on your system using the default settings

Configuring Apache and PHP extensions

Once the wampserver is install and running, it's time to configure the modules that Shindig requires, once the wampserver is
started you will have a new icon in your icon tray (bottom right of your screen) and by LEFT clicking it you will get various
options to configure it.
For Shindig we need a couple of things, first you need to enable mod_rewrite support for apache, so go to the Apache ->
Apache Modules option, and click on the 'rewrite_module' option to enable it.
* Note: on my computer it did enable the module on clicking it, but it did not put a check before it when I did. This is rather
confusing and probably a bug in the wampserver... however it works just fine so if you have the same happen to you, just ignore the
fact that it's not 'checked', it will show up once we restart the server.
Next we need to configure the correct PHP extensions that Shindig requires, you can do this through the PHP -> PHP Extensions
menu and you enable extensions by clicking them, just like we did for apache.
The required extensions are:

• json
• mcrypt
• simplexml
• libxml
• curl
• openssl
• mysqli (this one is for Partuza, not for Shindig, but go ahead and check it now so that's already done)

If an extension isn't checked (like mcrypt which is off by default) click it... and like the apache module, sometimes the check
doesn't show up right away ... it's safe to ignore this and assume it worked.

Setting up Tortoise SVN

Next we need a SVN client to check out the source code to Shindig, Tortoise is a nice graphical interface for this so that's what
we'll be using. Download it from http://tortoisesvn.tigris.org/
You will need Tortoise SVN to check out (“download”) the code from the shindig and partuza repositories.
Once you have downloaded, installed and restarted your computer. You are now ready to check out code.

Checking out the code

Once we're back, we'll check out the source code of Shindig. First go to the web root directory (c:\wamp\www) and create a
shindig directory.
Go into the shindig folder, right click and select SVN Checkout (this is the menu tortoise added).
In the following dialog enter the location of the SVN repository http://svn.apache.org/repos/asf/incubator/shindig/trunk/ as
follows:
When you click OK the above interface will change and start downloading the code. Once the download is done, you should
have a shindig directory that looks like this:

Configuring Apache for Shindig

First locate your apache configuration file (which is called httpd.conf), this will be in c:\wamp\bin\apache\apache2.2.8\conf. We
want to configure 'virtual hosts' on our installation since we need a shindig server on one 'domain' and later on in the next guide
we want partuza on another domain name. This is required for the cross domain security model of your browser to work, which
is the basis of the security model of open social gadgets. We'll also add a 'localhost' domain as the first entry so that
http://localhost keeps working as expected (for the wampserver entry screen, phpadmin, etc). Remember that the first entry in
your virtual host configuration will also be the default host if the host name isn't recognized, so please keep to the order as you
see them in this guide.
Open the file, scroll to the end and locate the section that reads #Include conf/extra/httpd-vhosts.conf, and remove the # before
the Include as such:
The go into the extra folder, and open the httpd-vhosts.conf file:
Edit this file, remove the 2 example vhost configurations (they don't work) and add the following 2 entries (for the localhost and
shindig virtual hosts)
Next we need to let windows know about the 'shindig' host name, you do this by editing
c:\WINDOWS\system32\drivers\etc\hosts and adding the following lines as shown below:

After this is done, restart your wamp server through the tray icon: left click it, and select 'Restart All Services'.

Testing it

Point your browser to http://shindig/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml


And you should see the todo gadget being rendered; This means shindig is now fully up and running on you computer

Setting up Partuza on windows


In this guide I'll assume you have just finished the 'Setting up Shindig on windows' and will be using the same programs for
setting up Partuza.

Getting the source code

First we'll create a partuza directory in our web root (c:\wamp\www)


Go into the just created partuza directory, right click and select SVN Checkout, and enter
http://partuza.googlecode.com/svn/trunk/ in the following dialog. Check out the partuza code from the repository as we did for
the shindig code.
Press ok, and wait for the checkout to complete, and close the dialog by pressing ok.

Setting up the database

Partuza is a 'real' social network site that uses MySql as its data storage, so we need to setup a database. The easiest way to do
this is through the phpMyAdmin front-end that came with wampserver, to get there navigate your web browser to
http://localhost/phpmyadmin and you should see the following web page.
Select 'Databases' from the menu's in the center, and in the following screen enter 'partuza' as the database name.
Select the partuza database in the left menu, and click the 'import' tab
Select the partuza.sql file that is located in the downloaded partuza files.
And select 'GO', you should get the following screen letting you know that the import was successfull (notice the tables that
now show up on the left hand side):
Configuring Apache for Partuza

Now we need to tell the apache server about our new site, first of all edit your hosts file to create the 'partuza' domain name,
this file is located in C:\WINDOWS\system32\drivers\etc\hosts. Add 'partuza' to the line where you added shindig in the previous
guide. Just like we edited hosts to add shindig as a local domain.
As we are doing this we also need to reflect these changes to our local server by editing the httpd-vhosts.conf file and creating a
virtual host for partuza like we did for shindig.
Partuza uses a couple of php short tags in it's templates (something that will be fixed in the future), so to make this work on
windows we need to edit the php.ini file and enable them. You can do this by left clicking on the tray icon and selecting PHP ->
php.ini
Go to the section that has short_open_tag and change 'Off' to 'On', and also change the asp_tags to 'On'.
After this you should restart your wampserver to apply our changes by left clicking its tray icon and selecting 'Restart All
Services'.

Setting up Shindig for Partuza

Note: this section has changed from the original version to include the new configuration & service adapter systems
To configure Shindig to use Partuza's handlers, navigate to your c:\wamp\www\shindig\php\config directory and create a new
file: 'local.php'. In this file put the following content:
<?php
$shindigConfig = array(
'person_service' => 'PartuzaService',
'activity_service' => 'PartuzaService',
'app_data_service' => 'PartuzaService',
'messages_service' => 'PartuzaService',
'oauth_lookup_service' => 'PartuzaOAuthLookupService',
'extension_class_paths' => 'c:\wamp\www\partuza\Shindig'
);
This tells shindig to scan for custom classes in the "c:\wamp\www\partuza\Shindig" directory, and to use the Partuza*Service
classes to retrieve and store the social information.

Trying out Partuza

To try out partuza go to http://partuza/ and click the 'register' link in the top navigation bar, and enter your information (i used
mine as an example, please use your own :-))
After this you get to your profile edit screen, and you can navigate to your profile page by clicking on (still anonymous)
thumbnail picture, or selecting 'profile' in the top menu:
As you can see you now have a working profile page, however to make this more interesting we need to add some gadgets! So
select 'edit' next to the word 'Applications' in the left navigation, and we'll first enter our todo gadget:
http://www.labpixies.com/campaigns/todo/todo.xml in the text box, and click 'Add Application' to add it to your profile.
You should then see something like this, your first gadget!
Next you could add the horoscope gadget we also use a lot in examples, by clicking edit next to applications again and entering
http://www.google.com/ig/modules/horoscope.xml
There you go, now you have 2 gadgets on your profile page!
If more people register on your partuza site, you can find them through the search box at the top right, and you can become
friends by clicking the 'add friend' menu option in the search result screen. Also it will be more interesting if you upload actual
profile pictures in the profile editing screen (click edit next to your name).

Have fun exploring!

For more help & discussions about Partuza, see our mailing list at http://groups.google.com/group/partuza and the project page
at http://code.google.com/p/partuza/
Note: If you want signed requests to work (which you do at some point), make sure to read shindig/php/certs/README on how
to generate a public/private key pair and configuring the pass phrase in shindig's configuration.

You might also like