SlideShare a Scribd company logo
Declare Independence
               from your IT department
                       Sysadmin skills for Symfony developers
                            June 8, 2012 - Symfony Live Paris
                                 Pablo Godel @pgodel



Friday, June 8, 2012
Agenda


                        - Why SysAdmin Skills
                       - Introduction to LAMP
                       - Hosting options
                       - Linux distributions
                       - Installing PHP options
                       - Deploying PHP
                       - Various production tips
                       - Monitoring
                       - Backups




Friday, June 8, 2012
Who Am I?

     ⁃ Born in Argentina, living in the US since 1999
     ⁃ PHP & Symfony developer
     ⁃ Founder of the original PHP mailing list in spanish
     ⁃ Master of the parrilla




Friday, June 8, 2012
Who Am I?

     ⁃ Born in Argentina, living in the US since 1999
     ⁃ PHP & Symfony developer
     ⁃ Founder of the original PHP mailing list in spanish
     ⁃ Master of the parrilla




Friday, June 8, 2012
Friday, June 8, 2012
ServerGrove!

      ⁃ Founded ServerGrove Networks in 2005

      ⁃ Provider of web hosting specialized in PHP,
        Symfony, ZendFramework, and others

      ⁃ Now with servers in Europe (and USA)

      ⁃ Mongohosting.com under beta!




Friday, June 8, 2012
Community is our teacher
            ⁃ Very active open source supporter through code
              contributions and usergroups/conference sponsoring




Friday, June 8, 2012
Who needs them?




                       Sysadmin Skills


Friday, June 8, 2012
Text




                       IT is busy / Different Priorities
Friday, June 8, 2012
!Rocket Science
Friday, June 8, 2012
Lack of control
Friday, June 8, 2012
Less downtime
Friday, June 8, 2012
Better Performance
Friday, June 8, 2012
What do you prefer?
Friday, June 8, 2012
Or this?
Friday, June 8, 2012
I     s.
                I ’   s  L.
                E     Cs ,
                       .


                            An example...
Friday, June 8, 2012
What is




                       LAMP

Friday, June 8, 2012
Friday, June 8, 2012
Friday, June 8, 2012
Friday, June 8, 2012
                       LAMP
Friday, June 8, 2012
                       LAMP
Friday, June 8, 2012
                       LAMP
Scott Beale




Friday, June 8, 2012
                       LAMP
Friday, June 8, 2012
                       LNMP
Friday, June 8, 2012
                       LAMP
Friday, June 8, 2012
                       LAPP
Friday, June 8, 2012
                       LANMMPP
Why?




                       LANMMPP

Friday, June 8, 2012
Why LANMMPP




                        Proven


Friday, June 8, 2012
Why LANMMPP




                         Stable


Friday, June 8, 2012
Why LANMMPP




                        Secure


Friday, June 8, 2012
Why LANMMPP




                          Free




Friday, June 8, 2012
Why LANMMPP




                         Free*


Friday, June 8, 2012
Why LANMMPP




                       Inexpensive


Friday, June 8, 2012
Why LANMMPP




                       Easily Available


Friday, June 8, 2012
Hosting Options




Friday, June 8, 2012
Hosting Options
                       Shared Hosting
                       +                -
    - Inexpensive              - Shared resources
    - Widely available         - No/Limited Shell
    - Easy to use              - Many restrictions
    - No maintenance           - No control
    - No updates               - Fixed versions
    - Instant provisioning     - Multitude of CPs
    - DNS/Email services
Friday, June 8, 2012
Hosting Options
                       Dedicated Servers
                       +                  -
  - Full control               - Hard to plan
  - No sharing                 - Software updates
  - Best performance           - SysAdmin skills
  - Software / Hardware        - Expensive to start
  to specs                     - Parts replacements
                               - Control Panel licenses

Friday, June 8, 2012
Hosting Options
                       Virtual Servers / VPS
                                  -
                           - Shared resources
                           - Software updates
                           - SysAdmin skills
                           - Limited/No CP
                           - Lack of email


Friday, June 8, 2012
Hosting Options
                       Virtual Servers / VPS
                        +                 +
     - Inexpensive               - Custom configurations
     - Widely available          - Snapshots
     - Choice of OS              - Multiple Envs
     - Root access
     - Full shell
     - Fast provisioning
     - Custom software
Friday, June 8, 2012
Hosting Options
                            Cloud Hosting
                        +                   -

                       Depends on implementation




Friday, June 8, 2012
Hosting Options
                          Cloud Hosting

                       Some are a shared hosting
                       with a fancy new name




Friday, June 8, 2012
Hosting Options
                          Cloud Hosting

                       Some are a shared hosting
                       with a fancy new name
                       Others let you start small
                       and scale easily



Friday, June 8, 2012
Hosting Options
                          Cloud Hosting

                       Some are a shared hosting
                       with a fancy new name
                       Others let you start small
                       and scale easily
                       Gets really expensive at
                       scale

Friday, June 8, 2012
Hosting Options
                         Cloud Hosting
                       Most suffer from some of the
                       shared hosting problems:
                       - vendor lock-in
                       - lack of control
                       - high learning curve
                       - limited environment


Friday, June 8, 2012
Hosting Options




                       Which one to choose?




Friday, June 8, 2012
Hosting Options
                       Which one to choose?



                          IT   DEPENDS




Friday, June 8, 2012
Linux Distributions




Friday, June 8, 2012
Distributions
                             RedHat based

                       - Fedora
                       - RedHat Enterprise Linux (RHEL)
                       - CentOS
                       - Scientific Linux




Friday, June 8, 2012
Distributions
                              Debian based

                       - Debian
                       - Ubuntu




Friday, June 8, 2012
Distributions
                                        Others
                       - Gentoo
                       - Slackware
                       - OpenSuse
                       - Archlinux
                       - any many many more!


                                   http://distrowatch.com/
                       http://en.wikipedia.org/wiki/Linux_distribution
Friday, June 8, 2012
Distributions
                       Key differences
                       - Configuration files
                       - Package Manager
                       - Managing Services
                       - Software versions
                       - Updates




