Installation Guide Drupal
Installation Guide Drupal
Drupal provides an installation script that automatically populates database tables and configures the correct settings in the settings.php file. This section covers preparing for installation, running the installation script itself, and the steps that should be done after running the installation script has completed. It also explains how to do a "multi site" installation, where a number of different Drupal sites run off the same code base. Before proceeding with your first Drupal installation, you should also review the best practices section. For help with Drupal terms, see the glossary page.
Other tools
Some of the steps in the installation process can be performed with tools such as graphical applications for moving files and managing databases or tools that are provided by your hosting service. This documentation focuses on performing tasks at the command line. For information on using other tools, see the documentation that accompanies the application or is provided by your hosting service.
Drupal version: Drupal 6.x, Drupal 7.x Audience: Developers and coders, Site administrators Last modified: December 27, 2010
Drupal is available in two supported versions (the most recent and the previous). The "recommended release" is the latest stable release of that version. To learn more about versions, see the Drupal version information page.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
If you would like to create a Drupal site in a language other than English, information about Drupal translations is available at http://drupal.org/project/translations.
Downloading Drupal
Before you begin, log into your server and navigate to the directory from which you will be serving your Drupal site. On many *nix computers the path from the server's root will be /var/www/html, so cd /var/www/html. On a shared server, or a server that hosts multiple domains, the path will be different (try cd ~/www or cd ~/public_html). If you are unsure of the directory, ask your hosting provider for assistance. Download Drupal using any download utility, the two most popular of which are wget and curl. Not every computer has both. The commands are, respectively:
wget http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz
or
curl -O http://drupal.org/files/projects/drupal-x.x.tar.gz
(Note that the option for the curl command is the upper case letter "O" and not the numeral that stands for zero.) (Replace the "http://drupal.org/files/projects/drupal-x.x.tar.gz" string with the link for the version you will be installing.)
Uncompressing Drupal
Type the following command (replacing "x.x" with your downloaded version's number):
tar -xzvf drupal-x.x.tar.gz
The files from the directory you downloaded and decompressed have now been moved up a level into your web directory, and you can delete the drupal-x.x directory (which is now empty):
rmdir drupal-x.x
you are installing Drupal to a web server your base URL may be a specific domain name (such as http://example.com).
Drupal version: Drupal 6.x, Drupal 7.x Audience: Developers and coders, Site administrators Last modified: July 8, 2011
Before running the installation script, you must create an empty database and database user (a user name assigned the rights to use the Drupal database). This page offers guidance for creating your Drupal database using a web browser-based control panel (such as "CPanel" or "Plesk"), or by using phpMyAdmin (another browserbased database utility), or by creating the database directly from the MySQL or PostgreSQL command prompt (for more advanced users).
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
1. 2. 3. 4.
Log in to phpMyAdmin as the root user. Click Privileges and Add a new User. In the User name field, enter the username you wish to use. In the Host field, select Local which is more secure, unless you will be accessing the database with this user from another server. 5. Enter or generate a password for the user. 6. In the Database for User list, select Create database with same name and grant all privileges and click Go.
You have now created a user that has all privileges only on the database with the same name. This is more secure than using a general username and password for all your sites on the same server, as it limits access to your databases if someone gets hold of your database logins. If you want to have a different name for database and user, just select the created database, then click the operations tab. You will find an option Rename database to. If you need more details about using PHPMyAdmin, check out the official wiki. Take note of the username, password, database name and hostname (eg. are you installing in http://example.com, or in http://drupal.example.com, or http://example.com/blog etc.) as you create the database. You will enter these items into fields in your browser when running the install script. Note that in many cases when creating databases and users using a web interface, the username you use to log in to your control panel is added as a prefix to the database name and possibly to the database username as well. For example, if you log into your site's control panel as "webadmin" and create a database named "drupal7db" and a user for that database named "d7user", when running the Install script (see next page) the database and user may need to be typed in as "webadmin_drupal7db" and "webadmin_d7user". (This is because many hosting accounts are on shared servers, and on one server each database and username must be unique across all accounts on the server.) If you have created your database and user via phpMyAdmin, you can skip the remainder of this page and continue with the install instructions on the next page.
For information on installing and configuring MySQL see http://dev.mysql.com/techresources/articles/mysql_intro.html In the following examples, 'username' is an example MySQL user who will have the CREATE and GRANT privileges and 'databasename' is the name of the new database Use the appropriate names for your system.
MySQL prompts for the 'username' database password, and creates the initial database files.
3. At the MySQL prompt, set the permissions using the following command:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `databasename`.* TO 'username'@'localhost' IDENTIFIED BY 'password';
In this case:
o o o
'databasename' is the name of your database 'username@localhost' is the username of your MySQL account 'password' is the password required for that username
You will need the ` around the database name if you have used a MySQL escape character in your schema name. Eg: drupal_test_account.* should be drupal\_test\_account.* for security (underscore is a wildcard). This requires the ` wrapper. `drupal\_test\_account`.* Note: unless your database user has all of the privileges listed above, you will not be able to run Drupal.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
1. Create a database user This step is only necessary if you don't already have a user setup (e.g. by your host) or you want to create new user for use with Drupal only. The following command creates a new user named 'username' (you should substitute this with the desired username), and prompts for a password for that user:
createuser --pwprompt --encrypted --no-adduser --no-createdb username
Drupal version: Drupal 6.x, Drupal 7.x Audience: Developers and coders, Site administrators Last modified: February 13, 2011
Prior to running the installation script, you must create a settings.php file and set some permissions.
Settings.php
Your Drupal download comes with a sample configuration file at sites/default /default.settings.php. The default file must be copied and the new file must be given the correct name, settings.php. Please note: With Drupal 7.x, on some types of shared/local hosting, if PHP and Apache are run by the same user, Drupal will attempt to execute the first three steps for you. If you get errors referring to the "Settings file" during installation, you can perform these steps manually.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
1. Copy the default.settings.php to settings.php. You can do this from the command line (working from the root of the directory containing your Drupal installation) using cp sites/default/default.settings.php sites/default/settings.php.
Please note: Do not simply rename the file. The Drupal installer will need both files.
2. You should now have both a default.settings.php and settings.php file in your sites/default directory. 3. Make the settings file writeable, so that the installer can edit it, using chmod a+w sites/default/settings.php or chmod 666
sites/default/settings.php
Both commands have the same effect. Several FTP tools like Filezilla, Transmit, and Fetch allow you to change file permissions, using a 'file attribute' or 'get info' command. In this case the octal or numeric value file permission should be set to 666. If your ftp client has checkboxes for setting permissions, check both the Read and Write boxes for "Owner", "Group", and "Others" (leaving the Execute boxes unchecked). Please note: Do not forget to change permissions back after you have run the installation script.
4. To let the files directory be created automatically, give the web server write privileges to the sites/default directory.
chmod a+w sites/default
Please note: Do not forget to change permissions back after you have run the installation script.
Drupal version: Drupal 6.x, Drupal 7.x Audience: Developers and coders, Site administrators Last modified: May 6, 2011
For Drupal 7
To run the Drupal install script, point your browser to the base URL of your web site. The "base URL" means the document root (directory) where you placed your Drupal files (and is defined in your web server configuration file). If you have installed Drupal on a web host this will likely be a domain name such as http://www.example.com. If you installed Drupal in a subfolder, then you should point your browser to the subfolder (e.g. http://example.com/subfolder). If you have installed Drupal on your desktop machine this URL might be http://localhost/drupal.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
If the installation process does not simply appear by entering the base URL of your site, add the file name "install.php" (for example http://www.example.com/install.php). You will be guided through several screens:
1. Choose which profile to use for the installation (standard or minimal). Most people should select the "standard" option. The standard option comes with default content types already enabled, such as Article and Page, and with appropriate publishing options already set. (Of course you can later edit these default content types and their settings, or add additional ones.) The standard profile also has a useful collection of modules pre-enabled for you.
The "minimal" option is targeted toward more experienced Drupal site creators who wish to set up their own content types with associated publishing options. The minimal profile has only three modules enabled: Block, Database logging, and Update status.
2. Select a language If you want to install using a language other than the default English, click the Learn how to install Drupal in other languages link.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
3. Verify requirements If your installation directory is not yet configured properly, you will be informed at this step. You can correct the settings individually and either refresh the browser screen or click 'Try again' to see whether there are any errors left.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
Missing directories and/or incorrect permissions The installer will attempt to automatically set up a number of directories, but this may fail due to permission settings. In this case you will find the missing directories listed.
sites/default/files sites/default/private sites/default/private/files
These directories should be set to the following permissions chmod o+w sites/default/files OR chmod 777 sites/default/files
o
Missing settings.php or incorrect permissions If settings.php is missing or not accessible, follow the instructions in Step 3: The settings.php file. Note that you will need both the default.settings.php and settings.php files. 4. Set up database Enter the database name as well as the username and password for the database that you created in Step 2: Create the database. This username and password information allows Drupal to access your database, so the install script can create tables. Note that this is not the username and password for administering Drupal; these will be created in the next step.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
The Advanced options will allow you to change the database host ('localhost' is usually used in this entry: wamp/bin/apache/Apache2.2.11/bin/php.ini as an example of the location on a Windows box running WAMP). You can also change the port and the table prefix. You only need to change the port if you are using a nonstandard port number. The table prefix is useful if you are installing multiple instances of Drupal tables that share the same database. Click Save and continue at the bottom of the page.
5. Install profile A progress bar will appear and display notes from the installer regarding the progress of the installation. If no errors are encountered, the next page will automatically load in your browser.
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
6. Configure site Input the information for the first user account (which will be automatically assigned full administration permissions) and provide basic web site settings. o In the Site name field enter the name you wish to use for the site. You can also edit it later through the administration interface. o In the Site e-mail address field, enter the e-mail address that will be used by Drupal when it sends out notifications such as registration information. o In the Site maintenance account field, enter the Username, E-mail address, and password for the main administration account.
Note that there is a distinction, as of Drupal 7, between the main administration account that you set up on this page, and the "Administrator" site administrator user role that you will see when you visit the "Roles" and "Permissions" pages in the administration interface. The account you set up in the Site maintenance account section during installation is a super-user who has overall control over every aspect of the management and configuration of the site. (This will be http://www.example.com/user/1, for those of you
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
o o
In the Server settings field, select your Default country and Default time zone. In the Update notifications field leave both boxes checked if you want your Drupal server to alert you when updates are required. Often updates relate to security issues and are important to perform. However, if you have restricted Internet connectivity (for example if you are behind a corporate firewall) you may want to
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
Click "Save and continue". On success you will see the Drupal installation complete screen. If there are any error messages, review and correct them now.
After the installation is complete, you will want to change the permissions on the settings.php file back so that it is protected: OR chmod 644
chmod u=rw,o=r,a=r sites/default/settings.php sites/default/settings.php
If you make manual changes to the settings.php file later, be sure to protect it again after making your modifications. Failure to remove write permissions to that file is a security risk. (Although the default location for the settings.php file is at sites/default/settings.php, it may be in another location if you use the multi-site setup.)
The Standard profile has several core modules enabled. It has more default configuration set up, including several default admin tools. This profile does more to show what core can do, and can save site building time by having defaults for common use cases. The Minimal profile has only a few very basic modules installed. This profile is useful if you only want very specific features, or if it will take more work to undo the defaults provided with the Standard profile.
Details
This table shows what extra modules will get enabled with the Standard profile:
Module
Minimal Standard
Block
Color
Comment
Contextual Links
Dashboard
Database Logging x
Field
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
Module
Minimal Standard
Field UI
File
Filter
Help
Image
List
Menu
Node
Number
Options
Overlay
Path
RDF
Search
Shortcut
System
Taxonomy
Text
Toolbar
User
Note: There are core modules not enabled in either profile, and those are not included in the table. It is correct to say that Database Logging and Block are the only two modules that are
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
enabled in Minimal. The other modules are required by Drupal. Update Status depends on the user choosing updates during installation.
Menus
Both - 4 default menus. The Navigation and Management menu blocks appear by default in Bartik's first sidebar, and the user menu is printed in the upper right. Minimal - The menu module is not enabled. Menus cannot be added or edited under Structure > Menus until the Menu module is enabled. Standard - Default home link in the Main Menu
Blocks
Minimal - The default Bartik theme has the following blocks enabled: System help in the Help section Main page content in the Content section Navigation, User login, and Management in the Sidebar first section Standard - The default Bartik theme has the following blocks enabled: System help in the Help section Main page content in the Content section Search, Navigation, User login in the Sidebar first section Powered by Drupal in the Footer
Appearance
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!
Minimal Bartik is the default theme and the default admin theme Standard Bartik is the default theme Seven is set as the admin theme, and set to appear when editing or creating content Global and Bartik initial theme settings are the same.
Text formats
Minimal - One Plain text format (default with drupal) Standard - 3 text formats, Plain text, Full HTML, and Filtered HTML
Media
Standard - has three default styles: thumbnail, medium, and large (Minimal does not have the Image module enabled.)
pdfMachine A pdf writer that produces quality PDF files with ease! Produce quality PDF files in seconds and preserve the integrity of your original documents. Compatible across nearly all Windows platforms, simply open the document you want to convert, click print, select the Broadgun pdfMachine printer and thats it! Get yours now!