1 // $Id: INSTALL.txt 144 2007-03-28 07:52:20Z thierry $
7 * Optional requirements
9 - Drupal administration
10 - Customizing your theme(s)
16 Drupal requires a web server, PHP4 (4.3.3 or greater) or PHP5
17 (http://www.php.net/) and either MySQL (http://www.mysql.com/)
18 or PostgreSQL (http://www.postgresql.org/). Your database user
19 will also need sufficient privileges to run Drupal. Please
20 check the INSTALL.mysql.txt and INSTALL.pgsql.txt for more
23 NOTE: the Apache web server and MySQL database are recommended;
24 other web server and database combinations such as IIS and PostgreSQL
25 are possible but tested to a lesser extent.
30 - To use XML-based services such as the Blogger API, Jabber, and RSS
31 syndication, you will need PHP's XML extension. This extension is
34 - If you want support for clean URLs, you'll need mod_rewrite and
35 the ability to use local .htaccess files. (More information can
36 be found in the Drupal handbook on drupal.org.)
43 You can obtain the latest Drupal release from http://drupal.org/.
44 The files are in .tar.gz format and can be extracted using most
45 compression tools. On a typical Unix command line, use:
47 wget http://drupal.org/files/projects/drupal-x.x.x.tar.gz
48 tar -zxvf drupal-x.x.x.tar.gz
50 This will create a new directory drupal-x.x.x/ containing all
51 Drupal files and directories. Move the contents of that directory
52 into a directory within your web server's document root or your
53 public HTML directory:
55 mv drupal-x.x.x/* drupal-x.x.x/.htaccess /var/www/html
57 2. CREATE AND PREPARE THE DRUPAL DATABASE
59 Before you proceed to the next step you should know:
60 - "username" - the username for connecting to the database
61 - "password" - the password for that username
62 - "databasename" - the name of the database
64 Depending on the database of your choice, please read either
65 INSTALL.mysql.txt (for MySQL) or INSTALL.pgsql.txt (for PostgreSQL).
69 The default configuration can be found in the
70 'sites/default/settings.php' file within your Drupal installation.
71 Before you can run Drupal, you must set the database URL. Open the
72 configuration file and edit the $db_url line to match the database
73 defined in the previous step:
75 $db_url = "mysql://username:password@localhost/databasename";
77 If you use PostgreSQL, change "mysql" to "pgsql" in the above line.
79 In addition, a single Drupal installation can host several
80 Drupal-powered sites, each with its own individual configuration.
81 If you don't need multiple Drupal sites, skip to the next section.
83 Additional site configurations are created in subdirectories within
84 the 'sites' directory. Each subdirectory must have a 'settings.php'
85 file which specifies the configuration settings. The easiest way to
86 create additional sites is to copy the 'default' directory and modify
87 the 'settings.php' file as appropriate. The new directory name is
88 constructed from the site's URL. The configuration for www.example.com
89 could be in 'sites/example.com/settings.php' (note that 'www.' should
90 be omitted if users can access your site at http://example.com/).
92 Sites do not each have to have a different domain. You can use
93 subdomains and subdirectories for Drupal sites also. For example,
94 example.com, sub.example.com, and sub.example.com/site3 can all be
95 defined as independent Drupal sites. The setup for a configuration
96 such as this would look like the following:
98 sites/default/settings.php
99 sites/example.com/settings.php
100 sites/sub.example.com/settings.php
101 sites/sub.example.com.site3/settings.php
103 When searching for a site configuration (for example
104 www.sub.example.com/site3), Drupal will search for configuration
105 files in the following order, using the first configuration it finds:
107 sites/www.sub.example.com.site3/settings.php
108 sites/sub.example.com.site3/settings.php
109 sites/example.com.site3/settings.php
110 sites/www.sub.example.com/settings.php
111 sites/sub.example.com/settings.php
112 sites/example.com/settings.php
113 sites/default/settings.php
115 If you are installing on a non-standard port, the port number is
116 treated as the deepest subdomain. For example: http://www.example.com:8080/
117 could be loaded from sites/8080.www.example.com/. The port number
118 will be removed according to the pattern above if no port-specific
119 configuration is found, just like a real subdomain.
121 Each site configuration can have its own site-specific modules and
122 themes that will be made available in addition to those installed
123 in the standard 'modules' and 'themes' directories. To use
124 site-specific modules or themes, simply create a 'modules' or
125 'themes' directory within the site configuration directory. For
126 example, if sub.example.com has a custom theme and a custom module
127 that should not be accessible to other sites, the setup would look
130 sites/sub.example.com/:
133 modules/custom_module
135 NOTE: for more information about multiple virtual hosts or the
136 configuration settings, consult the Drupal handbook at drupal.org.
140 You should consider creating a "files" subdirectory in your Drupal
141 installation directory. This subdirectory stores files such as
142 custom logos, user avatars, and other media associated with your
143 new site. The sub-directory requires "read and write" permission
144 by the Drupal server process. You can change the name of this
145 subdirectory at "Administer > Settings > File system settings".
147 SECURITY NOTICE: Certain Apache configurations can be vulnerable
148 to a security exploit allowing arbitrary code execution. Drupal
149 will attempt to automatically create a .htaccess file in your
150 "files" directory to protect you. If you already have a .htaccess
151 file in that location, please add the following lines:
153 SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
155 <IfModule mod_rewrite.c>
159 You can now launch your browser and point it to your Drupal site.
161 Create an account and login. The first account will automatically
162 become the main administrator account with total control.
166 Many Drupal modules (such as the search functionality) have periodic
167 tasks that must be triggered by a cron job. To activate these tasks,
168 call the cron page by visiting http://www.example.com/cron.php --
169 this will pass control to the modules and the modules will decide if
170 and what they must do.
172 Most systems support the crontab utility for scheduling tasks like
173 this. The following example crontab line will activate the cron
174 tasks automatically on the hour:
176 0 * * * * wget -O - -q http://www.example.com/cron.php
178 More information about the cron scripts are available in the admin
179 help pages and in the Drupal handbook at drupal.org. Example
180 scripts can be found in the scripts/ directory.
182 DRUPAL ADMINISTRATION
183 ---------------------
185 Upon a new installation, your Drupal website defaults to a very basic
186 configuration with only a few active modules, one theme, and minimal
189 Use your administration panel to enable and configure services. For
190 example, set some general settings for your site with "Administer >
191 Settings". Enable modules via "Administer > Modules". User permissions
192 can be set with "Administer > Users > Configure > Permissions".
194 For more information on configuration options, read the
195 instructions which accompany the different configuration settings and
196 consult the various help pages available in the administration panel.
198 Community-contributed modules and themes are available at http://drupal.org/.
200 CUSTOMIZING YOUR THEME(S)
201 -------------------------
203 Now that your server is running, you will want to customize the look
204 of your site. Several sample themes are included in the Drupal
205 installation and more can be downloaded from drupal.org.
207 Simple customization of your theme can be done using only CSS. Further
208 changes require understanding the phptemplate engine that is now part
209 of Drupal. See http://drupal.org/handbook/customization to find out more.
215 For platform specific configuration issues and other installation and
216 administration assistance, please consult the Drupal handbook at
217 http://drupal.org/handbook. You can view the wide range of other
218 support options available at http://drupal.org/support.