SlideShare a Scribd company logo
Speed up your development environment

PHP + Nginx + Fedora + PG

              Marcus Sá
         Developer | Woompa
        marcus.m.sa@gmail.com
               @sa_vini
Scenario

           ●   Ruby developer
  ● PHP is the customer's requirement

● Development environment not installed

      ● Very tight deadline (O RLY?)
Decisions taken

            ●    Avoid complexity*
              ● Use PHP to develop

● Install environment: PHP PostgreSQL, Nginx
                           ,
     ● Using a CMS (Joomla will take care)
Avoid complexity*

      ● Develop the minimum possible
● Use modules and components already made

       ● Focus on the important things
Installing environment

     ● Update your system
          ● Install Nginx

           ● Install PHP

      ● Install PostgreSQL

        ● Configure Nginx
Update your system


    $ yum update
Install Nginx
Installing nginx
$ yum install nginx
Set it to start on boot
$ chkconfig nginx on
Start right now!
$ service nginx start
                          sudo if needed
Configure Nginx
server {

    server_name www.example.com example.com;
    root /srv/www/www.example.com/public_html;

    location / {
       index index.html index.htm;
    }

    location ~ .php$ {
       include /etc/nginx/fastcgi_params;
       fastcgi_pass 127.0.0.1:53217;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
Install PHP
install packages required for PHP-FastCGI
$ yum install php spawn-fcgi
Set it to start on boot
$ chkconfig spawn-fcgi on
Start right now!
$ service spawn-fcgi start
                               sudo if needed
Configure PHP
editing spawn-fcgi
$ nano /etc/sysconfig/spawn-fcgi
FASTCGI_USER=nginx
FASTCGI_GROUP=nginx
SOCKET=/var/run/spawn-fcgi.sock
PIDFILE=/var/run/spawn-fcgi.pid
PHP5_SOCKET=/var/run/php-fcgi.sock
CHILDREN=6
PHP5=/usr/bin/php-cgi
MODE=0600
OPTIONS="-s $PHP5_SOCKET -S -M $MODE -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP
-f $PHP5"



                                                                       sudo if needed
Install PostgreSQL

Download it
http://www.enterprisedb.com/
Make executable
$ chmod +x postgre_file.bin
Execute and install
$ ./postgre_file.bin
                        sudo if needed
That's all folks




    Thanks!

More Related Content

PPT
Nodejs quick start
PPTX
nginx + uwsgi emperor + bottle
PPTX
Simple webapps with nginx, uwsgi emperor and bottle
PPTX
Introduction to using Grunt & Bower with WordPress theme development
PDF
Modernizing Your WordPress Workflow with Grunt & Bower
PDF
Improving WordPress Performance with Xdebug and PHP Profiling
PDF
Building your own personal minion with grunt.js
PDF
GruntJS + Wordpress
Nodejs quick start
nginx + uwsgi emperor + bottle
Simple webapps with nginx, uwsgi emperor and bottle
Introduction to using Grunt & Bower with WordPress theme development
Modernizing Your WordPress Workflow with Grunt & Bower
Improving WordPress Performance with Xdebug and PHP Profiling
Building your own personal minion with grunt.js
GruntJS + Wordpress

What's hot (20)

PDF
Automatic testing and quality assurance for WordPress plugins
PDF
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
PPTX
20151229 wnmp & phalcon micro app - part I
PDF
Npm: beyond 'npm i'
PPTX
Node.js in a heterogeneous system
PDF
CasperJS and PhantomJS for Automated Testing
PDF
Preprocessor Workflow with Grunt
PPTX
Xdebug, KCacheGrind and Webgrind with WampServer
PDF
Advanced front-end automation with npm scripts
PDF
Setup a New Virtualenv for Django in Windows
PDF
Compressed js with NodeJS & GruntJS
PPTX
My journey from PHP to Node.js
PPTX
Modern web technologies
PDF
Node.js in a heterogeneous system
PDF
Site Testing with CasperJS
PPTX
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
PDF
[Js hcm] Deploying node.js with Forever.js and nginx
PDF
Understanding Non Blocking I/O with Python
PDF
Capistrano && SystemD
Automatic testing and quality assurance for WordPress plugins
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
20151229 wnmp & phalcon micro app - part I
Npm: beyond 'npm i'
Node.js in a heterogeneous system
CasperJS and PhantomJS for Automated Testing
Preprocessor Workflow with Grunt
Xdebug, KCacheGrind and Webgrind with WampServer
Advanced front-end automation with npm scripts
Setup a New Virtualenv for Django in Windows
Compressed js with NodeJS & GruntJS
My journey from PHP to Node.js
Modern web technologies
Node.js in a heterogeneous system
Site Testing with CasperJS
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
[Js hcm] Deploying node.js with Forever.js and nginx
Understanding Non Blocking I/O with Python
Capistrano && SystemD
Ad

Viewers also liked (6)

PDF
Conhecendo Sinatra
ODP
10 dicas sobre SEO
PDF
PDF
How to Battle Bad Reviews
PDF
Activism x Technology
PDF
Study: The Future of VR, AR and Self-Driving Cars
Conhecendo Sinatra
10 dicas sobre SEO
How to Battle Bad Reviews
Activism x Technology
Study: The Future of VR, AR and Self-Driving Cars
Ad

Similar to Speed up your development environment PHP + Nginx + Fedora + PG (20)

DOCX
How to install and configure LEMP stack
PPTX
Nginx [engine x] and you (and WordPress)
PDF
10 Million hits a day with WordPress using a $15 VPS
PDF
OSDC.no 2015 introduction to node.js workshop
PDF
Towards the perfect Drupal Dev Machine
PDF
Pyramid Deployment and Maintenance
PDF
Installing php 7.4 Nginx Laravel 7.x on Centos 8
PDF
Perl hosting for beginners - Cluj.pm March 2013
PDF
How to install nginx vs unicorn
PDF
Nginx pres
ODP
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
PPTX
Installing GravCMS
PPTX
Modern Development Tools
PDF
PHP Development Tools
PDF
Capistrano deploy Magento project in an efficient way
PDF
Installing nagios core_from_source
PDF
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
PDF
Django deployment and rpm+yum
ODP
Website releases made easy with the PEAR installer, OSCON 2009
PPTX
Installing odoo v8 from github
How to install and configure LEMP stack
Nginx [engine x] and you (and WordPress)
10 Million hits a day with WordPress using a $15 VPS
OSDC.no 2015 introduction to node.js workshop
Towards the perfect Drupal Dev Machine
Pyramid Deployment and Maintenance
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Perl hosting for beginners - Cluj.pm March 2013
How to install nginx vs unicorn
Nginx pres
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Installing GravCMS
Modern Development Tools
PHP Development Tools
Capistrano deploy Magento project in an efficient way
Installing nagios core_from_source
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Django deployment and rpm+yum
Website releases made easy with the PEAR installer, OSCON 2009
Installing odoo v8 from github

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Review of recent advances in non-invasive hemoglobin estimation
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx

Speed up your development environment PHP + Nginx + Fedora + PG

  • 1. Speed up your development environment PHP + Nginx + Fedora + PG Marcus Sá Developer | Woompa marcus.m.sa@gmail.com @sa_vini
  • 2. Scenario ● Ruby developer ● PHP is the customer's requirement ● Development environment not installed ● Very tight deadline (O RLY?)
  • 3. Decisions taken ● Avoid complexity* ● Use PHP to develop ● Install environment: PHP PostgreSQL, Nginx , ● Using a CMS (Joomla will take care)
  • 4. Avoid complexity* ● Develop the minimum possible ● Use modules and components already made ● Focus on the important things
  • 5. Installing environment ● Update your system ● Install Nginx ● Install PHP ● Install PostgreSQL ● Configure Nginx
  • 6. Update your system $ yum update
  • 7. Install Nginx Installing nginx $ yum install nginx Set it to start on boot $ chkconfig nginx on Start right now! $ service nginx start sudo if needed
  • 8. Configure Nginx server { server_name www.example.com example.com; root /srv/www/www.example.com/public_html; location / { index index.html index.htm; } location ~ .php$ { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:53217; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
  • 9. Install PHP install packages required for PHP-FastCGI $ yum install php spawn-fcgi Set it to start on boot $ chkconfig spawn-fcgi on Start right now! $ service spawn-fcgi start sudo if needed
  • 10. Configure PHP editing spawn-fcgi $ nano /etc/sysconfig/spawn-fcgi FASTCGI_USER=nginx FASTCGI_GROUP=nginx SOCKET=/var/run/spawn-fcgi.sock PIDFILE=/var/run/spawn-fcgi.pid PHP5_SOCKET=/var/run/php-fcgi.sock CHILDREN=6 PHP5=/usr/bin/php-cgi MODE=0600 OPTIONS="-s $PHP5_SOCKET -S -M $MODE -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP -f $PHP5" sudo if needed
  • 11. Install PostgreSQL Download it http://www.enterprisedb.com/ Make executable $ chmod +x postgre_file.bin Execute and install $ ./postgre_file.bin sudo if needed
  • 12. That's all folks Thanks!