Install Debian Ubuntu - dfryan/dreamfactory GitHub Wiki
Prerequisites
DreamFactory requires the following packages to run successfully:
- curl
- apache2
- php5
- php5-common
- php5-cli
- php5-curl
- php5-json
- php5-mcrypt
- php5-gd
- php5-mysql
- mysql-server
- mysql-client
- git
- php-pear (for MongoDB support)
- php5-dev (for MongoDB support)
Configuring Your Instance
ubuntu@ip-10-164-45-80:~$ sudo apt-get install curl apache2 php5 php5-common php5-cli
php5-curl php5-json php5-mcrypt php5-gd php5-mysql mysql-server mysql-client git
Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version.
The following extra packages will be installed:
... yada yada yada ...
Updating the super catalog...
Set up MySQL
You need to create a database, and a DreamFactory user in your MySQL instance. On a fresh install, this is quite simple:
ubuntu@ip-10-164-45-80:~$ mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.5.31-0ubuntu0.12.10.1 (Ubuntu)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database dreamfactory;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on dreamfactory.* to 'dsp_user'@'localhost' identified by 'dsp_user';
Query OK, 0 rows affected (0.05 sec)
mysql> quit
Bye
Configuring MongoDB Support<\b>
There is an extra step to setup library support for MongoDB:
ubuntu@ip-10-164-45-80:~$ sudo pecl install mongo
downloading mongo-1.4.1.tgz ...
Starting to download mongo-1.4.1.tgz (138,957 bytes)
..............................done: 138,957 bytes
84 source files, building
DSP Installation from Github
To prepare for the DreamFactory installation from Github, create the DreamFactory directory on your server with the appropriate rights.
$ sudo mkdir -p /opt/dreamfactory/platform
$ sudo chmod 777 /opt/dreamfactory/platform
Next we will do a git clone to download the DreamFactory repository dsp-core.
$ git clone https://github.com/dreamfactorysoftware/dsp-core.git /opt/dreamfactory/platform
Now that the DreamFactory files are downloaded we will execute the installation script.
$ cd /opt/dreamfactory/platform
$ sudo ./scripts/installer.sh –cv
********************************************************************************
DreamFactory Services Platform(tm) Linux Installer [Mode: Local v1.3.3]
********************************************************************************
* info: Clean install. Dependencies removed.
* info: Verbose mode enabled
* info: Install user is "ubuntu"
* info: No composer found, installing: /opt/dreamfactory/platform/composer.phar
#!/usr/bin/env php
All settings correct for using Composer
...
Enable Site
Finally we need to configure apache to connect to the DreamFactory application.
Below are the instructions to change the default site on Apache2. For instructions on setting up virtual hosts on apache 2.2 and 2.4 please review the apache documentation.
In this example we will edit the Apache default configuration file.
```bash $ sudo nano /etc/apache2/sites-available/default ```Change the DocumentRoot to /opt/dreamfactory/platform/web and the value of AllowOverride to All
DocumentRoot /opt/dreamfactory/platform/web
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
Update the Directory Path and the value of AllowOverride to All
<Directory /opt/dreamfactory/platform/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All #update to all
Order allow,deny
allow from all
</Directory>
Enable the apache2 rewrite engine.
$ sudo a2enmod rewrite
Change the rights, so that the assets directory is writable.
$ sudo chmod 775 /opt/dreamfactory/platform/web/assets/
Restart the apache server
$ sudo service apache2 restart.
Your DreamFactory Application should now be active, and available by entering the DNS name or IP address of your server into a web browser.