Kohana 3.2 tutorial : 1 – Installation

1. Go to kohana’s website

 

http://kohanaframework.org/

 

2. Download latest stable

 

$ wget http://dev.kohanaframework.org/attachments/download/1670/kohana-3.2.0.zip
--11:08:44--  http://dev.kohanaframework.org/attachments/download/1670/kohana-3.2.0.zip
           => `kohana-3.2.0.zip'
Resolving dev.kohanaframework.org... 173.245.60.22, 173.245.61.87
Connecting to dev.kohanaframework.org[173.245.60.22]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,043,281 [application/zip]

100%[==============================================================================================================================================================>] 1,043,281      1.53M/s             

11:08:45 (1.53 MB/s) - `kohana-3.2.0.zip' saved [1043281/1043281]

3. Uncompress it and move stuff around

 

$ unzip kohana-3.2.0.zip

 

$ ls -la
total 981
drwxr-xr-x   5 portnumber53.com www-data               7 Dec  9 11:11 .
drwxr-x---  57 portnumber53.com www-data              70 Dec  9 10:23 ..
-rw-r--r--   1 portnumber53.com portnumber53.com      27 Dec  9 10:56 .htaccess
drwxr-x---   2 portnumber53.com www-data               2 Dec  9 10:23 cgi-bin
drwxr-x---   2 portnumber53.com www-data               2 Dec  9 10:57 html
drwxr-xr-x   5 portnumber53.com portnumber53.com      10 Jul 25 03:26 kohana-3.2-master-1
-rw-r--r--   1 portnumber53.com portnumber53.com 1043281 Dec  9 11:08 kohana-3.2.0.zip

$ rm kohana-3.2.0.zip

$ mv kohana-3.2-master-1/modules/ .

$ mv kohana-3.2-master-1/application/ modules/

$ mkdir -p vendor/modules

$ mv kohana-3.2-master-1/install.php html/

$ mv kohana-3.2-master-1/index.php html/

 

 

 

4. Combine the example.htaccess

 

$ nano kohana-3.2-master-1/example.htaccess

$ nano .htaccess

 

 

5. Try opening your site:

http://truvis.co/

Kohana install.php file will report what you need to fix…. hopefully just file paths:

 

6. Fix those paths (you millage may vary):

$ nano html/index.php

———————————————–

$application = ‘../modules/application’;

$modules = ‘../modules’;

$system = ‘../vendor/modules/system’;

————————

<?php

/**
 * The directory in which your application specific resources are located.
 * The application directory must contain the bootstrap.php file.
 *
 * @see  http://kohanaframework.org/guide/about.install#application
 */
$application = '../modules/application';

/**
 * The directory in which your modules are located.
 *
 * @see  http://kohanaframework.org/guide/about.install#modules
 */
$modules = '../modules';

/**
 * The directory in which the Kohana resources are located. The system
 * directory must contain the classes/kohana.php file.
 *
 * @see  http://kohanaframework.org/guide/about.install#system
 */
$system = '../vendor/modules/system';

/**
 * The default extension of resource files. If you change this, all resources
 * must be renamed to use the new extension.
 *
 * @see  http://kohanaframework.org/guide/about.install#ext
 */
define('EXT', '.php');

 

 

7. Test until you get Oks everywhere 🙂

 

Bookmark the permalink.

2 Responses to Kohana 3.2 tutorial : 1 – Installation

  1. It shows I need to install `pecl_http` package. But I can not install it due to broken package error in Ubuntu.

Leave a Reply