1 | |
---|
2 | CONTENTS OF THIS FILE |
---|
3 | --------------------- |
---|
4 | |
---|
5 | * Requirements |
---|
6 | * Optional requirements |
---|
7 | * Installation |
---|
8 | * Drupal administration |
---|
9 | * Customizing your theme(s) |
---|
10 | * Multisite Configuration |
---|
11 | * More Information |
---|
12 | |
---|
13 | REQUIREMENTS |
---|
14 | ------------ |
---|
15 | |
---|
16 | Drupal requires a web server, PHP 4 (4.3.5 or greater) or PHP 5 |
---|
17 | (http://www.php.net/) and either MySQL (http://www.mysql.com/) or PostgreSQL |
---|
18 | (http://www.postgresql.org/). The Apache web server and MySQL database are |
---|
19 | recommended; other web server and database combinations such as IIS and |
---|
20 | PostgreSQL have been tested to a lesser extent. When using MySQL, version 4.1.1 |
---|
21 | or greater is recommended to assure you can safely transfer the database. |
---|
22 | |
---|
23 | For more detailed information about Drupal requirements, see "Requirements" |
---|
24 | (http://drupal.org/requirements) in the Drupal handbook. |
---|
25 | |
---|
26 | For detailed information on how to configure a test server environment using |
---|
27 | a variety of operating systems and web servers, see "Local server setup" |
---|
28 | (http://drupal.org/node/157602) in the Drupal handbook. |
---|
29 | |
---|
30 | OPTIONAL TASKS |
---|
31 | -------------- |
---|
32 | |
---|
33 | - To use XML-based services such as the Blogger API and RSS syndication, |
---|
34 | you will need PHP's XML extension. This extension is enabled by default. |
---|
35 | |
---|
36 | - To use Drupal's "Clean URLs" feature on an Apache web server, you will need |
---|
37 | the mod_rewrite module and the ability to use local .htaccess files. For |
---|
38 | Clean URLs support on IIS, see "Using Clean URLs with IIS" |
---|
39 | (http://drupal.org/node/3854) in the Drupal handbook. |
---|
40 | |
---|
41 | - Various Drupal features require that the web server process (for |
---|
42 | example, httpd) be able to initiate outbound connections. This is usually |
---|
43 | possible, but some hosting providers or server configurations forbid such |
---|
44 | connections. The features that depend on this functionality include the |
---|
45 | integrated "Update status" module (which downloads information about |
---|
46 | available updates of Drupal core and any installed contributed modules and |
---|
47 | themes), the ability to log in via OpenID, fetching aggregator feeds, or |
---|
48 | other network-dependent services. |
---|
49 | |
---|
50 | |
---|
51 | INSTALLATION |
---|
52 | ------------ |
---|
53 | |
---|
54 | 1. DOWNLOAD DRUPAL AND OPTIONALLY A TRANSLATION |
---|
55 | |
---|
56 | You can obtain the latest Drupal release from http://drupal.org/. The files |
---|
57 | are in .tar.gz format and can be extracted using most compression tools. On a |
---|
58 | typical Unix command line, use: |
---|
59 | |
---|
60 | wget http://drupal.org/files/projects/drupal-x.x.tar.gz |
---|
61 | tar -zxvf drupal-x.x.tar.gz |
---|
62 | |
---|
63 | This will create a new directory drupal-x.x/ containing all Drupal files |
---|
64 | and directories. Move the contents of that directory into a directory within |
---|
65 | your web server's document root or your public HTML directory: |
---|
66 | |
---|
67 | mv drupal-x.x/* drupal-x.x/.htaccess /var/www/html |
---|
68 | |
---|
69 | If you would like to have the default English interface translated to a |
---|
70 | different language, we have good news. You can install and use Drupal in |
---|
71 | other languages from the start. Check whether a released package of the |
---|
72 | language desired is available for this Drupal version at |
---|
73 | http://localize.drupal.org and download the package. Extract |
---|
74 | the contents to the same directory where you extracted Drupal into. |
---|
75 | |
---|
76 | 2. CREATE THE CONFIGURATION FILE AND GRANT WRITE PERMISSIONS |
---|
77 | |
---|
78 | Drupal comes with a default.settings.php file in the sites/default |
---|
79 | directory. The installer uses this file as a template to create your |
---|
80 | settings file using the details you provide through the install process. |
---|
81 | To avoid problems when upgrading, Drupal is not packaged with an actual |
---|
82 | settings file. You must create a file named settings.php. You may do so |
---|
83 | by making a copy of default.settings.php (or create an empty file with |
---|
84 | this name in the same directory). For example, (from the installation |
---|
85 | directory) make a copy of the default.settings.php file with the command: |
---|
86 | |
---|
87 | cp sites/default/default.settings.php sites/default/settings.php |
---|
88 | |
---|
89 | Next, give the web server write privileges to the sites/default/settings.php |
---|
90 | file with the command (from the installation directory): |
---|
91 | |
---|
92 | chmod o+w sites/default/settings.php |
---|
93 | |
---|
94 | So that the files directory can be created automatically, give the web server |
---|
95 | write privileges to the sites/default directory with the command (from the |
---|
96 | installation directory): |
---|
97 | |
---|
98 | chmod o+w sites/default |
---|
99 | |
---|
100 | 3. CREATE THE DRUPAL DATABASE |
---|
101 | |
---|
102 | Drupal requires access to a database in order to be installed. Your database |
---|
103 | user will need sufficient privileges to run Drupal. Additional information |
---|
104 | about privileges, and instructions to create a database using the command |
---|
105 | line are available in INSTALL.mysql.txt (for MySQL) or INSTALL.pgsql.txt |
---|
106 | (for PostgreSQL). |
---|
107 | |
---|
108 | To create a database using PHPMyAdmin or a web-based control panel consult |
---|
109 | the documentation or ask your webhost service provider. |
---|
110 | |
---|
111 | Take note of the username, password, database name and hostname as you |
---|
112 | create the database. You will enter these items in the install script. |
---|
113 | |
---|
114 | 4. RUN THE INSTALL SCRIPT |
---|
115 | |
---|
116 | To run the install script point your browser to the base URL of your website |
---|
117 | (e.g., http://www.example.com). |
---|
118 | |
---|
119 | You will be guided through several screens to set up the database, |
---|
120 | create tables, add the first user account and provide basic web |
---|
121 | site settings. |
---|
122 | |
---|
123 | The install script will attempt to create a files storage directory |
---|
124 | in the default location at sites/default/files (the location of the |
---|
125 | files directory may be changed after Drupal is installed). In some |
---|
126 | cases, you may need to create the directory and modify its permissions |
---|
127 | manually. Use the following commands (from the installation directory) |
---|
128 | to create the files directory and grant the web server write privileges to it: |
---|
129 | |
---|
130 | mkdir sites/default/files |
---|
131 | chmod o+w sites/default/files |
---|
132 | |
---|
133 | The install script will attempt to write-protect the settings.php file and |
---|
134 | the sites/default directory after saving your configuration. However, you |
---|
135 | may need to manually write-protect them using the commands (from the |
---|
136 | installation directory): |
---|
137 | |
---|
138 | chmod a-w sites/default/settings.php |
---|
139 | chmod a-w sites/default |
---|
140 | |
---|
141 | If you make manual changes to the file later, be sure to protect it again |
---|
142 | after making your modifications. Failure to remove write permissions to that |
---|
143 | file is a security risk. Although the default location for the settings.php |
---|
144 | file is at sites/default/settings.php, it may be in another location |
---|
145 | if you use the multi-site setup, as explained below. |
---|
146 | |
---|
147 | 5. CONFIGURE DRUPAL |
---|
148 | |
---|
149 | When the install script succeeds, you will be directed to the "Welcome" |
---|
150 | page, and you will be logged in as the administrator already. Proceed with |
---|
151 | the initial configuration steps suggested on the "Welcome" page. |
---|
152 | |
---|
153 | If the default Drupal theme is not displaying properly and links on the page |
---|
154 | result in "Page Not Found" errors, try manually setting the $base_url variable |
---|
155 | in the settings.php file if not already set. It's currently known that servers |
---|
156 | running FastCGI can run into problems if the $base_url variable is left |
---|
157 | commented out (see http://bugs.php.net/bug.php?id=19656). |
---|
158 | |
---|
159 | 6. REVIEW FILE SYSTEM STORAGE SETTINGS AND FILE PERMISSIONS |
---|
160 | |
---|
161 | The files directory created in step 4 is the default file system path used |
---|
162 | to store all uploaded files, as well as some temporary files created by Drupal. |
---|
163 | After installation, the settings for the file system path may be modified |
---|
164 | to store uploaded files in a different location. |
---|
165 | |
---|
166 | It is not necessary to modify this path, but you may wish to change it if: |
---|
167 | |
---|
168 | * your site runs multiple Drupal installations from a single codebase |
---|
169 | (modify the file system path of each installation to a different |
---|
170 | directory so that uploads do not overlap between installations); or, |
---|
171 | |
---|
172 | * your site runs a number of web server front-ends behind a load |
---|
173 | balancer or reverse proxy (modify the file system path on each |
---|
174 | server to point to a shared file repository). |
---|
175 | |
---|
176 | To modify the file system path: |
---|
177 | |
---|
178 | * Ensure that the new location for the path exists or create it if |
---|
179 | necessary. To create a new directory named uploads, for example, |
---|
180 | use the following command from a shell or system prompt (while in |
---|
181 | the installation directory): |
---|
182 | |
---|
183 | mkdir uploads |
---|
184 | |
---|
185 | * Ensure that the new location for the path is writable by the web |
---|
186 | server process. To grant write permissions for a directory named |
---|
187 | uploads, you may need to use the following command from a shell |
---|
188 | or system prompt (while in the installation directory): |
---|
189 | |
---|
190 | chmod o+w uploads |
---|
191 | |
---|
192 | * Access the file system path settings in Drupal by selecting these |
---|
193 | menu items from the Navigation menu: |
---|
194 | |
---|
195 | Administer > Site configuration > File system |
---|
196 | |
---|
197 | Enter the path to the new location (e.g.: uploads) at the File |
---|
198 | System Path prompt. |
---|
199 | |
---|
200 | Changing the file system path after files have been uploaded may cause |
---|
201 | unexpected problems on an existing site. If you modify the file system path |
---|
202 | on an existing site, remember to copy all files from the original location |
---|
203 | to the new location. |
---|
204 | |
---|
205 | Some administrators suggest making the documentation files, especially |
---|
206 | CHANGELOG.txt, non-readable so that the exact version of Drupal you are |
---|
207 | running is slightly more difficult to determine. If you wish to implement |
---|
208 | this optional security measure, use the following command from a shell or |
---|
209 | system prompt (while in the installation directory): |
---|
210 | |
---|
211 | chmod a-r CHANGELOG.txt |
---|
212 | |
---|
213 | Note that the example only affects CHANGELOG.txt. To completely hide |
---|
214 | all documentation files from public view, repeat this command for each of |
---|
215 | the Drupal documentation files in the installation directory, substituting the |
---|
216 | name of each file for CHANGELOG.txt in the example. |
---|
217 | |
---|
218 | For more information on setting file permissions, see "Modifying Linux, Unix, |
---|
219 | and Mac file permissions" (http://drupal.org/node/202483) or "Modifying |
---|
220 | Windows file permissions" (http://drupal.org/node/202491) in the online |
---|
221 | handbook. |
---|
222 | |
---|
223 | 7. CRON MAINTENANCE TASKS |
---|
224 | |
---|
225 | Many Drupal modules have periodic tasks that must be triggered by a cron |
---|
226 | maintenance task, including search module (to build and update the index |
---|
227 | used for keyword searching), aggregator module (to retrieve feeds from other |
---|
228 | sites), ping module (to notify other sites about new or updated content), and |
---|
229 | system module (to perform routine maintenance and pruning on system tables). |
---|
230 | To activate these tasks, call the cron page by visiting |
---|
231 | http://www.example.com/cron.php, which, in turn, executes tasks on behalf |
---|
232 | of installed modules. |
---|
233 | |
---|
234 | Most systems support the crontab utility for scheduling tasks like this. The |
---|
235 | following example crontab line will activate the cron tasks automatically on |
---|
236 | the hour: |
---|
237 | |
---|
238 | 0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php |
---|
239 | |
---|
240 | More information about cron maintenance tasks are available in the help pages |
---|
241 | and in Drupal's online handbook at http://drupal.org/cron. Example scripts can |
---|
242 | be found in the scripts/ directory. |
---|
243 | |
---|
244 | DRUPAL ADMINISTRATION |
---|
245 | --------------------- |
---|
246 | |
---|
247 | A new installation of Drupal defaults to a very basic configuration with only a |
---|
248 | few active modules and minimal user access rights. |
---|
249 | |
---|
250 | Use your administration panel to enable and configure services. For example: |
---|
251 | |
---|
252 | General Settings Administer > Site configuration > Site information |
---|
253 | Enable Modules Administer > Site building > Modules |
---|
254 | Configure Themes Administer > Site building > Themes |
---|
255 | Set User Permissions Administer > User management > Permissions |
---|
256 | |
---|
257 | For more information on configuration options, read the instructions which |
---|
258 | accompany the different configuration settings and consult the various help |
---|
259 | pages available in the administration panel. |
---|
260 | |
---|
261 | Community-contributed modules and themes are available at http://drupal.org/. |
---|
262 | |
---|
263 | CUSTOMIZING YOUR THEME(S) |
---|
264 | ------------------------- |
---|
265 | |
---|
266 | Now that your installation is running, you will want to customize the look of |
---|
267 | your site. Several sample themes are included and more can be downloaded from |
---|
268 | drupal.org. |
---|
269 | |
---|
270 | Simple customization of your theme can be done using only CSS. Further changes |
---|
271 | require understanding the phptemplate engine that is part of Drupal. See |
---|
272 | http://drupal.org/handbook/customization to find out more. |
---|
273 | |
---|
274 | MULTISITE CONFIGURATION |
---|
275 | ----------------------- |
---|
276 | |
---|
277 | A single Drupal installation can host several Drupal-powered sites, each with |
---|
278 | its own individual configuration. |
---|
279 | |
---|
280 | Additional site configurations are created in subdirectories within the 'sites' |
---|
281 | directory. Each subdirectory must have a 'settings.php' file which specifies the |
---|
282 | configuration settings. The easiest way to create additional sites is to copy |
---|
283 | the 'default' directory and modify the 'settings.php' file as appropriate. The |
---|
284 | new directory name is constructed from the site's URL. The configuration for |
---|
285 | www.example.com could be in 'sites/example.com/settings.php' (note that 'www.' |
---|
286 | should be omitted if users can access your site at http://example.com/). |
---|
287 | |
---|
288 | Sites do not have to have a different domain. You can also use subdomains and |
---|
289 | subdirectories for Drupal sites. For example, example.com, sub.example.com, |
---|
290 | and sub.example.com/site3 can all be defined as independent Drupal sites. The |
---|
291 | setup for a configuration such as this would look like the following: |
---|
292 | |
---|
293 | sites/default/settings.php |
---|
294 | sites/example.com/settings.php |
---|
295 | sites/sub.example.com/settings.php |
---|
296 | sites/sub.example.com.site3/settings.php |
---|
297 | |
---|
298 | When searching for a site configuration (for example www.sub.example.com/site3), |
---|
299 | Drupal will search for configuration files in the following order, using the |
---|
300 | first configuration it finds: |
---|
301 | |
---|
302 | sites/www.sub.example.com.site3/settings.php |
---|
303 | sites/sub.example.com.site3/settings.php |
---|
304 | sites/example.com.site3/settings.php |
---|
305 | sites/www.sub.example.com/settings.php |
---|
306 | sites/sub.example.com/settings.php |
---|
307 | sites/example.com/settings.php |
---|
308 | sites/default/settings.php |
---|
309 | |
---|
310 | If you are installing on a non-standard port, the port number is treated as the |
---|
311 | deepest subdomain. For example: http://www.example.com:8080/ could be loaded |
---|
312 | from sites/8080.www.example.com/. The port number will be removed according to |
---|
313 | the pattern above if no port-specific configuration is found, just like a real |
---|
314 | subdomain. |
---|
315 | |
---|
316 | Each site configuration can have its own site-specific modules and themes in |
---|
317 | addition to those installed in the standard 'modules' and 'themes' directories. |
---|
318 | To use site-specific modules or themes, simply create a 'modules' or 'themes' |
---|
319 | directory within the site configuration directory. For example, if |
---|
320 | sub.example.com has a custom theme and a custom module that should not be |
---|
321 | accessible to other sites, the setup would look like this: |
---|
322 | |
---|
323 | sites/sub.example.com/: |
---|
324 | settings.php |
---|
325 | themes/custom_theme |
---|
326 | modules/custom_module |
---|
327 | |
---|
328 | NOTE: for more information about multiple virtual hosts or the configuration |
---|
329 | settings, consult the Drupal handbook at drupal.org. |
---|
330 | |
---|
331 | For more information on configuring Drupal's file system path in a multi-site |
---|
332 | configuration, see step 6 above. |
---|
333 | |
---|
334 | MORE INFORMATION |
---|
335 | ---------------- |
---|
336 | |
---|
337 | - For additional documentation, see the online Drupal handbook at |
---|
338 | http://drupal.org/handbook. |
---|
339 | |
---|
340 | - For a list of security announcements, see the "Security announcements" page |
---|
341 | at http://drupal.org/security (available as an RSS feed). This page also |
---|
342 | describes how to subscribe to these announcements via e-mail. |
---|
343 | |
---|
344 | - For information about the Drupal security process, or to find out how to report |
---|
345 | a potential security issue to the Drupal security team, see the "Security team" |
---|
346 | page at http://drupal.org/security-team. |
---|
347 | |
---|
348 | - For information about the wide range of available support options, see the |
---|
349 | "Support" page at http://drupal.org/support. |
---|