4
Mai
[yii] Globale Installation unter Linux
Jaaa, richtig, ich arbeite zur Zeit mit dem yii-Framework. Und ich finde es toll
1. Die Installation
ghost@spacebox:~$ sudo -s root@spacebox:~$ cd /var/www/lib root@spacebox:/var/www/lib$ svn co http://yii.googlecode.com/svn/trunk/framework yii
2. Updaten des Frameworks
ghost@spacebox:~$ sudo -s root@spacebox:~$ cd /var/www/lib root@spacebox:/var/www/lib$ svn up
3. Das Kommandozeilen-Tool im PATH ablegen:
ghost@spacebox:~$ sudo ln -s /var/www/lib/yii/yiic /usr/bin/yii
Absofort steht der Befehl "yii" in der bash zur Verfügung.
4. Anpassen der Applications
Die index.php jeder Application musst angepasst werden, damit das Framework gefunden wird:
<?php
set_include_path('/var/www/lib/yii');
define('DIR', dirname(__FILE__));
define('YII_DEBUG', true);
define('YII_TRACE_LEVEL', 3);
$config = DIR . '/app/config/main.php';
require_once('yii.php');
Yii::createWebApplication($config)->run();
