Installation Symfony2

De SOS Paris
Aller à : navigation, rechercher


Cette procédure a été appliquée sur un RaspeBerry Pi 3.

Installation Symfony2

Pré-requis

php -v
PHP 5.6.27-0+deb8u1 (cli) (built: Oct 24 2016 18:22:27) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
   with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


Compte Unix

pi@PiStorms01:/ $

sudo adduser arii
Ajout de l'utilisateur « arii » ...
Ajout du nouveau groupe « arii » (1001) ...
Ajout du nouvel utilisateur « arii » (1001) avec le groupe « arii » ...
Création du répertoire personnel « /home/arii »...
Copie des fichiers depuis « /etc/skel »...
Entrez le nouveau mot de passe UNIX : 
Retapez le nouveau mot de passe UNIX : 
passwd : le mot de passe a été mis à jour avec succès
Modification des informations relatives à l'utilisateur arii
Entrez la nouvelle valeur ou « Entrée » pour conserver la valeur proposée
       Nom complet []: 
       N° de bureau []: 
       Téléphone professionnel []: 
       Téléphone personnel []: 
       Autre []: 
Cette information est-elle correcte ? [O/n]O
spi@PiStorms01:/ $udo su - arii

MariaDB

sudo apt-get install mariadb-server

compte root/root

PHPMyAdmin

sudo apt-get install phpmyadmin

http://192.168.100.27/phpmyadmin/

Creation d'un user

Composer

su - www-data

 cd /tmp

arii@PiStorms01:/tmp $ curl -s https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading 1.2.2...

Composer successfully installed to: /tmp/composer.phar
Use it: php composer.phar



arii@PiStorms01:/tmp $ /tmp/composer.phar create-project symfony/framework-standard-edition /home/arii/Symfony
Installing symfony/framework-standard-edition (v3.1.6)
  - Installing symfony/framework-standard-edition (v3.1.6)
    Downloading: 100%         

Created project in /home/arii/Symfony
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing doctrine/lexer (v1.0.1)
    Downloading: 100%         

  - Installing doctrine/annotations (v1.2.7)
    Downloading: 100%         

  - Installing twig/twig (v1.27.0)
    Downloading: 100%         

  - Installing symfony/polyfill-util (v1.2.0)
    Downloading: 100%         

  - Installing paragonie/random_compat (v2.0.3)
    Downloading: 100%         

  - Installing symfony/polyfill-php70 (v1.2.0)
    Downloading: 100%         

  - Installing symfony/polyfill-php56 (v1.2.0)
    Downloading: 100%         

  - Installing symfony/polyfill-mbstring (v1.2.0)
    Downloading: 100%         

  - Installing symfony/symfony (v3.1.6)
    Downloading: 100%         

  - Installing symfony/polyfill-intl-icu (v1.2.0)
    Downloading: 100%         

  - Installing psr/log (1.0.2)
    Downloading: 100%         - Installing psr/cache (1.0.1)
    Downloading: 100%         

  - Installing doctrine/inflector (v1.1.0)
    Downloading: 100%         

  - Installing doctrine/collections (v1.3.0)
    Downloading: 100%         

  - Installing doctrine/cache (v1.6.0)
    Downloading: 100%         

  - Installing doctrine/common (v2.6.1)
    Downloading: 100%         

  - Installing jdorn/sql-formatter (v1.2.17)
    Downloading: 100%         

  - Installing doctrine/doctrine-cache-bundle (1.3.0)
    Downloading: 100%         

  - Installing doctrine/dbal (v2.5.5)
    Downloading: 100%         

  - Installing doctrine/doctrine-bundle (1.6.4)
    Downloading: 100%         

  - Installing doctrine/instantiator (1.0.5)
    Downloading: 100%         

  - Installing doctrine/orm (v2.5.5)
    Downloading: 100%         

  - Installing incenteev/composer-parameter-handler (v2.1.2)
    Downloading: 100%         

  - Installing sensiolabs/security-checker (v4.0.0)
    Downloading: 100%         

  - Installing sensio/distribution-bundle (v5.0.13)
    Downloading: 100%         

  - Installing sensio/framework-extra-bundle (v3.0.16)
    Downloading: 100%         

  - Installing monolog/monolog (1.21.0)
    Downloading: 100%         

  - Installing symfony/monolog-bundle (2.11.1)
    Downloading: 100%         

  - Installing symfony/polyfill-apcu (v1.2.0)
    Downloading: 100%         

    - Installing swiftmailer/swiftmailer (v5.4.3)
    Downloading: 100%         

  - Installing symfony/swiftmailer-bundle (v2.3.11)
    Downloading: 100%         

  - Installing sensio/generator-bundle (v3.0.11)
    Downloading: 100%         

  - Installing symfony/phpunit-bridge (v3.1.6)
    Downloading: 100%         

paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/polyfill-intl-icu suggests installing ext-intl (For best performance)
doctrine/doctrine-cache-bundle suggests installing symfony/security-acl (For using this bundle to cache ACLs)
sensio/framework-extra-bundle suggests installing symfony/psr-http-message-bridge (To use the PSR-7 converters)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.

