Installation

From DreamFactory
Jump to: navigation, search
DreamFactoryInstallation

DreamFactory is free open source software available under the Apache License 2.0.

DreamFactory runs on Linux, Windows, and Mac OS X.

There are many ways to try out and use DreamFactory. Follow the installation instructions below.

If you use older versions of MySQL (<= 5.5) for your system database some database options may not be supported, e.g., multiple timestamp fields.

New Instructions Available

In an effort to make the manual (GitHub) install process easier we are providing the following system specific instructions

Minimum Requirements

Manual (Github) Installs

For installing the latest version of DreamFactory from source (see Github below), you will need:

  • PHP 5.6 or PHP 7
    • NOTE: PHP 7 is highly recommended over 5.6 for performance enhancements and forward compatibility.
  • The following php modules are also required for basic installation:
    • curl
    • mbstring
    • zip
    • sqlite
    • mongodb
    • Other modules/drivers will be required depending on which databases you intend to use.
  • A web server application
    • Nginx
    • Apache
    • IIS
  • A database for managing the system.
    • SQLite (requires no service installation, only the above PHP module)
    • MySQL (MySQL/MariaDB/Percona)
    • PostgreSQL
    • Microsoft SQL Server (requires a silver or gold product subscription)

Bitnami Installs

Bitnami lists the requirements for a native installer as such:

  • Intel x86 or compatible processor
  • Minimum of 512 MB RAM
  • Minimum of 150 MB hard drive space
  • TCP/IP protocol support
  • One of the following compatible operating systems:
    • A Linux operating system.
    • A Windows operating system such as Windows Server 2008, Windows Server 2012, Vista, Windows 7, Windows 8 or Windows 10.
    • An OS X operating system.

These requirements are subject to change, so be sure to check the Bitnami Documentation for the most up to date information.

Free Hosted Developer Environment

Sign up for a free DreamFactory-hosted developer account at www.dreamfactory.com. Your developer environment is hosted by DreamFactory and lets you try out the software. It supports almost all of the available service types, including the paid services so you can try before you buy. It's kept updated with the latest releases and patches.

Please note that the hosted environment is for trying out the platform, not for running production applications. For production applications you should install DreamFactory for yourself using one of the methods described below.

Bitnami Desktop/Server Installers

Installation

You can download DreamFactory as a simple click-through installer for the following desktop operating systems. Most common extensions and drivers are pre-packaged and available in these installers.

  • Linux (CentOS, Red Hat, Mint, Debian, and Ubuntu desktop and server).
  • Mac OS X.
  • Microsoft Windows (Windows 7, 8, 10 and Server 2008R2). Note: that some features may not be available or may be limited in this environment.

Bitnami Virtual Machine

You can download DreamFactory as a virtual machine for VMware, VirtualBox, or other hypervisor environments.

Docker Image

You can build your own Docker image or pull the latest Docker image from Docker Hub.

IaaS Clouds

You can easily install DreamFactory on IaaS cloud platforms with Bitnami. Follow the instructions below:

PaaS Clouds

You can install DreamFactory on PaaS cloud platforms (Platform as a Service). Follow the instructions below.

GitHub

You can also install DreamFactory directly from GitHub. Follow the general instructions after taking care of the requirements for your particular environment.

Note: This quick setup instruction assumes that you are familiar with composer, git and the basics of how to setup a web and database server.

Required Software and Extensions

At minimum, you will need the following software and extensions installed and enabled on your system in order to successfully install and run DreamFactory 2.X from GitHub.

  • PHP 5.6+ - check and install the requirements below for your particular environment.
    • PHP required modules: curl, sqlite, mongodb (see below)
  • Git - see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
  • Composer - see https://getcomposer.org/download/, may require cURL to be installed from particular environment below.
  • MongoDB driver (i.e. mongodb.so) - Versions >= 2.1 require the new MongoDB driver to be installed to run composer successfully. If MongoDB is not to be used on your install, please remove the df-mongodb requirement from composer.json before running composer install or upgrade.

Linux

Mac OS X

  • Install v8js library
  • Using MAMP - Using MAMP allows simple stack setup and has some extensions already included. It does not however include v8js. You can follow the above compile instructions and place the v8js.so file in the desired MAMP PHP extension directory.

Windows

Set Up a Database

Install your native database and any additional drivers required for your database.

Switch System Database

If you want to change from one system database to another after you've already run setup/installation:

  • Stop Apache
  • Edit the .env file (in the htdocs folder) to include the right driver, host, and port number. Example:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=dreamfactory
DB_USERNAME=dreamfactory
DB_PASSWORD=dreamfactory
DB_PORT=3306
  • In your shell navigate to the dreamfactory root folder (htdocs in Bitnami installs)
  • Run these commands:
$ php artisan config:clear
$ php artisan cache:clear
$ php artisan dreamfactory:setup
//Answer the on screen prompts
  • Restart Apache

General Instructions

The commands shown here are primarily for a Linux based OS, but should also work on Windows (directory structure is obviously different) with all the required software and extensions installed.

  • Clone this repository to a directory on your system. For testing, using a directory under your home directory is easiest, otherwise choices like /var/www/ or /opt may be preferred.
$ git clone https://github.com/dreamfactorysoftware/dreamfactory.git ~/df2
  • Change your working path to that directory.
$ cd ~/df2
  • Install dependencies using composer. For production environment, use --no-dev, otherwise discard that option for a development environment.
$ composer install --no-dev
  • Run DreamFactory setup command-line wizard. This will set up your configuration and prompt you for things like database settings, first admin user account, etc. It will also allow you to change environment settings midway and then run it again to complete the set up.
  • Note: Previously this command was dreamfactory:setup or df:setup. As of DF 2.7.0 the command is changed to df:env
  • $ php artisan df:env
    to set up the db connection
  • $ php artisan df:setup
    to set up the tables and the admin user in the db.
  • Make sure your web server can read/write from/to storage/ (sub directories) and bootstrap/cache/ directories.

Example:

$ sudo chown -R {www user}:{your user group} storage/ bootstrap/cache/
$ sudo chmod -R 2775 storage/ bootstrap/cache/

Set Up a Web Server

Use PHP's built in web server (**Note**: Testing only, not for production use!)

$ php artisan serve

Or provision a web server to run your DreamFactory instance by following these instructions:

Nginx

Apache

Raspberry Pi 2

You can install and configure DreamFactory on Raspberry Pi 2 as an open source IoT gateway. Follow the general instructions here.

Additional Drivers and Modules