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 Nginx
$ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
$ sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
$ 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.
- 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>)
- Restart php-fpm
$ sudo service php-fpm restart