46 |
47 |
48 |
49 |
Command Line Installation
50 |
This currently only works on *nix systems (Linux, OS X, Unix, etc).
51 |
Our quick installer is a stripped down interface for the Oil package. It allows you to create a new project with one command. You will also no longer need to use 'php' in your oil commands.
52 |
53 |
To install the quick installer, simply open up a shell and run the following command:
54 |
55 |
$ curl get.fuelphp.com/oil | sh
56 |
57 |
This will ask for your password, as it installs the script to /usr/bin.
58 |
59 |
Now you can just use 'oil' instead of 'php oil' in your projects.
60 |
61 |
To create a new project simply run:
62 |
63 |
$ oil create <project_name>
64 |
65 |
This will create a folder in the directory you are in with the project name you gave. It will then clone the repository and all submodules into that directory.
66 |
67 |
Note: This will also run $ oil refine install, which makes the necessary directories writable.
68 |
69 |
Manual Installation Instructions
70 |
71 |
This will create the default installation of the Fuel framework on your web server.
72 |
73 |
74 | - Download the Fuel Framework
75 | - Unzip/Extract the download
76 | - Move the files to your server
77 |
78 | - Note the public directory in the source equals your web server's public document directory i.e.
79 | public_html, public, htdocs, etc. Move its contents to there or a subdirectory of the webroot
80 | where you want to use Fuel.
81 | - Placing the fuel directory outside of the public document directory is encouraged for security
82 | reasons.
83 | - Edit the paths in index.php to point to your app, core & packages directories.
84 |
85 | /
86 | fuel/
87 | app/
88 | core/
89 | packages/
90 | public/
91 | .htaccess
92 | assets/
93 | index.php
94 | oil
95 |
96 |
97 | -
98 | Set permissions on writable folders manually, or run:
99 |
$ php oil refine install
100 | Made writable: APPPATH/cache
101 | Made writable: APPPATH/logs
102 | Made writable: APPPATH/tmp
103 | Made writable: APPPATH/config
104 |
105 |
106 |
107 |
108 |
109 |
Configuration
110 |
111 |
The main configuration can be found at app/config/config.php. Edit it to your liking.
112 |
113 |
Install inside the document root
114 |
115 |
As explained in point 3, for security reasons it is strongly advised NOT to install Fuel inside your webserver's document root.
116 |
117 | However, there are cases where you would like to do that, for example for a (local) development environment where Apache's dynamic mass virtual hosting module
118 | is used to quickly setup new development environments without the need to restart the webserver.
119 |
120 |
In that case, you need an additional .htaccess file that you need to place in your document root, which will redirect requests to the site root to your public folder, and also modifies the rewrites to include the public folder:
121 |
122 | <IfModule mod_rewrite.c>
123 | RewriteEngine on
124 |
125 | RewriteBase /public
126 |
127 | RewriteRule ^(/)?$ index.php/$1 [L]
128 |
129 | RewriteCond %{REQUEST_FILENAME} !-f
130 | RewriteCond %{REQUEST_FILENAME} !-d
131 |
132 | RewriteRule ^(.*)$ index.php/$1 [L]
133 | </IfModule>
134 |
135 |
136 |
137 |
Setting the Environment
138 |
139 |
140 | By default, the environment is set to Development mode. Fuel uses the environment to define which database settings to use, but you can use it for other things.
141 |
142 |
143 | To set the environment, drop the following line into your .htaccess file.
144 |
145 |
SetEnv FUEL_ENV production
146 |
147 | Available options are detailed in the Class constants of the Fuel Class.
148 |
149 |
150 |