Instalar CakePHP en Amazon EC2 - VPS - Soporte PHP Colombia

2nd Apr 2014
Instalar CakePHP en Amazon EC2 - VPS - Soporte PHP Colombia

El Siguiente Articulo tiene como objetivo, primero recordarnos a la compañia la instalacion de CakePhp Colombia, Pues llevamos mas de 18 Años Desarrollando en Este Framework De PHP, y todavia nos olvidamos de su instalacion en los Servidores VPS, CLOUD ....

 

INSTALAR LAMP  ( Apache, Mysql, PHP5)

apt-get install apache2  ( Debian, Ubuntu)

yum -y install httpd  ( Fedora, Centos )

apt-get install mysql-server mysql-client

apt-get install php5 libapache2-mod-php5

Service httpd Restart ( Fedora) 

Service apache2 Restart ( Ubuntu)

 

hostgator colombia

 

INSTALALAR CAKEPHP 2.4.6 

cd /var/www

wget https://github.com/cakephp/cakephp/zipball/2.4.6

sudo apt-get install unzip

unzip 2.4.6

mv cakephp-cakephp-4b9e390 cakephp 

chmod -R 775 app/tmp

 

URL rewriting  ( El dolor de cabeza)

 

apache2ctl -M ( Verificamos los modulos de Php instalados)

a2enmod rewrite  ( Activar)

vi /etc/apache2/sites-available/000-default.conf  ( Ahora es 000-default.conf )

 

UTILIZAMOS ESTE CODIGO  ( Si no esta lo ingresamos ) (Ejemplo)

 

<Virtual>

<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory> 

</virtual>

 

sudo service apache2 restart 

 

CONFIGURAR CAKEPHP   ( Le Cambiamos unas Letras, Reeemplazamos) 

Cambiar en /app/Config/core.php 

Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

Configure::write('Security.cipherSeed', '76859309657453542496749683645');

 

BASE DE DATOS
 

SI TENEMOS PROBLEMAS CON UTC ( Cuando inciamos nos muestra Error Zona HorariaUTC) Dentro de /app/Config/core.php Buscamos y le quitamos el #

#date_default_timezone_set('UTC'); ( Incorrecto)

date_default_timezone_set('UTC'); (Correcto)

 

SI TENEMOS PROBLEMAS CON /lib/Cake/Cache/Engine/FileEngine.php on   ( Debemos Poner la Carpeta en app/lib/ 755 )

sudo chmod 755 -R app/lib/   , Tambien Observar Chmod 777 /app/tmp 

 

HotBot VPN - Virtual Private Network

 

SI TENEMOS PROBLEMAS CON EL Mod_rewrite CAKEPHP RECOMIENDA

App.baseUrl
If you don’t want or can’t get mod_rewrite (or some other compatible module) up and running on your server, you’ll need to use CakePHP’s built-in pretty URLs. In /app/Config/core.php, uncomment the line that looks like:

Configure::write('App.baseUrl', env('SCRIPT_NAME'));
Also remove these .htaccess files:

/.htaccess
/app/.htaccess
/app/webroot/.htaccess
This will make your URLs look like www.example.com/index.php/controllername/actionname/param rather than www.example.com/controllername/actionname/param.

If you are installing CakePHP on a webserver besides Apache, you can find instructions for getting URL rewriting working for other servers under the URL Rewriting section.

 

Tecnoweb2.com ofrece servicio de Consultoria, Asesoria y Desarrollo de Cakephp en Colombia y LatinoAmerica ( Peru, Ecuador, Chile, Argentina, Bolivia).. Informacion AQUI

Referencia:

  • https://www.digitalocean.com/community/articles/how-to-install-cakephp-on-an-ubuntu-12-04-vps  
  • http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-13.04-lamp
  • http://maisaspride.blogspot.com/2012/10/cakephp-tutorialinstalling-cakephp-on.html
  • http://book.cakephp.org/2.0/en/installation/url-rewriting.html