This is documentation for Kohana v2.3.x. For v3.x documentation, see http://kohanaframework.org/guide .

Table of Contents
StatusDraft
TodoProof read

Kohana is installed in several easy steps:

  1. Download a copy of Kohana.
  2. Unzip the downloaded package. This should create a Kohana_v[version#] directory.
  3. Upload the folder contents to your webserver.
  4. Edit the global configuration file application/config/config.php to reflect the base path or domain of your site.
  5. Depending on your platform, the installation's subdirs may have lost their permissions thanks to zip extraction. Chmod them all to 755 by running find . -type d -exec chmod 755 {} \; from the root of your Kohana installation.
  6. Make sure the application/logs and application/cache directories are writeable. Chmod to 666.
  7. Test your installation by opening the URL you set as the base_url in your favorite browser

If you see the Welcome page, your Kohana installation is complete!

Removing index.php from URL's

If you want really clean URL's and therefore remove the index.php in each URL this is possible.

Additional Configuration

You can provide your installation with additional configuration by copying files from the system/config directory to the application/config directory. For example if you want to configure a database connection, you can copy over system/config/database.php to application/config/database.php and edit the database connection details.

After installation

After installation you're ready to build your first web application with Kohana. If you're new to Kohana you should first read all articles in the user guide under the 'General' section.

Experiencing Problems?

If you were not able to view the Kohana Welcome page on your server after installing, please read the Troubleshooting page of the user guide, visit the Kohana Wiki, or ask for assistance in the community forums.

[moveTo: Troubleshooting] The Kohana Team tries to make sure that Kohana is as free from bugs as possible. If you have found a bug, please report it.

For Experienced Users

To use a multi-site Kohana install, simply follow these steps.

  1. Download a copy of Kohana.
  2. Put the system folder somewhere on your server, preferably outside of your webserver's document root.
  3. Delete the system folder in your current application.
  4. For your application's index.php file, change the $kohana_system variable to the relative or absolute path of where you put the system folder.
  5. You can now point all of your applications to this one system folder for easy upgrades. This makes your life a whole lot easier when you have 10+ kohana sites on your server.

Moving system and application directory out of webroot

'webroot' is defined as the top level directory to which a webserver will allow public access. A correctly configured server will not allow public access to files or directories above webroot in the directory tree.

It is considered a good security practice to move application, system and modules out of the webroot, to prevent potential public access, should PHP be disabled, or your webserver is compromised. Kohana enables you to place the index.php in the webroot, and all other files outside of it. Static content, such as stylesheet, image and javascript files, are typically placed within webroot.

In a few steps this can be accomplished

  1. Move the directories out of the webroot but leave index.php in
  2. Open index.php file in an editor
  3. Set the variable $kohana_application to the application directory you're using (must contain config/config.php file)
  4. Set the variable $kohana_system to the system directory you're using

Note that moving the system directory out of webroot, also makes it more easily accessible by multiple Kohana applications. So you can use the same system for multiple applications. This allows for easy upgrades. Simply refer to the same system in the $kohana_system in application A, B etc.

installation.txt · Last modified: 2009/05/28 23:28 by kerkness