- Published on
Symfony2 deployment target configuration
- Authors
- Name
- Peter Peerdeman
- @peterpeerdeman
A checklist for the things that need to be configured in our Symfony2 deploy target
- Rent VPS solution
- Install ubuntu 12.04 with LAMP and SSH server
- Upgrade PHP to PHP5.4
- add php5 repository
- sudo apt-get install python-software-properties
- sudo add-apt-repository ppa:ondrej/php5
- apt-get upgrade
- apt-get dist-upgrade
- restart apache2
- add php5 repository
- install node and less apt-add-repository ppa:chris-lea/node.js apt-get update apt-get install nodejs sudo npm install less
- sudo apt-get install openjdk-7-jre (for yuicompressor)
- sudo apt-get install php5-intl (for lib-icu)
- sudo apt-get install git
- sudo apt-get install acl
- configure mysql user, password and db mysql -u root -p create database dbname; grant all privileges on dbname.* to username@localhost identified by 'password';
- create unix deploy user and set password
- sudo useradd -m deploy
- sudo passwd deploy
- put in "acl,defaults" into /etc/fstab , then mount -a to remount it.
- 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
- setfacl -R -m u:www-data:rwX -m u:
- configure apache2 to load /var/www/deployname/current/web in /etc/apache2/sites-available/000-default.conf
- enable mod_rewrite sudo a2enmod rewrite
- set timezone in /etc/php5/apache2/php.ini date.timezone = "Europe/Amsterdam"
- set AllowOverride All in /etc/apache2/apache2.conf
- ensure authorization is rewritten: RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.) RewriteRule . - [e=HTTP_AUTHORIZATION:%1]
- configure capifony deploy script