A checklist for the things that need to be configured in our Symfony2 deploy target

  1. Rent VPS solution
  2. Install ubuntu 12.04 with LAMP and SSH server
  3. Upgrade PHP to PHP5.4
    1. add php5 repository
      • sudo apt-get install python-software-properties
      • sudo add-apt-repository ppa:ondrej/php5
    2. apt-get upgrade
    3. apt-get dist-upgrade
    4. restart apache2
  4. install node and less apt-add-repository ppa:chris-lea/node.js apt-get update apt-get install nodejs sudo npm install less
  5. sudo apt-get install openjdk-7-jre (for yuicompressor)
  6. sudo apt-get install php5-intl (for lib-icu)
  7. sudo apt-get install git
  8. sudo apt-get install acl
  9. configure mysql user, password and db mysql -u root -p create database dbname; grant all privileges on dbname.* to username@localhost identified by ‘password’;
  10. create unix deploy user and set password
    • sudo useradd -m deploy
    • sudo passwd deploy
  11. put in “acl,defaults” into /etc/fstab , then mount -a to remount it.
  12. set permissions on cache and logs folder
    • setfacl -R -m u:www-data:rwX -m u:whoami:rwX app/cache app/logs
    • setfacl -dR -m u:www-data:rwX -m u:whoami:rwX app/cache app/logs
  13. configure apache2 to load /var/www/deployname/current/web in /etc/apache2/sites-available/000-default.conf
  14. enable mod_rewrite sudo a2enmod rewrite
  15. set timezone in /etc/php5/apache2/php.ini date.timezone = “Europe/Amsterdam”
  16. set AllowOverride All in /etc/apache2/apache2.conf
  17. ensure authorization is rewritten: RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.) RewriteRule . - [e=HTTP_AUTHORIZATION:%1]
  18. configure capifony deploy script