/[drupal]/drupal/INSTALL.txt
ViewVC logotype

Contents of /drupal/INSTALL.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


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

  ViewVC Help
Powered by ViewVC 1.1.2