• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Speed up your development environment PHP + Nginx + Fedora + PG
 

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

on

  • 2,732 views

 

Statistics

Views

Total Views
2,732
Views on SlideShare
2,728
Embed Views
4

Actions

Likes
0
Downloads
9
Comments
0

2 Embeds 4

http://paper.li 3
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

    • Speed up your development environmentPHP + Nginx + Fedora + PG Marcus Sá Developer | Woompa marcus.m.sa@gmail.com @sa_vini
    • Scenario ● Ruby developer ● PHP is the customers 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 NginxInstalling nginx$ yum install nginxSet it to start on boot$ chkconfig nginx onStart right now!$ service nginx start sudo if needed
    • Configure Nginxserver { 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 PHPinstall packages required for PHP-FastCGI$ yum install php spawn-fcgiSet it to start on boot$ chkconfig spawn-fcgi onStart right now!$ service spawn-fcgi start sudo if needed
    • Configure PHPediting spawn-fcgi$ nano /etc/sysconfig/spawn-fcgiFASTCGI_USER=nginxFASTCGI_GROUP=nginxSOCKET=/var/run/spawn-fcgi.sockPIDFILE=/var/run/spawn-fcgi.pidPHP5_SOCKET=/var/run/php-fcgi.sockCHILDREN=6PHP5=/usr/bin/php-cgiMODE=0600OPTIONS="-s $PHP5_SOCKET -S -M $MODE -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP-f $PHP5" sudo if needed
    • Install PostgreSQLDownload ithttp://www.enterprisedb.com/Make executable$ chmod +x postgre_file.binExecute and install$ ./postgre_file.bin sudo if needed
    • Thats all folks Thanks!