Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo -n "Dominio en local: "
- read domain
- echo -n "Directorio de Instalación: "
- read directory
- echo "Creamos la ubicacion en $directory y otorgamos Permisos"
- cd $directory
- echo "Descargamos la ultima version, sin vendors"
- wget http://symfony.com/get/Symfony_Standard_2.1.0.tgz
- tar zxpf Symfony_Standard_2.1.0.tgz
- rm Symfony_Standard_2.1.0.tgz
- mv Symfony $domain
- cd $domain
- echo "Decargamos e instalamos Vendors"
- curl -s http://getcomposer.org/installer | php
- php composer.phar install
- sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
- sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
- echo "Creamos el servidor virtual"
- echo "" >> /etc/apache2/sites-enabled/000-default
- echo "" >> /etc/apache2/sites-enabled/000-default
- echo "<VirtualHost *:80>" >> /etc/apache2/sites-enabled/000-default
- echo " ServerName $domain" >> /etc/apache2/sites-enabled/000-default
- echo " DocumentRoot "$directory/$domain/web"" >> /etc/apache2/sites-enabled/000-default
- echo " DirectoryIndex app.php" >> /etc/apache2/sites-enabled/000-default
- echo " <Directory "$directory/$domain/web">" >> /etc/apache2/sites-enabled/000-default
- echo " AllowOverride All" >> /etc/apache2/sites-enabled/000-default
- echo " Allow from All" >> /etc/apache2/sites-enabled/000-default
- echo " </Directory>" >> /etc/apache2/sites-enabled/000-default
- echo "</VirtualHost> " >> /etc/apache2/sites-enabled/000-default
- echo ------------------- "Creamos el indicamos donde esta en alias"
- echo "127.0.0.1 $domain" >> /etc/hosts
- echo ------------------- "Reiniciamos el Servidor Apache"
- sudo /etc/init.d/apache2 restart
- firefox http://$domain/app_dev.php
Advertisement
Add Comment
Please, Sign In to add comment