database_host (127.0.0.1): 
database_host (127.0.0.1): 
database_port (null): 
database_name (symfony): arii
database_user (root): arii
database_password (null): arii
mailer_transport (smtp): 
mailer_host (127.0.0.1): 
mailer_user (null): 
mailer_password (null): 
secret (ThisTokenIsNotSoSecretChangeIt): 
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

 // Clearing the cache for the dev environment with debug true                                                          

                                                                                                                        
 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.                                            
                                                                                                                        

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets

 Trying to install assets as relative symbolic links.

 --- ----------------- ------------------ 
      Bundle            Method / Error    
 --- ----------------- ------------------ 
  ✔   FrameworkBundle   relative symlink  
 --- ----------------- ------------------ 

                                                                                                                        
 [OK] All assets were successfully installed.                                                                           
                                                                                                                        

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget



$ /tmp/composer.phar create-project symfony/framework-standard-edition /home/arii/Symfony_gpl 2.6.0
Installing symfony/framework-standard-edition (v2.6.0)
  - Installing symfony/framework-standard-edition (v2.6.0)
    Downloading: 100%

Created project in /home/arii/Symfony_gpl
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing doctrine/lexer (v1.0.1)
    Downloading: 100%

  - Installing doctrine/annotations (v1.2.3)
    Downloading: 100%

  - Installing twig/twig (v1.18.0)
    Downloading: 100%

  - Installing doctrine/collections (v1.2)
    Downloading: 100%

  - Installing doctrine/cache (v1.4.0)
    Downloading: 100%

  - Installing doctrine/inflector (v1.0.1)
    Downloading: 100%

  - Installing doctrine/common (v2.4.2)
    Downloading: 100%

  - Installing psr/log (1.0.0)
    Downloading: 100%

  - Installing symfony/symfony (2.6.x-dev 5af363d)
    Cloning 5af363dc5e960d1e87e65a58091526b5400c8852

  - Installing doctrine/dbal (v2.5.1)
    Downloading: 100%

  - Installing doctrine/orm (v2.4.7)
    Downloading: 100%

  - Installing doctrine/doctrine-cache-bundle (v1.0.1)
    Downloading: 100%

  - Installing jdorn/sql-formatter (v1.2.17)
    Downloading: 100%

  - Installing doctrine/doctrine-bundle (v1.3.0)
    Downloading: 100%

  - Installing twig/extensions (v1.2.0)
    Downloading: 100%

  - Installing kriswallsmith/assetic (v1.2.1)
    Downloading: 100%

  - Installing symfony/assetic-bundle (v2.6.1)
    Downloading: 100%

  - Installing swiftmailer/swiftmailer (v5.3.1)
    Downloading: 100%

  - Installing symfony/swiftmailer-bundle (v2.3.8)
    Downloading: 100%

  - Installing monolog/monolog (1.12.0)
    Downloading: 100%

  - Installing symfony/monolog-bundle (v2.7.1)
    Downloading: 100%

  - Installing sensiolabs/security-checker (v2.0.1)
    Downloading: 100%

  - Installing sensio/distribution-bundle (v3.0.16)
    Downloading: 100%

  - Installing sensio/framework-extra-bundle (v3.0.4)
    Downloading: 100%

  - Installing incenteev/composer-parameter-handler (v2.1.0)
    Downloading: 100%

  - Installing sensio/generator-bundle (v2.5.1)
    Downloading: 100%

kriswallsmith/assetic suggests installing leafo/lessphp (Assetic provides the integration with the lessphp LESS compiler)
kriswallsmith/assetic suggests installing leafo/scssphp (Assetic provides the integration with the scssphp SCSS compiler)
kriswallsmith/assetic suggests installing ptachoire/cssembed (Assetic provides the integration with phpcssembed to embed data uris)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provides the integration with the SCSS compass plugin)
kriswallsmith/assetic suggests installing patchwork/jsqueeze (Assetic provides the integration with the JSqueeze JavaScript compressor)
symfony/assetic-bundle suggests installing kriswallsmith/spork (to be able to dump assets in parallel)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
Writing lock file
Generating autoload files

Would you like to install Acme demo bundle? [y/N] N
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_driver (pdo_mysql):
database_host (127.0.0.1):
database_port (null):
database_name (symfony): arii
database_user (root): arii
database_password (null): PASSWORD
mailer_transport (smtp): smtp
mailer_host (127.0.0.1):
mailer_user (null):
mailer_password (null):
locale (en): fr
secret (ThisTokenIsNotSoSecretChangeIt): 10a738be642c1089e7f46a6674455dcc7d
Clearing the cache for the dev environment with debug true
Trying to install assets as symbolic links.
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
The assets were installed using symbolic links.
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
The assets were installed using symbolic links.

 http://gpl.arii.org/config.php

/*
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
    '127.0.0.1',
    '::1',
))) {
    header('HTTP/1.0 403 Forbidden');
    exit('This script is only accessible from localhost.');
}
*/

 http://gpl.arii.org/app_dev.php/_configurator/step/0

/*
if (isset($_SERVER['HTTP_CLIENT_IP'])
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
*/