-
Notifications
You must be signed in to change notification settings - Fork 5
/
start.html
executable file
·173 lines (164 loc) · 10.2 KB
/
start.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
---
title: 'Start'
---
{% include head.html %}
<body class="body-green">
<div class="page-wrapper">
{% include breadcrumbs.html current=page.title %}
<div class="content-wrapper">
<div class="container">
<div id="content-header" class="content-header text-center">
<h1 class="content-title">
<i class="icon fa fa-paper-plane"></i>
Quick Start
</h1>
<div class="meta">
<i class="far fa-clock"></i>
Last updated: {{ site.time | date: '%d.%m.%Y' }}
</div>
</div>
<div class="content-body row">
<div class="col-md-9 col-12 order-1">
<div class="content-inner">
<section id="download-section" class="content-section">
<h2 class="section-title">Download</h2>
<div class="section-block">
<p>
You can get the latest stable release with the download link or directly on
<a href="https://github.com/koseven/koseven">github</a>. This will give you a fully
functional application with an application, modules, and system directory.
</p>
<a href="https://github.com/koseven/koseven/archive/devel.zip"
class="btn btn-green"
target="_blank">
<i class="fas fa-download"></i>
Download latest Koseven.zip
</a>
</div>
</section>
<section id="installation-section" class="content-section">
<h2 class="section-title">Installing</h2>
<div id="step1" class="section-block">
<h3 class="block-title">By Download</h3>
<p>
Once downloaded, you should extract the Koseven application to a directory where the
web server can access it. Going forward, we are going to assume you've extracted the
application to the root directory of your webserver and configured your document
root to be the public folder of Koseven such that
<code>http://localhost/index.php</code> is pointing to the <code>index.php</code>
file in the Koseven release.
</p>
</div>
<div id="step2" class="section-block">
<h3 class="block-title">By Github</h3>
<p>
The source code for Koseven is hosted with GitHub. To install Koseven using the
github source code first you need to install git. Visit http://help.github.com for
details on how to install git on your platform.
Use the following command to install Koseven from GitHub:
<code class="language-git">git clone https://github.com/koseven/koseven .</code>
</p>
</div>
</section>
<div id="configure-section" class="content-section">
<h2 class="section-title">Configure</h2>
<div class="section-block">
<p>
Before the application can be run, you will need to make a few changes to the
application/bootstrap.php file. This file is the first one to be included by
index.php and sets up most of the global options for the application.<br/>
Open <code>application/bootstrap.php</code> and make the following changes:
</p>
<p>
Set the default timezone for your application.
<pre><code class="language-php">// Example of changing timezone to Sao Paulo, Brazil
date_default_timezone_set('America/Sao_Paulo');</code></pre>
</p>
<p>
Set the base_url in the KO7::init call to reflect the location of the koseven folder
on your server relative to the document root.
<pre><code class="language-php">/**
* Example of koseven's installation at /var/www/koseven and
* Apache's DocumentRoot configured to /var/www/koseven/public
*/
Kohana::init(array(
'base_url' => '/',
));</code></pre>
</p>
<p>List your trusted hosts. Open <code>application/config/url.php</code> and add regex
patterns of the hosts you expect your application to be accessible from.</p>
<div class="callout-block callout-success">
<div class="icon-holder">
<i class="fas fa-thumbs-up"></i>
</div>
<div class="content">
<h4 class="callout-title">Hint:</h4>
<p>
Do not forget to escape your dots (.) as these are regex patterns. These patterns
should always fully match, as they are prepended with ^ and appended with $.
</p>
</div>
</div>
<pre><code class="language-php">return array(
'trusted_hosts' => array(
'example\.org',
'.*\.example\.org',
),
);</code></pre>
</p>
<p>
Define a salt for the Cookie class.
<pre><code class="language-php">Cookie::$salt = 'some-really-long-cookie-salt-here';</code></pre>
</p>
<p>
Make sure the application/cache and application/logs directories are writable by the web server.
<pre><code class="language-php">sudo chmod -R a+rwx application/cache
sudo chmod -R a+rwx application/logs</code></pre>
</p>
<p>
Make sure to use a unique salt for your application and never to share it. Take a look at the
Cookies page for more information on how cookies work in Kohana. If you do not define a
Cookie::$salt value, Kohana will throw an exception when it encounters any cookie on your
domain.
</p>
<p>
Test your installation by opening <code>http://localhost/</code>
<br/>
<br/>
You should see the installation page. If it reports any errors, you will need to
correct them before continuing.
<br/>
<img src="assets/images/start/install.png" alt="Installation Page" class="img-fluid"/>
<br/>
<br/>
Once your install page reports that your environment is set up correctly you need to either rename
or delete install.php. Kohana is now installed and you should see the output of the welcome
controller:
<br/>
<img src="assets/images/start/welcome.png" alt="Welcome Page"/>
</p>
</div>
</div>
</div>
</div>
<div class="content-sidebar col-md-3 col-12 order-0 d-none d-md-flex">
<div id="content-nav" class="content-nav">
<nav id="content-menu" class="nav content-menu flex-column sticky">
<a class="nav-link scrollto" href="#download-section">Download</a>
<a class="nav-link scrollto" href="#installation-section">Installing</a>
<nav class="content-sub-menu nav flex-column">
<a class="nav-link scrollto" href="#step1">By Download</a>
<a class="nav-link scrollto" href="#step2">By Github</a>
</nav>
<a class="nav-link scrollto" href="#configure-section">Configure</a>
</nav>
</div>
</div>
</div>
</div>
</div>
{% include promo.html %}
</div>
{% include footer.html %}
</body>
</html>