Installation

From DreamFactory
Jump to: navigation, search

PHP

These instructions will install PHP 7 with various modules. Centos/RHEL do not ship with up to date PHP versions in their repos, so we will be installing via third party repos. DreamFactory requires the mbstring, zip, curl, mongodb, and sqlite3 php modules. Additionally php-fpm is installed if you will be running Nginx as your web server (recommended.) Finally, the mysql php module needs to be installed if you will be using MySQL or MariadDB, which these instructions recommend for the system database. Other database types will require their php modules to be installed for use within DreamFactory. This is covered in the Drivers and Modules section.

Install for Apache

  1. $ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
  2. $ sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
  3. $ sudo yum install php71w php71w-common php71w-mbstring php71w-mysqlnd php71w-pdo php71w-pecl-mongodb php71w-mcrypt

Install for Nginx

Install

  1. $ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
  2. $ sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
  3. $ sudo yum install php71w-fpm php71w php71w-common php71w-mbstring php71w-mysqlnd php71w-pdo php71w-pecl-mongodb php71w-mcrypt

Configure PHP FPM

You will need a text editor for this task. The instructions use Nano which you may need to install with yum.

  1. Edit the php-fpm php.ini file
    • sudo nano /ect/php.ini
    • Find the line that reads ;cgi.fix_pathinfo=1
    • Change it to read cgi.fix_pathinfo=0
    • Save and exit (Ctrl+x, Y, <Enter>)
  2. Restart php-fpm
    • $ sudo systemctl restart php-fpm
  3. Enable php-fpm to run on boot
    • $ sudo systemctl enable php-fpm