Friday, June 8, 2012
Distributions
                         Key differences
   - Configuration files

           CentOS

            /etc/sysconfig/network-scripts/ifcfg-eth0

          Ubuntu

              /etc/network/interfaces



Friday, June 8, 2012
Distributions
                         Key differences
   - Package Manager

             CentOS

              yum install php-cli

            Ubuntu

             apt-get install php5



Friday, June 8, 2012
Distributions
                        Key differences
   - Package Manager

            CentOS

              yum search php-cli

           Ubuntu

              apt-cache search php



Friday, June 8, 2012
Distributions
                        Key differences
   - Managing Services
           CentOS

           service restart httpd
           chkconfig --list httpd
           chkconfig httpd on

          Ubuntu
           service restart apache2
           sudo update-rc.d apache2 enable
Friday, June 8, 2012
Distributions
                         Key differences
   - Software versions

          CentOS

           httpd-2.2.3

         Ubuntu

           apache-2.2.17



Friday, June 8, 2012
Distributions
                         Key differences
   - Updates

           CentOS 5.x

             PHP 5.1.6

           Ubuntu 11

             PHP 5.3.5



Friday, June 8, 2012
Distributions
                           Key similarities

                       - Based on Linux Kernel

                       - Screwed up or ancient PHP
                       - Lack of PHP extensions




Friday, June 8, 2012
Distributions
                       Which one to choose?



                          IT   DEPENDS




Friday, June 8, 2012
Distributions
                       Which one to choose?

                       - Best feeling
                       - Previous experience
                       - Workplace selection
                       - Coworker / friend knowledge



Friday, June 8, 2012
Distributions
                          Test Drive

                       Virtual Machines:

                       - VirtualBox
                       - Parallels
                       - VMware
                       - VPS


Friday, June 8, 2012
Installing PHP




Friday, June 8, 2012
Installing PHP
                                        CentOS


                       yum install php php-cli
                       yum install php-libxml




Friday, June 8, 2012
Installing PHP
                               CentOS
                       Third Party Repositories
                       - Remi RPM
                       http://blog.famillecollet.com/
                       - Webtatic
                       http://www.webtatic.com/
                       - ServerGrove: PHP 5.3.13 / 5.4.3
                       (always latest)
                       http://repos.servergrove.com
Friday, June 8, 2012
Installing PHP
                               CentOS
                       Third Party Repositories

   cd /etc/yum.repos.d/
   wget http://repos.servergrove.com/servergrove-centos-5/
   servergrove-centos-5.repo
   yum install php53 # or php54




Friday, June 8, 2012
Installing PHP
                          Ubuntu

    apt-get install php5 libapache2-mod-php5
    apt-get install php5-libxml




Friday, June 8, 2012
Installing PHP
                               Ubuntu
                       Third Party Repositories
                               PHP 5.3.13 / 5.4.3

                        - Dotdeb:
                        http://www.dotdeb.org/
                        - ServerGrove: (always latest)
                        http://repos.servergrove.com

Friday, June 8, 2012
Installing PHP
                               Ubuntu
                       Third Party Repositories

  echo “deb http://repos.servergrove.com/servergrove-ubuntu-
  natty natty main” >> /etc/apt/sources.list.d/servergrove.list
  apt-get install php53 # or php54




Friday, June 8, 2012
Installing PHP
                       From Source


   wget http://us2.php.net/get/php-5.4.3.tar.bz2/from/
   www.php.net/mirror
   tar jxvf php-5.4.3.tar.bz2
   cd php-5.4.3
   ./configure
   make && make install



Friday, June 8, 2012
Installing PHP
                       Recompiling
  php -i |grep configure
  ./configure '--with-apxs2=/usr/sbin/apxs' '--prefix=/usr/local/
  php53' '--with-config-file-scan-dir=/etc/php53/conf.d' '--
  enable-bcmath' '--enable-ctype' '--enable-exif' '--enable-
  mbstring' '--enable-ftp' '--enable-intl' '--enable-sockets' '--
  enable-sysvmsg' '--enable-pcntl' '--with-bz2' '--with-curl' '--
  with-gettext' '--with-gd' '--enable-gd-native-ttf' '--enable-exif' '--
  with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-t1lib=/usr'
  '--with-mcrypt' '--with-openssl' '--with-kerberos' '--with-iconv'
  '--with-xsl' '--with-xmlrpc' '--with-zlib' '--with-mysql=mysqlnd' '--
  with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd'
  make && make install
Friday, June 8, 2012
Installing PHP
                       Compiling for Apache


    ./configure '--with-apxs2=/usr/sbin/apxs'
    make && make install




Friday, June 8, 2012
Installing PHP
Compiling for Nginx / PHP-FPM


                       ./configure '--enable-fpm'
                       make && make install




Friday, June 8, 2012
Installing PHP
                           Compiling extension



                       ./configure --with-curl --enable-ftp
                       make && make install




Friday, June 8, 2012
Installing PHP
                           Compiling extension
                              (dynamic)

                       cd ext/curl
                       phpize
                       ./configure
                       make && make install
                       echo “extension=curl.so” >> php.ini




Friday, June 8, 2012
Installing PHP
                       Compiling extension



                          http://pecl.php.net/




Friday, June 8, 2012
Installing PHP
                       Compiling extension
                            (PECL)
    pecl install apc
    # or
    pecl download apc
    tar zxvf APC-3.1.9.tgz
    cd APC-3.19
    phpize
    ./configure
    make && make install
    echo “extension=apc.so” >> php.ini
Friday, June 8, 2012
Installing PHP
                         Automate!


                         - Chef
                         - Puppet
                         - ...




Friday, June 8, 2012
Installing PHP
                              Configuration

                   Default location

                       /usr/local/lib/php.ini

                   Other common locations

                       /etc/php/php.ini
                       /etc/php5/cli/php.ini

                       /etc/php5/apache2/php.ini

Friday, June 8, 2012
Installing PHP
                       Configuration

  php -i | grep php.ini
   Configuration File (php.ini) Path => /usr/local/php5/lib
   Loaded Configuration File => /usr/local/php5-20110426-093151/
   lib/php.ini
   Scan this dir for additional .ini files => /usr/local/php5/php.d
   Additional .ini files parsed => /usr/local/php5/php.d/10-
   extension_dir.ini,



