Configuracion y crear una app con cakephp
Ubuntu 14.04 cakephp 2.7.5
Configuramos el arch 000-default.conf de apache
#sudo nano /etc/apache2/sites-enabled/000-default.conf
ServerName localhost
......
Options FollowSymLinks
AllowOverride All
**** importante
# sudo a2enmod rewrite
# sudo /etc/init.d/apache2 restart
#sudo mkdir /home/ubuntu/Programas
en ese directorio descomprimimos nuestro cake
******** crear una app con bake
Antes de crear una app con bake ubicarnos en el direcctorio donde queremos que este guardado nuestra app
crear una app en cake
1. /home/ubuntu/Programas/cakephp-2.7.5/lib/Cake/Console/cake bake
2.
Welcome to CakePHP v2.7.5 Console
---------------------------------------------------------------
App : myapp2
Path: /home/ubuntu/public_html/myapp2/
---------------------------------------------------------------
What is the path to the project you want to bake?
[/home/ubuntu/public_html/myapp2] > (presionar enter)
3. What is the path to the directory layout you wish to copy?
[/home/ubuntu/Programas/cakephp-2.7.5/lib/Cake/Console/Templates/skel] > (enter)
4. Will be copied to: /home/ubuntu/public_html/myapp2
---------------------------------------------------------------
Look okay? (y/n/q)
[y] > y o enter
5. Database Configuration:
---------------------------------------------------------------
Name:
[default] > (enter)
6. Datasource: (Mysql/Postgres/Sqlite/Sqlserver)
[Mysql] > Postgres
7. Persistent Connection? (y/n)
[n] > (enter)
8. Database Host:
[localhost] > (enter)
9. Port?
[n] > (enter)
10.
User:
[root] > postres
Password:
> 123456
Database Name:
[cake] > bdrrhh_gadch
11.
Table Prefix?
[n] >
Table encoding?
[n] > utf8
12.
---------------------------------------------------------------
The following database configuration will be created:
---------------------------------------------------------------
Name: default
Datasource: Postgres
Persistent: false
Host: localhost
User: postgres
Pass: ******
Database: bdrrhh_gadch
Encoding: utf8
---------------------------------------------------------------
Look okay? (y/n)
[y] > y
13.Do you wish to add another database configuration?
[n] > (enter)
CREAR ENLACE SIMBOLICO
sudo ln -s /home/ubuntu/public_html/myapp2 /var/www/html/myapp2
755 permiso a dir
644 permiso a archivos
ubuntu@ubuntu:~/Programas/cakephp-2.7.5/lib/Cake/Console$ sudo chmod 755 cake
CREAR EL MODELO
/home/ubuntu/Programas/cakephp-2.7.5/lib/Cake/Console/cake bake
CREAR EL CONTROLADOR
CREAR LA VISTA
Comentarios