Installation
Line 3: | Line 3: | ||
Get started with DreamFactory by following the installation instructions below. To get started select an install method and platform below. | Get started with DreamFactory by following the installation instructions below. To get started select an install method and platform below. | ||
− | == GitHub | + | == GitHub == |
You can install DreamFactory [https://github.com/dreamfactorysoftware/dreamfactory directly from GitHub]. | You can install DreamFactory [https://github.com/dreamfactorysoftware/dreamfactory directly from GitHub]. | ||
Line 26: | Line 26: | ||
** PHP required modules: curl, sqlite, mongodb (see below) | ** PHP required modules: curl, sqlite, mongodb (see below) | ||
* Git - see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | * Git - see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | ||
− | * | + | * A recent version of one of four supported databases to store configuration data: MySQL, PostgreSQL, SQLite, or SQL Server. |
* 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. | ||
− | * [[DreamFactory/Installation/Databases/MongoDB|MongoDB driver]] (i.e. mongodb.so) - | + | * [[DreamFactory/Installation/Databases/MongoDB|MongoDB driver]] (i.e. mongodb.so) - DreamFactory versions >= 2.1 require PHP's MongoDB driver to be installed. If the driver is not available, please remove the df-mongodb requirement from <code>composer.json</code>, or include the <code>--ignore-platform-req</code> option when running composer install. |
− | The commands shown here are primarily for a Linux based | + | The commands shown here are primarily for a Linux/Unix-based operating system, 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. | + | * Clone this repository to a directory on your system. For testing, using a directory under your home directory is easiest, otherwise choices like <code>/var/www/</code> or <code>/opt</code> may be preferred. |
<source lang=bash>$ git clone https://github.com/dreamfactorysoftware/dreamfactory.git ~/df2</source> | <source lang=bash>$ git clone https://github.com/dreamfactorysoftware/dreamfactory.git ~/df2</source> | ||
* Change your working path to that directory. | * Change your working path to that directory. | ||
+ | |||
<source lang=bash>$ cd ~/df2</source> | <source lang=bash>$ cd ~/df2</source> | ||
− | * Install dependencies using composer. | + | * Install dependencies using composer. If you're installing DreamFactory for use in a production environment, include the <code>--no-dev</code> option to avoid installing development-specific packages. |
+ | |||
<source lang=bash>$ composer install --no-dev</source> | <source lang=bash>$ composer install --no-dev</source> | ||
− | * Run DreamFactory | + | * Run DreamFactory's command-line setup wizard. This wizard will prompt you for things like the database settings, first administration user account, etc. |
− | * '''Note:''' | + | * '''Note:''' In earlier versions of DreamFactory this command was named <code>dreamfactory:setup</code> or <code>df:setup</code>. As of DF 2.7.0 the command is changed to <code>df:env</code> |
* <source lang="bash">$ php artisan df:env</source> to set up the db connection | * <source lang="bash">$ php artisan df:env</source> to set up the db connection | ||
* <source lang="bash">$ php artisan df:setup</source> to set up the tables and the admin user in the db. | * <source lang="bash">$ php artisan df:setup</source> to set up the tables and the admin user in the db. | ||
− | * Make sure your web server can read/write from/to storage/ | + | * Make sure your web server can read/write from/to <code>storage/</code> and <code>bootstrap/cache/</code> directories. |
Example: | Example: | ||
Line 57: | Line 59: | ||
=== Set Up a Web Server === | === Set Up a Web Server === | ||
− | + | If you're just trying out DreamFactory, consider using PHP's built-in web server: | |
+ | |||
<source lang=bash>$ php artisan serve</source> | <source lang=bash>$ php artisan serve</source> | ||
− | + | Alternatively, you'll want to provision a web server by following these instructions: | |
==== Nginx ==== | ==== Nginx ==== | ||
Line 75: | Line 78: | ||
Install your native database and any additional drivers required for your database. | Install your native database and any additional drivers required for your database. | ||
+ | |||
* [[DreamFactory/Installation/Databases/SQLite|SQLite]] | * [[DreamFactory/Installation/Databases/SQLite|SQLite]] | ||
* [[DreamFactory/Installation/Databases/MySQL|MySQL, MariaDB, or Percona]] | * [[DreamFactory/Installation/Databases/MySQL|MySQL, MariaDB, or Percona]] | ||
Line 82: | Line 86: | ||
==== Switch System Database ==== | ==== Switch System Database ==== | ||
+ | |||
If you want to change from one system database to another after you've already run setup/installation: | If you want to change from one system database to another after you've already run setup/installation: | ||
− | *Stop | + | |
− | *Edit the .env file (in the htdocs folder) to include the right driver, host, and port number. | + | *Stop your web server |
+ | *Edit the <code>.env</code> file (in the htdocs folder) to include the right driver, host, and port number. For example: | ||
+ | |||
<source lang=bash> | <source lang=bash> | ||
DB_CONNECTION=mysql | DB_CONNECTION=mysql | ||
Line 93: | Line 100: | ||
DB_PORT=3306 | DB_PORT=3306 | ||
</source> | </source> | ||
− | *In your shell navigate to the dreamfactory root folder (htdocs in Bitnami installs) | + | |
+ | *In your shell navigate to the dreamfactory root folder (<code>htdocs</code> in Bitnami installs) | ||
*Run these commands: | *Run these commands: | ||
<source lang=bash> | <source lang=bash> |
Revision as of 07:26, 14 May 2018
DreamFactory is supported on Linux, Windows, and Mac OS X.
Get started with DreamFactory by following the installation instructions below. To get started select an install method and platform below.
Contents
GitHub
You can install DreamFactory directly from GitHub. We have provided platform specific instructions. If your desired platform is not available, you will need to extrapolate from the General Instructions.
Platforms
- Linux
- Mac
- Windows
General Instructions
Required Software and Extensions
At minimum, you will need the following software and extensions installed and enabled on your system in order to successfully clone and install DreamFactory 2.12.
- PHP 7+ - 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
- A recent version of one of four supported databases to store configuration data: MySQL, PostgreSQL, SQLite, or SQL Server.
- Composer - see https://getcomposer.org/download/, may require cURL to be installed from particular environment below.
- MongoDB driver (i.e. mongodb.so) - DreamFactory versions >= 2.1 require PHP's MongoDB driver to be installed. If the driver is not available, please remove the df-mongodb requirement from
composer.json
, or include the--ignore-platform-req
option when running composer install.
The commands shown here are primarily for a Linux/Unix-based operating system, 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. If you're installing DreamFactory for use in a production environment, include the
--no-dev
option to avoid installing development-specific packages.
$ composer install --no-dev
- Run DreamFactory's command-line setup wizard. This wizard will prompt you for things like the database settings, first administration user account, etc.
- Note: In earlier versions of DreamFactory this command was named
dreamfactory:setup
ordf:setup
. As of DF 2.7.0 the command is changed todf:env
- to set up the db connection
$ php artisan df:env
- to set up the tables and the admin user in the db.
$ php artisan df:setup
- Make sure your web server can read/write from/to
storage/
andbootstrap/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
If you're just trying out DreamFactory, consider using PHP's built-in web server:
$ php artisan serve
Alternatively, you'll want to provision a web server by following these instructions:
Nginx
Apache
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 your web server
- Edit the
.env
file (in the htdocs folder) to include the right driver, host, and port number. For 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 df:setup //Answer the on screen prompts
- Restart Apache
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, and expires after 30 days. 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
The DreamFactory Docker image on DockerHub is now maintained by Bitnami. You can pull it and follow their instructions for deploying a Bitnami package of DreamFactory in Docker.
If you don't want to use Bitnami, you can still build your own docker image using our df-docker repo on GitHub.
IaaS Clouds
You can easily install DreamFactory on IaaS cloud platforms with Bitnami. Follow the instructions below:
- Amazon Web Services (AWS)
- Microsoft Azure
- Google Cloud Platform
- Oracle Cloud Platform
- CenturyLink
- 1&1 Cloud Platform
- IBM SoftLayer
- Rackspace
PaaS Clouds
You can install DreamFactory on PaaS cloud platforms (Platform as a Service). Follow the instructions below.
Raspberry Pi 2
You can install and configure DreamFactory on Raspberry Pi 2 as an open source IoT gateway. Follow the general instructions here.
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+, 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.