Friday, June 8, 2012
Installing PHP
                       Configuration

  php -i | grep mongo
   /usr/local/php5/php.d/50-extension-mongo.ini,
   mongo
   mongo.allow_empty_keys => 0 => 0
   mongo.allow_persistent => 1 => 1
   mongo.auto_reconnect => 1 => 1
   mongo.chunk_size => 262144 => 262144
   mongo.cmd => $ => $
   mongo.default_host => localhost => localhost
   mongo.default_port => 27017 => 27017
Friday, June 8, 2012
Installing PHP
                       Configuration
           php -m
           [PHP Modules]
           apc
           bcmath
           bz2
           Core
           ctype
           curl
           date
           dom
           ereg
Friday, June 8, 2012
Installing PHP
                       Configuration
                         php.ini
             extension_dir=/usr/lib/php/extensions/no-
             debug-non-zts-20090626

             extension=apc.so
             extension=mongo.so


Friday, June 8, 2012
Installing PHP
                       Configuration
                         php.ini

   php -i | grep extension_dir
   extension_dir => /usr/local/php5/lib/php/extensions/no-debug-
   non-zts-20090626




Friday, June 8, 2012
Installing PHP
                            Configuration
                              php.ini

                       date.timezone=UTC
                       display_errors = off
                       log_errors = on
                       error_log = /var/log/php.log


Friday, June 8, 2012
Installing PHP
                          Configuration
                            Security
                       memory_limit = 128M
                       max_execution_time = 30
                       display_errors = off
                       expose_php = off
                       mail.log = /var/log/phpmails.log
                       disable_functions = exec
                       allow_url_fopen = off



Friday, June 8, 2012
Installing PHP
                       Configuration
                 File uploads on .htaccess
                         php_value memory_limit 128M
                         php_value max_file_uploads 20
                         php_value max_input_time -1
                         php_value post_max_size 8M
                         php_value upload_max_filesize 2M
                         php_value max_execution_time 0



                       AllowOverride=All in Apache!
Friday, June 8, 2012
Installing PHP
                             Configuration
                               Apache
                           php_value date.timezone UTC
                           php_flag display_errors 1
                           php_value memory_limit 128M
                           php_value max_execution_time 0



                       Donʼt forget to restart Apache
Friday, June 8, 2012
Installing PHP
                            Web Server User
             Permissions issues with clear cache
             and uploads, Anyone?

          Possible users
                       - apache
                       - nobody
                       - www-data
                       - ftp / ssh user (sometimes)


