Summary

This page is outdated and will be updated soon. If you are an adept and agile programmer, have a debian system up and running and ready to test it out on, lets go!

Step One

Setup your Apache / PHP / DB environment properly. Here's what I use: * Apache 2+ * MySQL 5+ * PHP5+ - installed into /usr/local/php5/

apt-get install libapache2-mod-php5 php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-dev php5-gd php5-mysql php5-xmlrpc php5-xsl mysql-server apache2 

Step Two

Install Nexista into /usr/share/php/nexista/. You can install it anywhere, but that's where I put it.

cd /usr/share/php/
svn checkout http://www.nexista.org/svn/nexista/trunk/ nexista

OK, now its installed, what next?

Step Three

Build a site! To do so, you need a few files: * Config.xml * Sitemap.xml
* !MyBuild.php

Where do we put these files?===

Let's organize the virtual host directory a little. Depending on how you setup your virtual hosts, your setup may differ. Here's how I do it:

/var/www/www.example.com/
              |
              +-build/ - the sitemap, config, and individual gates are "compiled" here
              | 
              +-conf/ - you can put your conf files in here
              |
              +-htdocs/ - this is the host document root, don't put secret stuff here!
              |
              +-php/ - scripts specific to this host
              |
              +-tmp/ - tmp files, for uploads and cache files
              |
              +-xml/ - xml data files
              |
              +-xsl/ - host specific xsl files

Might seem overwhelming, but let's just focus on the conf and htdocs for now. You put the config.xml and sitemap.xml files into conf/, and mybuild.php into htdocs/.

What do these files contain?

'''config.xml''' This file contains information about your environment, runtime settings, database access credentials, and even some php directives.

'''sitemap.xml''' This file contains information about your website and/or web-application. In a nutshell, it is a map that connects URIs to private resource files or resource files which require processing.

'''mybuild.php''' This file is a small PHP script which will interface with Nexista to load and process the information in the config.xml and sitemap.xml files to build the following: * sitemap.php * a copy of config.xml (more about this later) * a gate-n.php file for each gate mentioned in the sitemap.xml file (gate-0.php, gate-1.php, etc.) * a loader file, commonly called index.php, and usually stored in the host web server document root

So when all is said and done, you will need the following minimal setup to continue:

/var/www/www.example.com/
              |
              +-build/
              | 
              +-conf/
                 |
                 +-config.xml
                 |
                 +-sitemap.xml
              |
              +-htdocs/ 

                 |
                 +-mybuild.php
              |
              +-php/

Why did I leave php/ but remove tmp/, xml/, and xsl/? Because getting started with a php script will be easiest. We'll deal with caching, xsl, databases, and xml later.

For now, just fire up your browser and point it towards your new virtual host. If you have indexes turned on, you should see mybuild.php. Load mybuild.php, and if your directories are writable by the web server, mybuild.php will read the config files and create an index.php file, which will act as the main IO channel for your nexista-powered site.