Yum

From DreamFactory
Jump to: navigation, search
Line 55: Line 55:
 
</pre>
 
</pre>
  
Open the Firewall for http
+
* '''Open the Firewall for http'''
  
 
<pre>
 
<pre>
Line 63: Line 63:
 
</pre>
 
</pre>
  
Enable Site
+
* '''Enable Site'''
  
 
Finally, we need to configure Apache to connect to the DreamFactory application.
 
Finally, we need to configure Apache to connect to the DreamFactory application.
Line 72: Line 72:
 
<pre> $ sudo nano /etc/httpd/conf/httpd.conf </pre>
 
<pre> $ sudo nano /etc/httpd/conf/httpd.conf </pre>
  
Change the DocumentRoot and the Directory settings
+
* '''Change the DocumentRoot and the Directory settings'''
  
 
<pre>
 
<pre>
Line 93: Line 93:
 
</pre>
 
</pre>
  
Restart the web server
+
* '''Restart the web server'''
  
 
<pre> $ sudo service httpd restart </pre>
 
<pre> $ sudo service httpd restart </pre>
  
 
Your DreamFactory Application should now be active, and available by entering the DNS name or IP address of your server into a web browser.
 
Your DreamFactory Application should now be active, and available by entering the DNS name or IP address of your server into a web browser.

Revision as of 16:09, 6 February 2016

PHP

$ sudo yum install git curl php php-common php-cli php-curl php-json php-mcrypt php-gd

Please note that the php-mcrypt and php-json packages aren't available is some distro repositories. If this is the case, you can add the RHEL EPEL repository to your sources list. Instructions for doing this are available here

Database

Web Server

Nginx

Instructions for installing Nginx on CentOS 7 here

 $ sudo yum install nginx 

Here is a sample nginx defaul.conf file

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /path/to/dreamfactory/public;
    index index.php index.html index.htm;

    server_name server_domain_name_or_IP;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Apache

$ sudo yum install httpd
  • Open the Firewall for http
$ setenforce 0
$ firewall-cmd --permanent --add-service=http
$ firewall-cmd --reload
  • Enable Site

Finally, we need to configure Apache to connect to the DreamFactory application. Below are the instructions to change the default site on Apache. For instructions on setting up virtual hosts, review the Apache documentation.

In this example we will edit the Apache default configuration file.

 $ sudo nano /etc/httpd/conf/httpd.conf 
  • Change the DocumentRoot and the Directory settings
DocumentRoot "/opt/dreamfactory/public"

<Directory "/opt/dreamfactory/public">
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
AllowOverride None
    Require all granted
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ /index.php [L]
    <LimitExcept GET HEAD PUT DELETE PATCH POST>
        Allow from all
    </LimitExcept>
</Directory>
  • Restart the web server
 $ sudo service httpd 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.