Friday, June 8, 2012
Installing PHP
                       Web Server User
             Permissions issues with clear cache
             and uploads, Anyone?

 Fix:
  rm -rf app/cache/*
  rm -rf app/logs/*

  sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache
  app/logs
  sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache
  app/logs




        http://symfony.com/doc/current/book/installation.html
Friday, June 8, 2012
Deploying PHP




Friday, June 8, 2012
Deploying PHP
                         Before going live
                                        Make sure ntpd is
                                        installed and running
                                        to ensure accurate
                                        server time

                 yum install ntp
                 chkconfig ntpd on
                 ntpdate pool.ntp.org


Friday, June 8, 2012
Deploying PHP
                              Before going live
          - Limit access by IP

                       <Location /admin>
                         Order Deny,Allow
                         Deny from all
                         Allow from 1.2.3.4
                       </Location>




Friday, June 8, 2012
Deploying PHP
                              Before going live
         - Add HTTP Authentication


                       <Location /admin>
                           Require valid-user
                           AuthType Basic
                           AuthName "SG"
                           AuthUserFile /path/users
                       </Location>


Friday, June 8, 2012
Deploying PHP
                       Before going live

                  - Quiet down Apache

                  ServerTokens Prod




Friday, June 8, 2012
Deploying PHP
                              Before going live
                   Move document root with .htaccess
                       RewriteEngine On

                       RewriteRule ^.htaccess$ - [F]

                       RewriteCond %{REQUEST_FILENAME} -f
                       RewriteRule ^.*$ - [NC,L]

                       RewriteCond %{REQUEST_URI} !^/web/.*$
                       RewriteRule ^(.*)$ /web/$1

Friday, June 8, 2012
Deploying PHP
                          Before going live
                - Case senstive filesystem

                IPCheck_Form_Index_Login !=
                IpCheck_Form_Index_Login
               /path/to/file/IpCheck_Form_Index_Login.php
                <?php
                class IPCheck_Form_Index_Login
                {
                ...



Friday, June 8, 2012
Deploying PHP
                       - server-side vi
                       - plain old FTP
                       - SFTP
                       - scp
                       - rsync + ssh
                       - git
                       - tar / gzip
                       - rpm / deb packages
                       - capistrano / capifony

Friday, June 8, 2012
Deploying PHP
                       - server-side vi
                       - plain old FTP
                       - SFTP
                       - scp
                       - rsync + ssh
                       - git
                       - tar / gzip
                       - rpm / deb packages
                       - capistrano / capifony

Friday, June 8, 2012
Deploying PHP
                       Effing Package Management

              Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.



              fpm -s dir -t rpm -n "sfapp" -v 1.0 /var/www/sfapp

              fpm -s dir -t deb -a all -n sfapp -v 1.0 /etc/apache2/
              conf.d/my.conf /var/www/sfapp



                          https://github.com/jordansissel/fpm

Friday, June 8, 2012
Deploying PHP
                                  Capifony


             - multiple servers
             - multiple environments
             - setup shared folders (vendors, cache, logs, etc)
             - copy files
             - update vendors
             - multi versions
             - rollback
             - restart apache



Friday, June 8, 2012
Deploying PHP




                         Automate!




Friday, June 8, 2012
DNS Tips
                       The Power of the hosts file




Friday, June 8, 2012
DNS Tips
                        The Power of the hosts file



                       /etc/hosts

                       10.0.1.1 www.lottery.com




Friday, June 8, 2012
DNS Tips
                       The Power of the hosts file



           /etc/hosts

          10.0.1.1 example1.com example2.com




Friday, June 8, 2012
DNS Tips
                       Virtual Document Root

   UseCanonicalName Off

   VirtualDocumentRoot /var/www/vhosts/%0/web

   <Location /var/www/vhosts>
       AllowOverride All
       Options +FollowSymLinks
   </Location>


            example.com => /var/www/vhosts/example.com/web
            example2.com => /var/www/vhosts/example2.com/web
Friday, June 8, 2012
DNS Tips
                       Nameservers/Expiration

   whois servergrove.com
   ...
   Name Servers:
      ns1.servergrove.com
      ns2.servergrove.com
      ns3.servergrove.com

   Creation date: 19 May 2005 23:34:36
   Expiration date: 19 May 2014 23:34:00



Friday, June 8, 2012
DNS Tips
                       DNS records
   dig -t A google.com
   ;; ANSWER SECTION:
   google.com.       184 IN A   74.125.230.227
   google.com.       184 IN A   74.125.230.228
   google.com.       184 IN A   74.125.230.229
   google.com.       184 IN A   74.125.230.230
   google.com.       184 IN A   74.125.230.231
   google.com.       184 IN A   74.125.230.232
   google.com.       184 IN A   74.125.230.233
   google.com.       184 IN A   74.125.230.238
   google.com.       184 IN A   74.125.230.224
   google.com.       184 IN A   74.125.230.225
   google.com.       184 IN A   74.125.230.226
Friday, June 8, 2012
DNS Tips
                       DNS records



   dig -t A servergrove.eu @ns1.servergrove.com
   ;; ANSWER SECTION:
   servergrove.eu.      3600 IN A 149.5.47.100




Friday, June 8, 2012
DNS Tips
                                   traceroute


   traceroute google.com

   traceroute to google.com (173.194.37.33), 30 hops max, 40 byte packets
    1 2.69-195-222.static.servergrove.com (69.195.222.2) 0.360 ms 0.365 ms 0.432 ms
    2 t0-1-0-5.br2.mia.terremark.net (66.165.161.45) 1.558 ms 1.546 ms 1.532 ms
    3 core1-1-0-0.mia.net.google.com (198.32.124.133) 0.238 ms 0.224 ms 0.230 ms
    4 209.85.253.74 (209.85.253.74) 0.266 ms 0.283 ms 0.312 ms
    5 209.85.254.252 (209.85.254.252) 12.764 ms 12.757 ms 12.749 ms
    6 64.233.175.92 (64.233.175.92) 14.177 ms 14.257 ms 14.359 ms
    7 atl14s07-in-f1.1e100.net (173.194.37.33) 13.653 ms 13.606 ms 13.618 ms




Friday, June 8, 2012
DNS Tips
                       http://whereisitup.com




Friday, June 8, 2012
DNS Tips
                          mtr




Friday, June 8, 2012
Monitoring




Friday, June 8, 2012
Monitoring
                          Apache Requests

                       <Location /server-status>
                         SetHandler server-status
                         Order deny,allow
                         Deny from all
                         Allow from .your_domain.com
                       </Location>

                       ExtendedStatus On




Friday, June 8, 2012
Monitoring
                       Apache Requests




Friday, June 8, 2012
Monitoring

                       - Cacti
                       - Ganglia
                       - Zabbix
                       - collectd
                       - statsd / StatsDBundle
                       - graphite



Friday, June 8, 2012
Monitoring
                       statsd / StatsDBundle / Graphite




Friday, June 8, 2012
Monitoring
                       CPU / Memory / IO
                              top




Friday, June 8, 2012
Monitoring
                            IO
                          iotop




Friday, June 8, 2012
Monitoring
                         Network
                          iptraf




Friday, June 8, 2012
Monitoring
                             Handling logs


            - Centralize logs with syslog
                       error_log = syslog



            - Monolog supports syslog
            - logstash, logster, loggly, logio



Friday, June 8, 2012
Speeding up




Friday, June 8, 2012
Speeding up


                       - nginx/php-fpm
                       - APC
                       - Memcache
                       - nginx reverse proxy cache
                       - Varnish




Friday, June 8, 2012
Backups




Friday, June 8, 2012
Backups


                       - rsync
                       - rdiff-backup
                       - Unison
                       - Bacula
                       - Amanda




Friday, June 8, 2012
Backups




                       Donʼt forget to backup your DB!




Friday, June 8, 2012
Reading List




     - Automating UNIX and Linux Administration
     - Running Linux
     - Learning the bash Shell: Unix Shell Programming




Friday, June 8, 2012
The End

                               Questions?
                       Sysadmin skills for Symfony developers




Friday, June 8, 2012
Feedback Please!
                                                  https://joind.in/6605


                       Sysadmin skills for Symfony developers
                                 Pablo Godel @pgodel

                               Thank you!
Friday, June 8, 2012

More Related Content

PDF
Continuous Deployment at Disqus (Pylons Minicon)
PDF
Puppet Camp Berlin 2014: Advanced Puppet Design
PDF
Designing Puppet: Roles/Profiles Pattern
PDF
Yocto Project - OSCON 7-17-2012
PDF
Puppetconf2011 small
PDF
Why you should use the Yocto Project
PDF
Developers! Y U No Open Source Ur Code?
KEY
Django Package Thunderdome by Audrey Roy & Daniel Greenfeld
Continuous Deployment at Disqus (Pylons Minicon)
Puppet Camp Berlin 2014: Advanced Puppet Design
Designing Puppet: Roles/Profiles Pattern
Yocto Project - OSCON 7-17-2012
Puppetconf2011 small
Why you should use the Yocto Project
Developers! Y U No Open Source Ur Code?
Django Package Thunderdome by Audrey Roy & Daniel Greenfeld

Viewers also liked (20)

PDF
Indigenous Economic Development: Paper presented to IDB Indigenous Developme...
PPT
Nemours results
PPTX
Pemodelan Geografi berbasis AHP
PPTX
Q4 10
PPTX
Irma present 2
PPTX
Improving Land Governance for Inclusive and Sustainable Agriculture Transform...
PPT
Good shifts in the music industry
PPT
My hobbi1
DOCX
Network Layer
PPTX
AEF4 2C 1
PPTX
Aef4 05
PPT
Us2aware
PPT
Metaphor elicitation research
PPT
Roditelska noemvri 2014
PPTX
The cut scenes
PPSX
Nossa senhora do rosario
PPTX
Unit 5 listening 1
PDF
Hp allinone
DOC
Proyecto7
Indigenous Economic Development: Paper presented to IDB Indigenous Developme...
Nemours results
Pemodelan Geografi berbasis AHP
Q4 10
Irma present 2
Improving Land Governance for Inclusive and Sustainable Agriculture Transform...
Good shifts in the music industry
My hobbi1
Network Layer
AEF4 2C 1
Aef4 05
Us2aware
Metaphor elicitation research
Roditelska noemvri 2014
The cut scenes
Nossa senhora do rosario
Unit 5 listening 1
Hp allinone
Proyecto7
Ad

Similar to Declare independence from your it department sysadmin skills for symfony developers (20)

PDF
Soflophp 2013 - SysAdmin skills for PHP developers
PDF
CLOUD LOCK-IN AND THE MYTH OF OPEN APIS at Structure 2012
PDF
Spring in-the-cloud
PDF
Open Source Tools For Freelancers
PDF
Open Source Tool Chains for Cloud Computing
PDF
Crash Course in Open Source Cloud Computing
PDF
Codeworks'12 Rock Solid Deployment of PHP Apps
PDF
Drupal In The Cloud
PDF
Delivering Infrastructure-as-a-Service with Open Source Software
PPT
Arizona IT Management Service Book
PDF
Crash Course in Open Source Cloud Computing
PPT
Webmaster
PPT
Webmaster
PPTX
NCET Tech Bite | Ron Husey, Moving Your Business to the Cloud | Mar 2016
PDF
Cloud Foundry and Ubuntu - 2012
PDF
No Really, It's All About You
PDF
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PDF
Practicing Continuous Deployment
PDF
The Art of the Spike
PDF
Dtu 2012_03_15
Soflophp 2013 - SysAdmin skills for PHP developers
CLOUD LOCK-IN AND THE MYTH OF OPEN APIS at Structure 2012
Spring in-the-cloud
Open Source Tools For Freelancers
Open Source Tool Chains for Cloud Computing
Crash Course in Open Source Cloud Computing
Codeworks'12 Rock Solid Deployment of PHP Apps
Drupal In The Cloud
Delivering Infrastructure-as-a-Service with Open Source Software
Arizona IT Management Service Book
Crash Course in Open Source Cloud Computing
Webmaster
Webmaster
NCET Tech Bite | Ron Husey, Moving Your Business to the Cloud | Mar 2016
Cloud Foundry and Ubuntu - 2012
No Really, It's All About You
PFCongres 2012 - Rock Solid Deployment of PHP Apps
Practicing Continuous Deployment
The Art of the Spike
Dtu 2012_03_15
Ad

More from Pablo Godel (20)

PDF
SymfonyCon Cluj 2017 - Symfony at OpenSky
PDF
Symfony Live San Francisco 2017 - Symfony @ OpenSky
PDF
DeSymfony 2017 - Symfony en OpenSky
PDF
Deploying Symfony | symfony.cat
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
PDF
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
PDF
The Modern Developer Toolbox
PDF
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PDF
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
PDF
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
PDF
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
PDF
Lone StarPHP 2013 - Building Web Apps from a New Angle
PDF
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
PDF
Creating Mobile Apps With PHP & Symfony2
PDF
Tek13 - Creating Mobile Apps with PHP and Symfony
PDF
Tek 2013 - Building Web Apps from a New Angle with AngularJS
PDF
Symfony2 and MongoDB - MidwestPHP 2013
PDF
Rock Solid Deployment of Web Applications
PDF
Symfony2 y MongoDB - deSymfony 2012
SymfonyCon Cluj 2017 - Symfony at OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSky
DeSymfony 2017 - Symfony en OpenSky
Deploying Symfony | symfony.cat
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
The Modern Developer Toolbox
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone StarPHP 2013 - Building Web Apps from a New Angle
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
Creating Mobile Apps With PHP & Symfony2
Tek13 - Creating Mobile Apps with PHP and Symfony
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Symfony2 and MongoDB - MidwestPHP 2013
Rock Solid Deployment of Web Applications
Symfony2 y MongoDB - deSymfony 2012

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
Teaching material agriculture food technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Teaching material agriculture food technology
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Declare independence from your it department sysadmin skills for symfony developers

  • 1. Declare Independence from your IT department Sysadmin skills for Symfony developers June 8, 2012 - Symfony Live Paris Pablo Godel @pgodel Friday, June 8, 2012
  • 2. Agenda - Why SysAdmin Skills - Introduction to LAMP - Hosting options - Linux distributions - Installing PHP options - Deploying PHP - Various production tips - Monitoring - Backups Friday, June 8, 2012
  • 3. Who Am I? ⁃ Born in Argentina, living in the US since 1999 ⁃ PHP & Symfony developer ⁃ Founder of the original PHP mailing list in spanish ⁃ Master of the parrilla Friday, June 8, 2012
  • 4. Who Am I? ⁃ Born in Argentina, living in the US since 1999 ⁃ PHP & Symfony developer ⁃ Founder of the original PHP mailing list in spanish ⁃ Master of the parrilla Friday, June 8, 2012
  • 6. ServerGrove! ⁃ Founded ServerGrove Networks in 2005 ⁃ Provider of web hosting specialized in PHP, Symfony, ZendFramework, and others ⁃ Now with servers in Europe (and USA) ⁃ Mongohosting.com under beta! Friday, June 8, 2012
  • 7. Community is our teacher ⁃ Very active open source supporter through code contributions and usergroups/conference sponsoring Friday, June 8, 2012
  • 8. Who needs them? Sysadmin Skills Friday, June 8, 2012
  • 9. Text IT is busy / Different Priorities Friday, June 8, 2012
  • 11. Lack of control Friday, June 8, 2012
  • 14. What do you prefer? Friday, June 8, 2012
  • 16. I     s. I ’   s  L. E     Cs ,        . An example... Friday, June 8, 2012
  • 17. What is LAMP Friday, June 8, 2012
  • 20. Friday, June 8, 2012 LAMP
  • 21. Friday, June 8, 2012 LAMP
  • 22. Friday, June 8, 2012 LAMP
  • 23. Scott Beale Friday, June 8, 2012 LAMP
  • 24. Friday, June 8, 2012 LNMP
  • 25. Friday, June 8, 2012 LAMP
  • 26. Friday, June 8, 2012 LAPP
  • 27. Friday, June 8, 2012 LANMMPP
  • 28. Why? LANMMPP Friday, June 8, 2012
  • 29. Why LANMMPP Proven Friday, June 8, 2012
  • 30. Why LANMMPP Stable Friday, June 8, 2012
  • 31. Why LANMMPP Secure Friday, June 8, 2012
  • 32. Why LANMMPP Free Friday, June 8, 2012
  • 33. Why LANMMPP Free* Friday, June 8, 2012
  • 34. Why LANMMPP Inexpensive Friday, June 8, 2012
  • 35. Why LANMMPP Easily Available Friday, June 8, 2012
  • 37. Hosting Options Shared Hosting + - - Inexpensive - Shared resources - Widely available - No/Limited Shell - Easy to use - Many restrictions - No maintenance - No control - No updates - Fixed versions - Instant provisioning - Multitude of CPs - DNS/Email services Friday, June 8, 2012
  • 38. Hosting Options Dedicated Servers + - - Full control - Hard to plan - No sharing - Software updates - Best performance - SysAdmin skills - Software / Hardware - Expensive to start to specs - Parts replacements - Control Panel licenses Friday, June 8, 2012
  • 39. Hosting Options Virtual Servers / VPS - - Shared resources - Software updates - SysAdmin skills - Limited/No CP - Lack of email Friday, June 8, 2012
  • 40. Hosting Options Virtual Servers / VPS + + - Inexpensive - Custom configurations - Widely available - Snapshots - Choice of OS - Multiple Envs - Root access - Full shell - Fast provisioning - Custom software Friday, June 8, 2012
  • 41. Hosting Options Cloud Hosting + - Depends on implementation Friday, June 8, 2012
  • 42. Hosting Options Cloud Hosting Some are a shared hosting with a fancy new name Friday, June 8, 2012
  • 43. Hosting Options Cloud Hosting Some are a shared hosting with a fancy new name Others let you start small and scale easily Friday, June 8, 2012
  • 44. Hosting Options Cloud Hosting Some are a shared hosting with a fancy new name Others let you start small and scale easily Gets really expensive at scale Friday, June 8, 2012
  • 45. Hosting Options Cloud Hosting Most suffer from some of the shared hosting problems: - vendor lock-in - lack of control - high learning curve - limited environment Friday, June 8, 2012
  • 46. Hosting Options Which one to choose? Friday, June 8, 2012
  • 47. Hosting Options Which one to choose? IT DEPENDS Friday, June 8, 2012
  • 49. Distributions RedHat based - Fedora - RedHat Enterprise Linux (RHEL) - CentOS - Scientific Linux Friday, June 8, 2012
  • 50. Distributions Debian based - Debian - Ubuntu Friday, June 8, 2012
  • 51. Distributions Others - Gentoo - Slackware - OpenSuse - Archlinux - any many many more! http://distrowatch.com/ http://en.wikipedia.org/wiki/Linux_distribution Friday, June 8, 2012
  • 52. Distributions Key differences - Configuration files - Package Manager - Managing Services - Software versions - Updates Friday, June 8, 2012
  • 53. Distributions Key differences - Configuration files CentOS /etc/sysconfig/network-scripts/ifcfg-eth0 Ubuntu /etc/network/interfaces Friday, June 8, 2012
  • 54. Distributions Key differences - Package Manager CentOS yum install php-cli Ubuntu apt-get install php5 Friday, June 8, 2012
  • 55. Distributions Key differences - Package Manager CentOS yum search php-cli Ubuntu apt-cache search php Friday, June 8, 2012
  • 56. Distributions Key differences - Managing Services CentOS service restart httpd chkconfig --list httpd chkconfig httpd on Ubuntu service restart apache2 sudo update-rc.d apache2 enable Friday, June 8, 2012
  • 57. Distributions Key differences - Software versions CentOS httpd-2.2.3 Ubuntu apache-2.2.17 Friday, June 8, 2012
  • 58. Distributions Key differences - Updates CentOS 5.x PHP 5.1.6 Ubuntu 11 PHP 5.3.5 Friday, June 8, 2012
  • 59. Distributions Key similarities - Based on Linux Kernel - Screwed up or ancient PHP - Lack of PHP extensions Friday, June 8, 2012
  • 60. Distributions Which one to choose? IT DEPENDS Friday, June 8, 2012
  • 61. Distributions Which one to choose? - Best feeling - Previous experience - Workplace selection - Coworker / friend knowledge Friday, June 8, 2012
  • 62. Distributions Test Drive Virtual Machines: - VirtualBox - Parallels - VMware - VPS Friday, June 8, 2012
  • 64. Installing PHP CentOS yum install php php-cli yum install php-libxml Friday, June 8, 2012
  • 65. Installing PHP CentOS Third Party Repositories - Remi RPM http://blog.famillecollet.com/ - Webtatic http://www.webtatic.com/ - ServerGrove: PHP 5.3.13 / 5.4.3 (always latest) http://repos.servergrove.com Friday, June 8, 2012
  • 66. Installing PHP CentOS Third Party Repositories cd /etc/yum.repos.d/ wget http://repos.servergrove.com/servergrove-centos-5/ servergrove-centos-5.repo yum install php53 # or php54 Friday, June 8, 2012
  • 67. Installing PHP Ubuntu apt-get install php5 libapache2-mod-php5 apt-get install php5-libxml Friday, June 8, 2012
  • 68. Installing PHP Ubuntu Third Party Repositories PHP 5.3.13 / 5.4.3 - Dotdeb: http://www.dotdeb.org/ - ServerGrove: (always latest) http://repos.servergrove.com Friday, June 8, 2012
  • 69. Installing PHP Ubuntu Third Party Repositories echo “deb http://repos.servergrove.com/servergrove-ubuntu- natty natty main” >> /etc/apt/sources.list.d/servergrove.list apt-get install php53 # or php54 Friday, June 8, 2012
  • 70. Installing PHP From Source wget http://us2.php.net/get/php-5.4.3.tar.bz2/from/ www.php.net/mirror tar jxvf php-5.4.3.tar.bz2 cd php-5.4.3 ./configure make && make install Friday, June 8, 2012
  • 71. Installing PHP Recompiling php -i |grep configure ./configure '--with-apxs2=/usr/sbin/apxs' '--prefix=/usr/local/ php53' '--with-config-file-scan-dir=/etc/php53/conf.d' '-- enable-bcmath' '--enable-ctype' '--enable-exif' '--enable- mbstring' '--enable-ftp' '--enable-intl' '--enable-sockets' '-- enable-sysvmsg' '--enable-pcntl' '--with-bz2' '--with-curl' '-- with-gettext' '--with-gd' '--enable-gd-native-ttf' '--enable-exif' '-- with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-t1lib=/usr' '--with-mcrypt' '--with-openssl' '--with-kerberos' '--with-iconv' '--with-xsl' '--with-xmlrpc' '--with-zlib' '--with-mysql=mysqlnd' '-- with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' make && make install Friday, June 8, 2012
  • 72. Installing PHP Compiling for Apache ./configure '--with-apxs2=/usr/sbin/apxs' make && make install Friday, June 8, 2012
  • 73. Installing PHP Compiling for Nginx / PHP-FPM ./configure '--enable-fpm' make && make install Friday, June 8, 2012
  • 74. Installing PHP Compiling extension ./configure --with-curl --enable-ftp make && make install Friday, June 8, 2012
  • 75. Installing PHP Compiling extension (dynamic) cd ext/curl phpize ./configure make && make install echo “extension=curl.so” >> php.ini Friday, June 8, 2012
  • 76. Installing PHP Compiling extension http://pecl.php.net/ Friday, June 8, 2012
  • 77. Installing PHP Compiling extension (PECL) pecl install apc # or pecl download apc tar zxvf APC-3.1.9.tgz cd APC-3.19 phpize ./configure make && make install echo “extension=apc.so” >> php.ini Friday, June 8, 2012
  • 78. Installing PHP Automate! - Chef - Puppet - ... Friday, June 8, 2012
  • 79. Installing PHP Configuration Default location /usr/local/lib/php.ini Other common locations /etc/php/php.ini /etc/php5/cli/php.ini /etc/php5/apache2/php.ini Friday, June 8, 2012
  • 80. Installing PHP Configuration php -i | grep php.ini Configuration File (php.ini) Path => /usr/local/php5/lib Loaded Configuration File => /usr/local/php5-20110426-093151/ lib/php.ini Scan this dir for additional .ini files => /usr/local/php5/php.d Additional .ini files parsed => /usr/local/php5/php.d/10- extension_dir.ini, Friday, June 8, 2012
  • 81. Installing PHP Configuration php -i | grep mongo /usr/local/php5/php.d/50-extension-mongo.ini, mongo mongo.allow_empty_keys => 0 => 0 mongo.allow_persistent => 1 => 1 mongo.auto_reconnect => 1 => 1 mongo.chunk_size => 262144 => 262144 mongo.cmd => $ => $ mongo.default_host => localhost => localhost mongo.default_port => 27017 => 27017 Friday, June 8, 2012
  • 82. Installing PHP Configuration php -m [PHP Modules] apc bcmath bz2 Core ctype curl date dom ereg Friday, June 8, 2012
  • 83. Installing PHP Configuration php.ini extension_dir=/usr/lib/php/extensions/no- debug-non-zts-20090626 extension=apc.so extension=mongo.so Friday, June 8, 2012
  • 84. Installing PHP Configuration php.ini php -i | grep extension_dir extension_dir => /usr/local/php5/lib/php/extensions/no-debug- non-zts-20090626 Friday, June 8, 2012
  • 85. Installing PHP Configuration php.ini date.timezone=UTC display_errors = off log_errors = on error_log = /var/log/php.log Friday, June 8, 2012
  • 86. Installing PHP Configuration Security memory_limit = 128M max_execution_time = 30 display_errors = off expose_php = off mail.log = /var/log/phpmails.log disable_functions = exec allow_url_fopen = off Friday, June 8, 2012
  • 87. Installing PHP Configuration File uploads on .htaccess php_value memory_limit 128M php_value max_file_uploads 20 php_value max_input_time -1 php_value post_max_size 8M php_value upload_max_filesize 2M php_value max_execution_time 0 AllowOverride=All in Apache! Friday, June 8, 2012
  • 88. Installing PHP Configuration Apache php_value date.timezone UTC php_flag display_errors 1 php_value memory_limit 128M php_value max_execution_time 0 Donʼt forget to restart Apache Friday, June 8, 2012
  • 89. Installing PHP Web Server User Permissions issues with clear cache and uploads, Anyone? Possible users - apache - nobody - www-data - ftp / ssh user (sometimes) Friday, June 8, 2012
  • 90. Installing PHP Web Server User Permissions issues with clear cache and uploads, Anyone? Fix: rm -rf app/cache/* rm -rf app/logs/* sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs http://symfony.com/doc/current/book/installation.html Friday, June 8, 2012
  • 92. Deploying PHP Before going live Make sure ntpd is installed and running to ensure accurate server time yum install ntp chkconfig ntpd on ntpdate pool.ntp.org Friday, June 8, 2012
  • 93. Deploying PHP Before going live - Limit access by IP <Location /admin> Order Deny,Allow Deny from all Allow from 1.2.3.4 </Location> Friday, June 8, 2012
  • 94. Deploying PHP Before going live - Add HTTP Authentication <Location /admin> Require valid-user AuthType Basic AuthName "SG" AuthUserFile /path/users </Location> Friday, June 8, 2012
  • 95. Deploying PHP Before going live - Quiet down Apache ServerTokens Prod Friday, June 8, 2012
  • 96. Deploying PHP Before going live Move document root with .htaccess RewriteEngine On RewriteRule ^.htaccess$ - [F] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteCond %{REQUEST_URI} !^/web/.*$ RewriteRule ^(.*)$ /web/$1 Friday, June 8, 2012
  • 97. Deploying PHP Before going live - Case senstive filesystem IPCheck_Form_Index_Login != IpCheck_Form_Index_Login /path/to/file/IpCheck_Form_Index_Login.php <?php class IPCheck_Form_Index_Login { ... Friday, June 8, 2012
  • 98. Deploying PHP - server-side vi - plain old FTP - SFTP - scp - rsync + ssh - git - tar / gzip - rpm / deb packages - capistrano / capifony Friday, June 8, 2012
  • 99. Deploying PHP - server-side vi - plain old FTP - SFTP - scp - rsync + ssh - git - tar / gzip - rpm / deb packages - capistrano / capifony Friday, June 8, 2012
  • 100. Deploying PHP Effing Package Management Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity. fpm -s dir -t rpm -n "sfapp" -v 1.0 /var/www/sfapp fpm -s dir -t deb -a all -n sfapp -v 1.0 /etc/apache2/ conf.d/my.conf /var/www/sfapp https://github.com/jordansissel/fpm Friday, June 8, 2012
  • 101. Deploying PHP Capifony - multiple servers - multiple environments - setup shared folders (vendors, cache, logs, etc) - copy files - update vendors - multi versions - rollback - restart apache Friday, June 8, 2012
  • 102. Deploying PHP Automate! Friday, June 8, 2012
  • 103. DNS Tips The Power of the hosts file Friday, June 8, 2012
  • 104. DNS Tips The Power of the hosts file /etc/hosts 10.0.1.1 www.lottery.com Friday, June 8, 2012
  • 105. DNS Tips The Power of the hosts file /etc/hosts 10.0.1.1 example1.com example2.com Friday, June 8, 2012
  • 106. DNS Tips Virtual Document Root UseCanonicalName Off VirtualDocumentRoot /var/www/vhosts/%0/web <Location /var/www/vhosts> AllowOverride All Options +FollowSymLinks </Location> example.com => /var/www/vhosts/example.com/web example2.com => /var/www/vhosts/example2.com/web Friday, June 8, 2012
  • 107. DNS Tips Nameservers/Expiration whois servergrove.com ... Name Servers: ns1.servergrove.com ns2.servergrove.com ns3.servergrove.com Creation date: 19 May 2005 23:34:36 Expiration date: 19 May 2014 23:34:00 Friday, June 8, 2012
  • 108. DNS Tips DNS records dig -t A google.com ;; ANSWER SECTION: google.com. 184 IN A 74.125.230.227 google.com. 184 IN A 74.125.230.228 google.com. 184 IN A 74.125.230.229 google.com. 184 IN A 74.125.230.230 google.com. 184 IN A 74.125.230.231 google.com. 184 IN A 74.125.230.232 google.com. 184 IN A 74.125.230.233 google.com. 184 IN A 74.125.230.238 google.com. 184 IN A 74.125.230.224 google.com. 184 IN A 74.125.230.225 google.com. 184 IN A 74.125.230.226 Friday, June 8, 2012
  • 109. DNS Tips DNS records dig -t A servergrove.eu @ns1.servergrove.com ;; ANSWER SECTION: servergrove.eu. 3600 IN A 149.5.47.100 Friday, June 8, 2012
  • 110. DNS Tips traceroute traceroute google.com traceroute to google.com (173.194.37.33), 30 hops max, 40 byte packets 1 2.69-195-222.static.servergrove.com (69.195.222.2) 0.360 ms 0.365 ms 0.432 ms 2 t0-1-0-5.br2.mia.terremark.net (66.165.161.45) 1.558 ms 1.546 ms 1.532 ms 3 core1-1-0-0.mia.net.google.com (198.32.124.133) 0.238 ms 0.224 ms 0.230 ms 4 209.85.253.74 (209.85.253.74) 0.266 ms 0.283 ms 0.312 ms 5 209.85.254.252 (209.85.254.252) 12.764 ms 12.757 ms 12.749 ms 6 64.233.175.92 (64.233.175.92) 14.177 ms 14.257 ms 14.359 ms 7 atl14s07-in-f1.1e100.net (173.194.37.33) 13.653 ms 13.606 ms 13.618 ms Friday, June 8, 2012
  • 111. DNS Tips http://whereisitup.com Friday, June 8, 2012
  • 112. DNS Tips mtr Friday, June 8, 2012
  • 114. Monitoring Apache Requests <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from .your_domain.com </Location> ExtendedStatus On Friday, June 8, 2012
  • 115. Monitoring Apache Requests Friday, June 8, 2012
  • 116. Monitoring - Cacti - Ganglia - Zabbix - collectd - statsd / StatsDBundle - graphite Friday, June 8, 2012
  • 117. Monitoring statsd / StatsDBundle / Graphite Friday, June 8, 2012
  • 118. Monitoring CPU / Memory / IO top Friday, June 8, 2012
  • 119. Monitoring IO iotop Friday, June 8, 2012
  • 120. Monitoring Network iptraf Friday, June 8, 2012
  • 121. Monitoring Handling logs - Centralize logs with syslog error_log = syslog - Monolog supports syslog - logstash, logster, loggly, logio Friday, June 8, 2012
  • 123. Speeding up - nginx/php-fpm - APC - Memcache - nginx reverse proxy cache - Varnish Friday, June 8, 2012
  • 125. Backups - rsync - rdiff-backup - Unison - Bacula - Amanda Friday, June 8, 2012
  • 126. Backups Donʼt forget to backup your DB! Friday, June 8, 2012
  • 127. Reading List - Automating UNIX and Linux Administration - Running Linux - Learning the bash Shell: Unix Shell Programming Friday, June 8, 2012
  • 128. The End Questions? Sysadmin skills for Symfony developers Friday, June 8, 2012
  • 129. Feedback Please! https://joind.in/6605 Sysadmin skills for Symfony developers Pablo Godel @pgodel Thank you! Friday, June 8, 2012