Skip to content

Install Kyélà native

NoodleBB edited this page Mar 28, 2017 · 11 revisions

Purpose: Install Kyélà native in userspace on a Linux based machine.

Requirements: PHP x.x, xxSQL x.x, Apache x.x

Installation

Basic install

First get into home directory, install composer and symfony

cd ~
curl -LsS https://getcomposer.org/installer | php -- --install-dir=$HOME/bin --filename=composer
curl -LsS https://symfony.com/installer -o $HOME/bin/symfony && chmod a+x $HOME/bin/symfony

Create a new symphony project for Kyélà, change Dir and add web components to the config.

symfony new kyela 2.8
cd kyela
sed -i -e "s#\"config\": {#\"config\": {\n\t\"component-dir\"\: \"web\/components\",#" $HOME/kylea/composer.json

Download and install the Kyélà bundle

composer require "abienvenu/kyela dev-master"

Add the bundle and its depedencies in your AppKernel.php

sed -i -e "s#new AppBundle\\\AppBundle(),#new Symfony\\\Bundle\\\AsseticBundle\\\AsseticBundle(),\n\ \ \ \ \ \ \ \ \ \ \ \ new Abienvenu\\\KyelaBundle\\\KyelaBundle(),\n\ \ \ \ \ \ \ \ \ \ \ \ new AppBundle\\\AppBundle(),#" app/AppKernel.php

Include the route from your app/config/routing.yml

cat <<__EOF__ >> app/config/routing.yml
kyela:
    resource: "@KyelaBundle/Resources/config/routing.yml"
    prefix: /kyela
__EOF__

Include the config from your app/config/config.yml

sed -i -e "s#imports:#imports:\n\ \ \ \ - { resource: "@KyelaBundle/Resources/config/config.yml" }#" app/config/config.yml

Add Kyela to the bundles handled by assetic in app/config/config.yml

cat <<__EOF__ >> app/config/config.yml

# Kyela Bundles
assetic:
    bundles:        [ 'KyelaBundle' ]
    filters:
        cssrewrite: ~
__EOF__

Dump the assets :

app/console assetic:dump

Loading examples

Fixtures are available to automatically load examples (concert and picnic).

Install DoctrineFixturesBundle

composer require "doctrine/doctrine-fixtures-bundle ^2.2"

Register the bundle

sed -i -e "s#new AppBundle\\\AppBundle(),#new Doctrine\\\Bundle\\\FixturesBundle\\\DoctrineFixturesBundle(),\n\ \ \ \ \ \ \ \ \ \ \ \ new AppBundle\\\AppBundle(),#" app/AppKernel.php

Set database connection parameters in app/config/parameters.yml

    database_host: 127.0.0.1
    database_port: YOUR_PORT
    database_name: symfony
    database_user: YOUR_USER
    database_password: YOUR_PASSWORD

Load the fixtures

php app/console doctrine:schema:create
php app/console doctrine:fixtures:load --append

Run Kyélà

Start the app server

php app/console server:start

Control

Stop the app server

php app/console server:stop

Stop the app server listening on a different port

php app/console server:start 127.0.0.1:61234

Stop the app server listening on a different port

php app/console server:stop 127.0.0.1:61234

To be continued...

Clone this wiki locally