Installation
DreamFactory is free open source software available under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). We provide an optional paid support package. More information on the support package is available on DreamFactory's [website](https://www.dreamfactory.com/developers/support).
There are many ways to try out and use DreamFactory.
- Free Hosted Developer Environment
Sign up for a free DreamFactory-hosted developer account at [www.dreamfactory.com](http://www.dreamfactory.com). Your developer environment is hosted by DreamFactory and lets you try out the software. It has all the same capabilities as the installed open source package (except for server-side scripting), but it's for trying out DreamFactory, not for running production applications. It is kept updated with the latest releases and patches.
- 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](https://bitnami.com/stack/dreamfactory/installer#linux) (CentOS, Red Hat, Mint, Debian, and Ubuntu desktop and server).
- [Mac OS X](https://bitnami.com/stack/dreamfactory/installer#osx).
- [Microsoft Windows](https://bitnami.com/stack/dreamfactory/installer#windows) (Windows 7, 8, 10 and Server 2008R2). **Note:** that some features may not be available or may be limited in this environment.
- Upgrade
Bitnami installers do not provide a direct method of upgrading, but you can upgrade the DreamFactory code base by using Git and Composer.
- Mac OS X and Linux
```
- change this line to your bitnami dreamfactory installation path. For example:
cd /Applications/dreamfactory-2.0.1-1/apps/dreamfactory
- this is taking a backup just in case
cp -r htdocs htdocs.old cd htdocs
- stash only if you have changes you have made to the local install
git stash git checkout master git pull origin master
- self-update is optional, try it if you get an error without it
../../../php/bin/php composer.phar self-update ../../../php/bin/php composer.phar install --no-dev ../../../ctlscript.sh restart ```
- Windows
This process requires you to have a Windows GIT client with a shell.
Copy the folder C:\Bitnami\dreamfactory-x.x.x-x\apps\dreamfactory\htdocs to C:\Bitnami\dreamfactory-x.x.x-x\apps\dreamfactory\htdocs.old
In your GIT client of choice run: ``` cd C:\Bitnami\dreamfactory-x.x.x-x\apps\dreamfactory\htdocs git stash git checkout master git pull origin master C:\Bitnami\dreamfactory-x.x.x-x\php\php.exe composer.phar self-update C:\Bitnami\dreamfactory-x.x.x-x\php\php.exe composer.phar update --no-dev ```
Use the Bitnami DreamFactory Stack Manager to restart your servers.
- Troubleshooting
Some upgrades require database schema updates to continue operating correctly. Try the following commands if you run into errors after a software upgrade.
$ php artisan migrate $ php artisan db:seed $ php artisan cache:clear
If you still encounter problems, please contact our [support](DreamFactory/Support) for help.
- Bitnami Virtual Machine
You can download DreamFactory as a [virtual machine](https://bitnami.com/stack/dreamfactory/virtual-machine) for VMware, VirtualBox, or other hypervisor environments.
- Docker Image
You can build your own Docker [image](https://github.com/dreamfactorysoftware/df-docker/) or pull the latest [Docker image from Docker Hub](https://hub.docker.com/r/dreamfactorysoftware/df-docker/).
- IaaS Clouds
You can install DreamFactory on IaaS cloud platforms (Infrastructure as a Service). Follow the instructions for the desired platform.
- [Amazon Web Services (AWS)](https://bitnami.com/stack/dreamfactory/cloud/amazon)
- [Microsoft Azure](https://bitnami.com/stack/dreamfactory/cloud/azure)
- [Google Cloud](https://bitnami.com/stack/dreamfactory/cloud/google)
- [VMware](https://bitnami.com/stack/dreamfactory/cloud/vmware)
- [Digital Ocean](https://bitnami.com/stack/dreamfactory/cloud/digitalocean)
- [IBM Cloud]() - Coming Soon.
- [Rackspace]() - Coming Soon.
- [Bitnami Cloud Hosting (AWS)](https://bitnami.com/stack/dreamfactory/cloud)
- PaaS Clouds
You can install DreamFactory on PaaS cloud platforms (Platform as a Service). Follow the instructions below.
- [Pivotal Web Services]() - Coming Soon.
- [IBM Bluemix]() - Coming Soon.
- [Red Hat OpenShift]() - Coming Soon.
- [Heroku]() - Coming Soon.
- GitHub
You can also install DreamFactory [directly from GitHub](https://github.com/dreamfactorysoftware/dreamfactory). 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.0 from GitHub.
- PHP 5.5+ - check and install the requirements below for your particular environment.
- Git - see [[1]]
- Composer - see [[2]], may require cURL to be installed from particular environment below.
- Linux
- [CentOS or RedHat](Installation/Linux/Yum)
- [Mint, Debian or Ubuntu](Installation/Linux/Apt)
- Mac OS X
- Install mcrypt library
- Install v8js library
- Using MAMP
Using MAMP allows simple stack setup and has some extensions already included, like mcrypt. 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. Also note that MAMP ships with an older version of MySQL (5.5) which does not support some databases options that you may run into, particularly dealing with timestamp fields.
- Windows
To date, the best way to install DreamFactory on Windows is to use the Bitnami installer mentioned above. Some have had success running DreamFactory on existing WAMP stacks or even IIS. We don't currently have a set of installable instructions, but will address this in the near future.
- Setup a Database
Install your native database and any additional drivers required for your database.
- [SQLite](Installation/Databases/SQLite)
- [MySQL, MariaDB, or Percona](Installation/Databases/MySQL)
- [PostgreSQL](Installation/Databases/PostgreSQL)
- [Microsoft SQL Server](Installation/Databases/SQLServer)
- [SAP SQL Anywhere](Installation/Databases/SQLAnywhere)
- 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 make environment settings changes midway and then run it again to complete the setup.
> php artisan dreamfactory:setup
- 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/
- Setup 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
- [Debian/Mint/Ubuntu](Installation/Linux/Apt)
- [CentOS/RedHat](Installation/Linux/Yum)
- Apache
- [Debian/Mint/Ubuntu](Installation/Linux/Apt)
- [CentOS/RedHat](Installation/Linux/Yum)
- Upgrade
Use git commands to pull the latest code from the dreamfactory repo. For example,
```shell git stash git checkout master git pull origin master
- self-update is optional, you might get an error without the latest copy of composer
php composer.phar self-update php composer.phar update --no-dev ```
- Drivers
- MS SQL
- Windows
- MS SQL
- Drivers
- Install DreamFactory.
- Download and install Microsoft ODBC Driver 11 for SQL Server (if not already installed). Currently this is available [here](http://www.microsoft.com/en-us/download/details.aspx?id=36434). In 32-bit environments, install the x86 package. In 64-bit environments, install the x64 package.
- Download and install the appropriate SQL Server Native Client (if not already installed and SQL Server is not hosted on the same machine as DSP). In 32-bit environments, install the x86 package. In 64-bit environments, install the x64 package. Currently the Microsoft SQL Server 2012 Native Client is available [here](http://www.microsoft.com/en-us/download/details.aspx?id=29065), and the Microsoft SQL Server 2008 R2 Native Client is available [here](http://www.microsoft.com/en-us/download/details.aspx?id=16978).
- DreamFactory uses PHP PDO drivers for DB connections. Full documentation on PDO_SQLSRV is available [here](http://php.net/manual/en/ref.pdo-sqlsrv.php). You will need to download and extract the Microsoft Drivers for PHP for SQL Server. Currently these are available [here](https://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx).
- Copy the DLLs for your version of PHP into your PHP's extensions directory. E.g., for PHP 5.5, the DLLs are php_pdo_sqlsrv_55_ts.dll and php_sqlsrv_55_ts.dll (which were extracted from the download in the third step). (Rare case: if you are integrating with IIS as your web server, use the non-thread-safe DLLs instead (php_pdo_sqlsrv_55_nts.dll and php_sqlsrv_55_nts.dll).)
- Enable the copied DLLs in your php.ini file. Using the example DLLs from step #4, you would add the following lines to C:\Bitnami\dreamfactory-2.0.1-1\php\php.ini and save:
- ```extension=php_pdo_sqlsrv_55_ts.dll```
- ```extension=php_sqlsrv_55_ts.dll```
- Restart your web server to apply these PHP configuration changes.