0% found this document useful (0 votes)
60 views

Installation Guide Drupal

The document provides instructions for installing Drupal, including preparing for installation by downloading and extracting Drupal files, creating a database and user, and running the installation script. It explains that the installation script will populate database tables and configure settings. It also briefly mentions alternative installation methods and setting up a test site locally before installing on a live production site.

Uploaded by

ieusale
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Installation Guide Drupal

The document provides instructions for installing Drupal, including preparing for installation by downloading and extracting Drupal files, creating a database and user, and running the installation script. It explains that the installation script will populate database tables and configure settings. It also briefly mentions alternative installation methods and setting up a test site locally before installing on a live production site.

Uploaded by

ieusale
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Installation guide

Last modified: September 6, 2011

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.

Creating a test site on a local computer


It is considered a good practice to do all development work on a separate test site before making changes to a production site. A test site allows you to evaluate the impact of upgrades, new modules, modifications to themes etc. without causing disruption to your live site. For information about setting up a web server on a local computer, see the Local Server Setup section of the Developing for Drupal guide.

Alternative methods for installation


Some web hosting companies offer "one-click" installations of Drupal, or specific Drupal support. You may be able to locate one on the Drupal hosting handbook page. There is also information about Drupal distributions, which include installation profiles and pre-packaged distributions of Drupal and modules. These may be of help as well.

Step 1: Download and uncompress Drupal


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

Remove the compressed version of the file by typing rm drupal-x.x.tar.gz.

Moving Drupal to its intended location


Now you need to move the contents of the drupal-x.x directory one level "up" into the web server's document root or your public HTML directory:
mv drupal-x.x/* drupal-x.x/.htaccess ./

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

Before continuing to the next page ...


The base URL for your Drupal installation will be set in your web server's configuration file. You will need to know this URL before proceeding to the next steps of the installation. If you are installing Drupal on your local machine the base URL may be: http://localhost. If
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!

you are installing Drupal to a web server your base URL may be a specific domain name (such as http://example.com).

Step 2: Create the database


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).

Create a database and user via a browser-based control panel


Most web hosting accounts provide a Web-based control panel to help you administer your site. These tools include easy-to-use features for creating a new database, and for creating a "user" with rights to the database. To create a database using a browser-based control panel consult the documentation or ask your web host service provider. When you create the user for your database, you may see a page where you can specify the privileges that user will have for various operations on the database. In most web control panels' "database wizard", if you simply check "All" privileges for the user you create (and then uncheck "Grant" if it is listed as a privilege) your user will be set up correctly. 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 (see next page). Note that in many cases when creating databases and users via a web-based interface, the username you use to log into 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 user name must be unique across all accounts on the server.) If you have created your database and user via a web-based interface, you can skip the remainder of this page and continue with the install instructions on the next 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!

Create a database and user using phpMyAdmin


This presumes you have root access to phpMyAdmin

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.

Create a database from the command line


If you do not use a Web control panel or are experienced with and prefer to use MySQL or PostgreSQL commands, you can follow the information below. Additional information about privileges, and instructions to create a database using the command line are available in INSTALL.mysql.txt (for MySQL) or INSTALL.pgsql.txt (for PostgreSQL).

Create a database using MySQL commands


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!

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.

1. Create a new database for your site.


mysqladmin -u username -p create databasename

MySQL prompts for the 'username' database password, and creates the initial database files.

2. Log in and set the access database rights:


mysql -u username -p

MySQL prompts for the 'username' database password.

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.

4. If successful, MySQL will reply with:


Query OK, 0 rows affected

5. To activate the new permissions, enter the following command:


FLUSH PRIVILEGES;

The database should be created with UTF-8 (Unicode) encoding.

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. Now exit the MYSQL prompt by typing:


exit

The server will answer by saying


Bye

Create a database using PostgreSQL


The database must be created with UTF-8 (Unicode) encoding.

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

If everything works correctly, you'll see a CREATE USER notice.


2. Create the database This step is only necessary if you don't already have a database setup (e.g. by your host) or you want to create new database for use with Drupal only. The following command creates a new database named "databasename" (you should substitute this with the desired database name), which is owned by previously created "username":
createdb --encoding=UNICODE --owner=username databasename

If everything works correctly, you'll see a CREATE DATABASE notice.

Step 3: The settings.php file


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.

Step 4: 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!

Possible errors include:


o

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!

familiar with that account from earlier versions of Drupal.)

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!

leave these settings unchecked and test them later.

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.

Secure your site


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!

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.)

Built-in Installation Profiles (Drupal 7)


Audience: Site users Last modified: April 14, 2011

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:

Modules enabled by 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!

Modules enabled by profile

Module

Minimal Standard

Field SQL storage x

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.

Structure Content types


Minimal - There are no content types to start. Standard - 2 premade content types, Basic Page, and Article Basic Page - not promoted to front page, comments disabled, author and date not set to display, rdf mapping 'foaf:Document' Article - a default taxonomy named "Tags" enabled. Set to display author and date info, comments enabled. Comes with an image field. The image field has an rdf mapping of 'og:image', 'rdfs:seeAlso' and the tags field has a rdf mapping of 'dc:subject'

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.

Configuration Account settings


Minimal - no default roles, no default admin role Standard - There is a default role for administrator, who is set as the default admin role. User pictures are enabled.

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.)

Database tables installed


Minimal - 48 tables installed in the database Standard - 73 tables installed in the database Enjoy your fresh pre-configured Drupal installation.

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!

You might also like