aasanchez

Instalacion automatica symfony 2.1

Sep 10th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.66 KB | None | 0 0
  1. #!/bin/bash
  2. echo -n "Dominio en local: "
  3. read domain
  4. echo -n "Directorio de Instalación: "
  5. read directory
  6. echo "Creamos la ubicacion en $directory y otorgamos Permisos"
  7. cd $directory
  8. echo "Descargamos la ultima version, sin vendors"
  9. wget http://symfony.com/get/Symfony_Standard_2.1.0.tgz
  10. tar zxpf Symfony_Standard_2.1.0.tgz
  11. rm Symfony_Standard_2.1.0.tgz
  12. mv Symfony $domain
  13. cd $domain
  14. echo "Decargamos e instalamos Vendors"
  15. curl -s http://getcomposer.org/installer | php
  16. php composer.phar install
  17. sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
  18. sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
  19. echo "Creamos el servidor virtual"
  20. echo "" >> /etc/apache2/sites-enabled/000-default
  21. echo "" >> /etc/apache2/sites-enabled/000-default
  22. echo "<VirtualHost *:80>" >> /etc/apache2/sites-enabled/000-default
  23. echo "  ServerName $domain" >> /etc/apache2/sites-enabled/000-default
  24. echo "  DocumentRoot "$directory/$domain/web"" >> /etc/apache2/sites-enabled/000-default
  25. echo "  DirectoryIndex app.php" >> /etc/apache2/sites-enabled/000-default
  26. echo "  <Directory "$directory/$domain/web">" >> /etc/apache2/sites-enabled/000-default
  27. echo "    AllowOverride All" >> /etc/apache2/sites-enabled/000-default
  28. echo "    Allow from All" >> /etc/apache2/sites-enabled/000-default
  29. echo "  </Directory>" >> /etc/apache2/sites-enabled/000-default
  30. echo "</VirtualHost> " >> /etc/apache2/sites-enabled/000-default
  31. echo ------------------- "Creamos el indicamos donde esta en alias"
  32. echo "127.0.0.1       $domain" >> /etc/hosts
  33. echo ------------------- "Reiniciamos el Servidor Apache"
  34. sudo /etc/init.d/apache2 restart
  35. firefox http://$domain/app_dev.php
Advertisement
Add Comment
Please, Sign In to add comment