Skip to content

Installing Ilios 3 for Development Purposes

sascha benjamin cohen edited this page Feb 3, 2017 · 2 revisions

Prerequisites

  • PHP 5.6+
  • Composer
  • GitHub account

Installation

Get the code

git clone git@github.com:ilios/ilios.git
cd ilios

Run composer

composer install

Install vagrant

A simple way of creating a development instance of the Ilios application is to use the tool Vagrant to create a quick virtual environment.

  1. Go to Vagrantup.com and download and install Vagrant (v1.5.3) onto your local system where you will be installing the development instance of Ilios;

  2. Go to VirtualBox and download and install VirtualBox onto your local system where you will be installing the development instance of Ilios;

  3. Install Git for your machine. You can check if you already have git installed by opening a command line and typing git --version. It should output text similar to git version 1.8.4. If you are more comfortable not using the command line you may want to try Github for Mac or Github for Windows

  4. From the Command Prompt, type the command, vagrant up

  5. Approximately 90 to 130 seconds later, Ilios should be installed. You can access Ilios via browser by going to http://10.10.10.10/.

Set up the database

vagrant ssh

#These steps should be completed on development VM from within the /vagrant folder
cd /vagrant
# get the ilios 2 demo database
wget https://ilios-demo.ucsf.edu/latest_db/ilios_demosite_db.sql.gz
# create a mysql database
mysql -e "CREATE DATABASE ilios"
# add user and password to the database
mysql -e "GRANT ALL ON ilios.* TO ilios_user@localhost IDENTIFIED BY 'ilios_pass';"
# import the demo database
gunzip < ilios_demosite_db.sql.gz | mysql ilios
# run the upgrade script
mysql ilios < app/Resources/updateSchemaFromIlios2toIlios3.sql
# run pending migrations
bin/console doctrine:migrations:migrate
# cleanup
rm ilios_demosite_db.sql.gz