This tutorial gives the steps needed to install the SNAC server in a user's home directory, mainly provided for testing and development purposes. Eventually this install will be deprecated in favor of a PHP Composer auto-install.
-
Check out a copy of the repository in a local folder,
git clone [email protected]:snac/snac.git
-
Ensure that Apache's config allows user directories (/~userid) and is set to allow PUT requests (in the
Require
directive) -
Symbolic link the
src/virtualhosts
directory into your/home/userid/public_html
directory. For example, this could be done with a command similar to the following:ln -s /home/userid/pathtosnac/src/virtualhosts /home/userid/public_html/snac
-
Copy the
src/snac/Config_dist.php
file tosrc/snac/Config.php
and update theINTERNAL_SERVERURL
to correctly point to the local copy of the internal server codebase. For example,public static $INTERNAL_SERVERURL = "http://localhost/~userid/snac/internal/";
-
Install PHP Composer and dependencies
- Download and install Composer according to the instructions at http://getcomposer.org
- Install global dependencies by running
php composer.phar global require "fxp/composer-asset-plugin:~1.1"
- Install snac dependences by running
php composer.phar install
-
That's it! If configured correctly, you can access your local snac server, where
webserver.com
is the URL of your server, at:- Backend server at
http://webserver.com/~userid/snac/internal
- Web server at
http://webserver.com/~userid/snac/www
- REST server at
http://webserver.com/~userid/snac/rest
- Backend server at