Blog de informática: programación, internet, php, wordpress, zend framework, mysql, windows, mootools, linux,…
In: ubuntu|zend framework
1 abr 2010
Esta entrada viene a ser el manual de instalación de Zend Framework y Zend Tool para Ubuntu, en complemento del anterior que era para Windows. Se da por instalado XAMPP en local; en caso de duda, seguir las instrucciones para linux de la web de XAMPP.
cd /opt/lampp/htdocs sudo mkdir testzf sudo chmod 777 testzf/
tar -xzvf ZendFramework-1.10.2-minimal.tar.gz
cd ZendFramework-1.10.2-minimal sudo cp -r * /opt/lampp/htdocs/testzf
export PATH=$PATH:/opt/lampp/bin
php -vDebe retornar lo siguiente por pantalla:
PHP 5.3.1 (cli) (built: Nov 22 2009 21:39:37) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
sudo cp /opt/lampp/htdocs/testzf/bin/* /opt/lampp/bin
sudo gedit /opt/lampp/etc/php.ini
Y modificar la siguiente línea:
; UNIX: "/path1:/path2" ;include_path = ".:/php/includes"
Por esta otra:
; UNIX: "/path1:/path2" include_path = ".:/opt/lampp/lib/php:/opt/lampp/htdocs/testzf/library"
zf.sh show version
Y si todo ha sido correcto, retornará:
Zend Framework Version: 1.10.2
La ayuda del Zend Tool se puede obtener ejecutando:
zf.sh --help
Para crear un proyecto, por ejemplo en la carpeta /opt/lampp/htdocs/testzf, debemos ejecutar el siguiente comando:
zf.sh create project /opt/lampp/htdocs/testzf/
Según la arquitectura de Zend Framework, todas las peticiones tienen que dirigirse al archivo “/opt/lampp/htdocs/testzf/public/index.php“. Para ello, hay que crear un VirtualHost en el Apache, operación que se realiza en dos simples pasos:
sudo gedit /etc/hosts
Añadir la siguiente línea, guardar y salir del editor:
127.0.0.1 testzf
sudo gedit /opt/lampp/etc/httpd.conf
Añadir las siguiente líneas, guardar y salir del editor:
<VirtualHost *:80> ServerName testzf DocumentRoot /opt/lampp/htdocs/testzf/public SetEnv APPLICATION_ENV "development" <Directory /path/to/quickstart/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Después de reiniciar el servidor Apache, al ir al navegador web y solicitar la URL http://testzf, se deberá cargar la siguiente página:

Entradas relacionadas:
Este blog informático pretende ser un blog de notas o portafolio de información variada: trozos de código, descubrimientos, notas sueltas, ... Para tenerla a mano, y ser compartida.
1 Comentario en Instalar y configurar Zend Framework y Zend_Tool para construir proyectos en Ubuntu
gerardo
30 mayo 2010 a las 00:00
hola como estas mira hace un unos mese que empece con php y ahora me gustaria meterme con zend frmework, segui este tutorial tal cual hasta la comprobacion de zend tool y ahi me tira un error que seria el sig:
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
The easiest way to get the zf command running is to allow is to give it
the include path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command “zf –setup”. This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.
Example you would run:
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf –setup
Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line “zf –info”)
* Home directory found in environment variable HOME with value /home/pc
* Storage directory assumed in home directory at location /home/pc/.zf/
* Storage directory does not exist at /home/pc/.zf/
* Config file assumed in home directory at location /home/pc/.zf.ini
* Config file does not exist at /home/pc/.zf.ini
To change the setup of this tool, run: “zf –setup”
no que quiere?, creo que quiere que guarde en la variable $ZEND_TOOL_INCLUDE_PATH un archivo zf de configuracion pero no se cual ni don de se encuentra y tampoco se donde va la variable … ira en php.ini?
por favor si me podes dar una mano te lo voy a agradecer, saludos