Skip to content

Installation

alezakos edited this page Jul 13, 2017 · 12 revisions

There are two methods for installing BZiON, a guided method and a manual method. The guided method uses Composer to lead you through all of the manual steps with prompts to that will lead you through database migration and setting up your configuration file.

Guided installation

  1. If you do not have PHP Composer installed, install it

    curl -sS https://getcomposer.org/installer | php
    sudo mv composer.phar /usr/local/bin/composer # Optional - if you don't run this step, you will need to use the path of the new composer.phar file every time you invoke it
  2. Go to the directory where you want to install BZiON

    cd league

  3. Install the required libraries using Composer via the composer.phar file

    composer create-project allejo/bzion --keep-vcs --no-dev .

  4. Make sure that the app and web/assets/imgs/avatars/ directories are writable by you and the web server:

    bash app/setup-acl.sh
  5. Point your web server to the web folder in the BZiON root directory

Manual installation

  1. Clone BZiON and visit its directory if you haven't done that already

    git clone https://github.com/allejo/bzion.git league
    cd league
  2. If you do not have PHP Composer installed, install it

    curl -sS https://getcomposer.org/installer | php
    sudo mv composer.phar /usr/local/bin/composer # Optional - if you don't run this step, you will need to use the path of the new composer.phar file every time you invoke it
  3. Get the git submodules

    git submodule update --init
  4. Get the rest of our dependencies using composer

    composer install --no-dev -o

The --no-dev option tells composer to only install dependencies required for production and ignore debugging, testing, code documentation or any other development-specific packages. -o will optimize PHP class autoloading at the expense of some RAM in order to make server responses faster (~10 ms, saving 12% of the processing time of most requests).

  1. Copy app/config.example.yml to app/config.yml and edit the new file using your favorite editor

    cp app/config.example.yml app/config.yml
    nano app/config.yml
  2. Create a MySQL database using the data defined in the migrations/DATABASE.sql file

  3. Apply the database migrations

    vendor/bin/phinx migrate -e main
  4. Clear the cache for the production environment

    composer clear prod
  5. Initialize the changelog so that you don't see what changed before your installation

    app/console bzion:changes --read -e prod
  6. Make sure that the app and web/assets/imgs/avatars/ directories are writable by you and the web server:

    bash app/setup-acl.sh
  7. Point your web server to the web folder in the BZiON root directory

  8. Make sure that everything works and congratulate yourself for the hard work

    app/console bzion:success -e prod
Clone this wiki locally