Installation de Symfony 2.7 sur une instance Simple Hosting Php/Mysql. Sur le station de développement : Distribution de travail : Ubuntu 14.04 LTS 1) Installation de 'Symfony Installer'
[~] ➔ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
[~] ➔ sudo chmod a+x /usr/local/bin/symfony
[~] ➔ symfony
Symfony Installer (1.1.7)
...
2) Répertoire de travail :
[~] ➔ mkdir -p BLOG
[~] ➔ cd BLOG
[~/BLOG] ➔
3) Créer l'application :
[~/BLOG] ➔ symfony new blog
[~/BLOG] ➔ mv blog htdocs
4) Vérification :
[~/BLOG] ➔ ls htdocs/
app bin composer.json composer.lock README.md src vendor web
5) Ajout de htaccess Ouvrir :
htdocs/.htaccess
Ajouter :
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /web/$1 [QSA,L]
</ifModule>
6) Ignorer le fichier .gitignore
[~/BLOG] ➔ mv htdocs/.gitignore htdocs/gitignore
7) Initialiser le dépôt git du projet :
[~/BLOG] ➔ git init .
Dépôt Git vide initialisé dans /home/sam/BLOG/.git/
[~/BLOG] ➔ git add -A
[~/BLOG] ➔ git commit -m "Version 0.0.1"
[master (commit racine) 16a24a4] Version 0.0.1
36 files changed, 3461 insertions(+)
create mode 100644 htdocs/.gitignore
create mode 100644 htdocs/README.md
create mode 100644 htdocs/app/.htaccess
...
create mode 100644 htdocs/web/config.php
create mode 100644 htdocs/web/favicon.ico
create mode 100644 htdocs/web/robots.txt
[~/BLOG] ➔ git remote add origin git+ssh://4440666@git.dc0.gpaas.net/blog.monsite.fr.git
8) Pousser les fichiers dans webgit :
[~/BLOG] ➔ git push origin master
Counting objects: 50, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (42/42), done.
Writing objects: 100% (50/50), 41.76 KiB | 0 bytes/s, done.
Total 50 (delta 0), reused 0 (delta 0)
To git+ssh://4440666@git.dc0.gpaas.net/blog.monsite.fr.git
* [new branch] master -> master
9) Déployer l'application :
[~/BLOG] ➔ ssh 4440666@sftp.dc0.gpaas.net 'deploy blog.monsite.fr.git'
blog.monsite.fr is now deployed from master
10) Vérification de l'application : http://blog.monsite.fr/