Installation

Note

New Narratives doesn’t use labeled or numbered releases. The code in the master branch of the repository should be runnable.

Make sure the requirements are satisfied.

The New Narratives application is based on Symfony 3.2. Installation follows the normal process for installing a Symfony application.

  1. Get the code from GitHub.

git clone https://github.com/sfu-dhil/btd.git
  1. Get the submodules from Git. There is quite a bit of reusable code in the application, and it’s organized with git submodules.

git submodule init
git submodule update --recursive --remote
  1. Create a database and database user.

create database btd;
grant all on btd.* to btd@localhost;
set password for btd@localhost = password('hotpockets');
  1. Install composer if it isn’t already installed somewhere.

  2. Install the composer dependencies. Composer will ask for some configuration variables during installation.

./vendor/bin/composer install --no-dev -o

Sometimes composer runs out of memory. If that happens, try this alternate.

php -d memory_limit=-1 ./vendor/bin/composer install --no-dev -o
  1. Update file permissions. The user running the web server must be able to write to var/cache/* and var/logs/* and var/sessions/*. The symfony docs provide recommended commands depending on your OS.

  2. Load the schema into the database. This is done with the symfony console.

./bin/console doctrine:schema:update --force
  1. Create an application user with full admin privileges. This is also done with the symfony console.

./bin/console fos:user:create --super-admin
  1. Install bower, npm, and nodejs if you haven’t already. Then use bower to download and install the javascript and css dependencies.

bower install
  1. Download and install CkEditor. It is a nice GUI editor for web content. It isn’t redistributable itself, so must be downloaded separately.

./bin/console ckeditor:install
./bin/console assets:install web --symlink
  1. Configure the web server. The application’s web/ directory must be accessible to the world. Symfony provides example configurations for most server setups.

  2. The documentation module should be built seperately. You need the Sphinx to be already installed. Check the DHIL Documentation Guide for more information.

Navigate to the ‘newn/docs’ directory in the command line and type:

make html
  1. Start the web server you are using. A quick way to run the application is by using the built-in php server.

Note

I’ve you’ve configured Apache to run the site, this step isn’t necessary. Visit http://localhost/path/to/app_dev.php.

php bin/console server:start

Go to the localhost:8000 in your browser.

At this point, the web interface should be up and running, and you should be able to login by following the Login link in the top right menu bar.

That should be it.