Linux installation

przemyslawlis edited this page May 30, 2018 · 36 revisions

This installation method is now retired, not supported and it’s not recommended to use it anymore. Guide below is outdated and will it will stay like that. Please use docker-compose Installation guide for currently recommended installation method.

Requirements:

  • PHP v5.4+
    • ctype needs to be enabled
    • extensions:
      • curl
      • json
      • posix
      • sockets
      • xml
    • php.ini needs to have the date.timezone setting set
  • MySQL v5+
  • R v3+ (all R packages should be installed as a root user)
    • rjson package
    • jsonlite package
    • RMySQL package (will require libmysqlclient-dev apt package)
    • session package
    • catR (required for starter content to work)
    • digest (required for starter content to work)
    • ggplot2 (required for starter content to work)
    • base64enc (required for starter content to work)
  • Apache v2+
    • mod rewrite

Installation steps:

The installation below will be based on following assumptions:

  • OS: Ubuntu 16.04
  • web server: Apache
  • database server: MySQL
  • installation path: /var/www/vhosts/concerto

Commands that are not prefixed with sudo should not be run with elevated privileges/as a super user.

  1. Install apt packages:
    sudo apt-get -y install mysql-server libmysqlclient-dev apache2 r-base r-base-dev git curl npm libapache2-mod-php7.0 php7.0 php7.0-mysql php-xml
  2. Copy Concerto Platform source files into your vhost root directory either by:
    • Downloading ziped Concerto Platform source package and extracting it
    • or cloning git repository:
      git clone https://github.com/campsych/concerto-platform.git /var/www/vhosts/concerto
  3. Set up your vhost
    • change your vhost document root to: /var/www/vhosts/concerto/web:
      DocumentRoot /var/www/vhosts/concerto/web
    • make sure that your Directory directive contains AllowOverride All:
      <Directory /var/www/vhosts/concerto/web>
         AllowOverride All
      </Directory>
    • restart Apache server
      service apache2 restart
  4. Create database named concerto:
    • mysql -uroot -proot -e "CREATE DATABASE concerto CHARACTER SET utf8 COLLATE utf8_general_ci"
      Remember to replace MySQL user and password above with proper values.
  5. Edit configuration files:
    • copy config files:
      cp /var/www/vhosts/concerto/app/config/parameters.yml.dist /var/www/vhosts/concerto/app/config/parameters.yml
      cp /var/www/vhosts/concerto/app/config/parameters_nodes.yml.dist /var/www/vhosts/concerto/app/config/parameters_nodes.yml
      cp /var/www/vhosts/concerto/app/config/parameters_test_runner.yml.dist /var/www/vhosts/concerto/app/config/parameters_test_runner.yml
      cp /var/www/vhosts/concerto/app/config/parameters_uio.yml.dist /var/www/vhosts/concerto/app/config/parameters_uio.yml
    • edit newly created files above, usually editing just parameters.yml and setting values of settings below should be enough:
      database_name: concerto
      database_user: root
      database_password: root
      Remember to replace MySQL user and password above with proper values.
  6. Install PHP dependencies
    • change directory to your installation path:
      cd /var/www/vhosts/concerto
    • install composer:
      curl -s http://getcomposer.org/installer | php
    • install PHP dependencies
      php -dmemory_limit=1G composer.phar install --no-interaction
  7. Install js dependencies
    • install npm
      sudo apt-get install npm
    • install bower
      sudo npm install -g bower
      sudo ln -s /usr/bin/nodejs /usr/bin/node
    • install js dependencies
      cd /var/www/vhosts/concerto/src/Concerto/PanelBundle/Resources/public/angularjs
      bower install
      cd /var/www/vhosts/concerto/src/Concerto/TestBundle/Resources/public/angularjs
      bower install
  8. Install Concerto R package
    cd /var/www/vhosts/concerto/src/Concerto/TestBundle/Resources/R
    sudo R CMD INSTALL concerto5
  9. Check Symfony requirements (PHP framework)
    • run check script and perform any recommended actions
      php /var/www/vhosts/concerto/app/check.php
  10. Final Concerto setup:
    cd /var/www/vhosts/concerto
    php app/console concerto:setup
    php app/console concerto:r:cache

    concerto:setup command above will create some directories and files that will be owned by the user that run the command. These directories and files need to be writable by whatever web user you’ll be using. If your web user is, for example, www-data and you didn’t run the command as this user, you should make sure that all the files in your Concerto Platform installation directory are owned by your web user. You can do that with following command:
    sudo chown -R www-data:www-data /var/www/vhosts/concerto

    where www-data should be replaced with your web user and /var/www/vhosts/concerto should be replaced with your installation path.
  11. Starter content:
    This gives you access to the nodes and wizards we’ve already created e.g. CAT node. It’s technically optional if you want to create all of your own content from scratch, but we highly recommend it.
    Import example content by running:
    cd /var/www/vhosts/concerto
    php app/console concerto:content:import --convert

Launching Concerto Platform

To log in into Concerto Platform panel go to: http://yourdomain.com/admin
Default login: admin
Default password: admin

You should change your admin password immediately after logging in.