Installation

From DreamFactory
Jump to: navigation, search
DreamFactoryInstallation
Line 3: Line 3:
 
There are many ways to try out and use DreamFactory.  
 
There are many ways to try out and use DreamFactory.  
  
### Free Hosted Developer Environment
+
## 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.
+
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
+
## 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.  
 
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, Debian, and Ubuntu desktop and server).  
+
* [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).
 
* [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.
 
* [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.
  
### Bitnami Virtual Machine
+
### 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
 +
 
 +
```shell
 +
# change this line to your bitnami dreamfactory installation path
 +
cd /Applications/dreamfactory-1.7.8-0/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/composer.phar self-update
 +
../../../php/bin/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:
 +
```shell
 +
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 C:\Bitnami\dreamfactory-x.x.x-x\php\composer.phar self-update
 +
C:\Bitnami\dreamfactory-x.x.x-x\php\php.exe C:\Bitnami\dreamfactory-x.x.x-x\php\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.
 +
 
 +
<pre>
 +
$ php artisan migrate
 +
$ php artisan db:seed
 +
$ php artisan cache:clear
 +
</pre>
 +
 
 +
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.
 
You can download DreamFactory as a [virtual machine](https://bitnami.com/stack/dreamfactory/virtual-machine) for VMware, VirtualBox, or other hypervisor environments.
 
   
 
   
### Docker Image
+
## 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/).  
 
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
+
## IaaS Clouds
  
 
You can install DreamFactory on IaaS cloud platforms (Infrastructure as a Service). Follow the instructions for the desired platform.
 
You can install DreamFactory on IaaS cloud platforms (Infrastructure as a Service). Follow the instructions for the desired platform.
Line 36: Line 90:
 
* [Bitnami Cloud Hosting (AWS)](https://bitnami.com/stack/dreamfactory/cloud)   
 
* [Bitnami Cloud Hosting (AWS)](https://bitnami.com/stack/dreamfactory/cloud)   
  
### PaaS Clouds
+
## PaaS Clouds
  
 
You can install DreamFactory on PaaS cloud platforms (Platform as a Service). Follow the instructions below.
 
You can install DreamFactory on PaaS cloud platforms (Platform as a Service). Follow the instructions below.
Line 45: Line 99:
 
* [Heroku]() - Coming Soon.
 
* [Heroku]() - Coming Soon.
  
### GitHub
+
## 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.  
 
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.  
Line 51: Line 105:
 
> _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._
 
> _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
+
### 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.
 
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.
Line 59: Line 113:
 
* Composer - see [[https://getcomposer.org/download/]], may require cURL to be installed from particular environment below.
 
* Composer - see [[https://getcomposer.org/download/]], may require cURL to be installed from particular environment below.
  
##### Linux
+
#### Linux
  
 
* [CentOS or RedHat](Installation/Linux/Yum)
 
* [CentOS or RedHat](Installation/Linux/Yum)
 
* [Mint, Debian or Ubuntu](Installation/Linux/Apt)
 
* [Mint, Debian or Ubuntu](Installation/Linux/Apt)
  
##### Mac OS X
+
#### Mac OS X
  
 
* Install mcrypt library
 
* Install mcrypt library
 
* Install v8js library
 
* Install v8js library
 
 
* Using MAMP
 
* 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.
 
   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
+
#### 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.
 
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
+
### Setup a Database
  
 
Install your native database and any additional drivers required for your database.
 
Install your native database and any additional drivers required for your database.
Line 87: Line 140:
 
* [SAP SQL Anywhere](Installation/Databases/SQLAnywhere)
 
* [SAP SQL Anywhere](Installation/Databases/SQLAnywhere)
  
#### General Instructions
+
### 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.
 
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.
Line 109: Line 162:
 
> sudo chmod -R 2775 storage/ bootstrap/cache/
 
> sudo chmod -R 2775 storage/ bootstrap/cache/
  
#### Setup a web server
+
### Setup a web server
  
 
Use PHP's built in web server (**Note**:: Testing only, not for production use)...
 
Use PHP's built in web server (**Note**:: Testing only, not for production use)...
Line 117: Line 170:
 
Or provision a web server to run your DreamFactory instance by following these instructions...
 
Or provision a web server to run your DreamFactory instance by following these instructions...
  
##### Nginx
+
#### Nginx
  
 
* [Debian/Mint/Ubuntu](Installation/Linux/Apt)
 
* [Debian/Mint/Ubuntu](Installation/Linux/Apt)
 
* [CentOS/RedHat](Installation/Linux/Yum)
 
* [CentOS/RedHat](Installation/Linux/Yum)
  
##### Apache
+
#### Apache
  
 
* [Debian/Mint/Ubuntu](Installation/Linux/Apt)
 
* [Debian/Mint/Ubuntu](Installation/Linux/Apt)
 
* [CentOS/RedHat](Installation/Linux/Yum)
 
* [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
 +
```

Revision as of 14:28, 28 October 2015

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.

    1. 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.

    1. Bitnami Desktop/Server Installers
      1. 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.

      1. Upgrade

Bitnami installers do not provide a direct method of upgrading, but you can upgrade the DreamFactory code base by using Git and Composer.

        1. Mac OS X and Linux

```shell

  1. change this line to your bitnami dreamfactory installation path

cd /Applications/dreamfactory-1.7.8-0/apps/dreamfactory

  1. this is taking a backup just in case

cp -r htdocs htdocs.old cd htdocs

  1. stash only if you have changes you have made to the local install

git stash git checkout master git pull origin master

  1. self-update is optional, try it if you get an error without it

../../../php/bin/composer.phar self-update ../../../php/bin/composer.phar install --no-dev ../../../ctlscript.sh restart ```

        1. 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: ```shell 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 C:\Bitnami\dreamfactory-x.x.x-x\php\composer.phar self-update C:\Bitnami\dreamfactory-x.x.x-x\php\php.exe C:\Bitnami\dreamfactory-x.x.x-x\php\composer.phar update --no-dev ```

Use the Bitnami DreamFactory Stack Manager to restart your servers.

      1. 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.

    1. 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.

    1. 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/).

    1. IaaS Clouds

You can install DreamFactory on IaaS cloud platforms (Infrastructure as a Service). Follow the instructions for the desired platform.

    1. 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.
    1. 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._

      1. 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.
        1. Linux
  • [CentOS or RedHat](Installation/Linux/Yum)
  • [Mint, Debian or Ubuntu](Installation/Linux/Apt)
        1. 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.
        1. 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.


      1. 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)
      1. 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/

      1. 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...

        1. Nginx
  • [Debian/Mint/Ubuntu](Installation/Linux/Apt)
  • [CentOS/RedHat](Installation/Linux/Yum)
        1. Apache
  • [Debian/Mint/Ubuntu](Installation/Linux/Apt)
  • [CentOS/RedHat](Installation/Linux/Yum)
      1. 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

  1. 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 ```