Dashboard > ringside > ... > Download > Develop and Run from SVN checkout
Develop and Run from SVN checkout Log In | Sign Up   View a printable version of the current page.

Goal

Follow the steps on this page to install Ringside's required components (Apache/PHP/MySQL) along with the latest source code in order to be able to develop in Eclipse and, without any cyclical deployment command needed, see your changes immediately in the browser.

This page is typically for those developers who have a need to work in and change core Ringside server code, but do not have their own Apache/PHP/MySQL servers separately installed. If you already have your own Apache, PHP, and/or MySQL installations, you should go to Advanced Developer Setup.
If you are only interested in writing applications that are deployed and run inside a Ringside Social Application Server, you normally do not need to follow the instructions on this page. To get up and running faster, you can simply use the Ringside Installer.

Ringside Installer

First, download and install the Ringside distribution using the Ringside Installer. This will install and preconfigure the following components:

  • PHP 5.2.X
  • MySQL 5.x
  • Apache Web Server 2.x
    If you already have these components installed or you want to install them yourself, then you might want to follow the instructions found on the Advanced Developer Setup page instead of the instructions on this page.

    We will call the directory where you installed Ringside <install-dir>.

Checkout Ringside Source

Once you've installed the distribution, you will have a running Ringside Server. Now you can checkout the latest source code which we will later integrate into the installed Ringside Server so it runs with that code, as opposed to the code that was installed by the installer.

You can use your browser to view the SVN repository here: http://ringside.svn.sourceforge.net/viewvc/ringside/
  1. Open a command prompt and cd to the directory where you want the Ringside sources to live, for example:
    cd ~/projects
    
  2. Use svn co to checkout the code onto your box
    • Anonymous users can checkout trunk from the read-only SVN repository:
      svn co https://ringside.svn.sourceforge.net/svnroot/ringside ringside
      
      After checking out the source code, you will have a directory "ringside" containing the full source tree of the project. We will call this "ringside" source code directory <project-root-dir>.

Integrate Project Source into Installed Server

  1. In <install-dir>/php/php.ini, you will need to alter the value of include_path so it refers to code found in your SVN working copy, not the installed code. For example, change this:
    include_path = ".;<install-dir>\php\PEAR;<install-dir>\apps\ringside\includes"
    

    to:

    include_path = ".;<install-dir>\php\PEAR;<project-root-dir>"
    

    The above example uses Windows paths - for UNIX users, just replace the semicolons/backslashes with colons/forward slashes respectively.

  2. Build LocalSettings.php and ringside.conf#* From a command line shell, cd into <project-root-dir>/build
    • Make a copy of build.properties and call it build.local.properties
    • Edit build.local.properties to customize it for your own development environment.
      build.local.properties contains settings used by the phing build system. You need to customize it for your own development environment. The settings of importance include:
      • db.type: the type of database you are using; e.g. mysql
      • db.server: the server hostname where your database is running; this can optionally include a port number in the format hostname:port (e.g. "127.0.0.1:3306")
      • db.name: the database name to use; e.g. the MySQL schema
      • db.user: the database username used when connecting to the database
      • db.password: the database password used when connecting to the database
      • social.key and social.secret should be set to your network keys
      • [space].root (where [space] is "web", "demo" and "api") should each be set as commented in the properties file for a SVN development scenario.
      • Umcomment the [space].root lines in the section labelled "root path for a SVN working copy deployments"

      NOTE If you are unsure what some of these values should be (specifically the DB settings and the social key/secret strings), check the values that your installer used by examining the installer's LocalSettings.php file which is found in the directory <install-dir>/apps/ringside/includes.

  3. Now run phing to produce your development Ringside build
    • phing -f build-dev.xml
    • This creates two files in your <project-root-dir>:
      • ringside.conf - configuration file for Apache
      • LocalSettings.php - a file included in many of Ringside's .php files to setup common properties
        You should look at your generated LocalSettings.php file. There are a lot of configuration information set in this file and you should be aware of the things it sets for you.
  4. Configure the installed Apache (located at <install-dir>/apache2) to run your Ringside code.
    • Open your Apache's <project-root-dir>/apache2/conf/httpd.conf file in your favorite editor
    • Comment out the installer's configuration file
      #Include "<install-dir>/apps/ringside/conf/ringside.conf"
      
    • Add the following line to the end of it:
      Include "<project-root-dir>/ringside.conf"
      

See Ringside Run!

  1. Restart your Apache Web Server to pick up the changes you made to httpd.conf
  2. You are now ready to run Ringside!
    • http://localhost/web/index.php
      If you reconfigured Apache to listen on a port that is different from the default of 80, make sure your URLs reflect your custom port. By default, the installer will configure Apache to listen to port 80.

Eclipse

Now that you have integrated your local working copy of the Ringside code, you can setup Eclipse to get yourself a nice development environment.

In addition, you can setup Eclipse debugging to get XDebug installed and configured so you can use Eclipse to debug the Ringside server.

Added by Richard Friedman , last edited by Richard Friedman on Jul 20, 2008  (view change)
Labels: 
(None)