^Status|Draft| ^Todo|Proof read|====== Install Kohana ====== Kohana is installed in several easy steps: - [[http://kohanaphp.com/download|Download]] a copy of Kohana. - Unzip the downloaded package. This should create a ''Kohana_v[version#]'' directory. - Upload the folder contents to your webserver. - Edit the [[general:configuration|global configuration]] file ''application/config/config.php'' to reflect the base path or domain of your site. - 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. - Make sure the ''application/logs'' and ''application/cache'' directories are writeable. Chmod to 666. - 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. * [[http://kohanaphp.com/tutorials/remove_index|Tutorial - Remove index.php for Apache webserver]] ===== 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 [[libraries:database:configuration|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 [[installation:troubleshooting|Troubleshooting]] page of the user guide, visit the [[http://dev.kohanaphp.com/wiki/kohana2|Kohana Wiki]], or ask for assistance in the [[http://forum.kohanaphp.com|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 [[http://dev.kohanaphp.com/projects/kohana2/issues|report it]]. ====== For Experienced Users ====== To use a multi-site Kohana install, simply follow these steps. - [[http://kohanaphp.com/download.html|Download]] a copy of Kohana. - Put the ''system'' folder somewhere on your server, preferably outside of your webserver's document root. - Delete the ''system'' folder in your current application. - 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. - 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 - Move the directories out of the webroot but leave index.php in - Open **index.php** file in an editor - Set the variable **$kohana_application** to the application directory you're using (must contain ''config/config.php'' file) - 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.