DRUPAL
INSTALLATION STEPS
System
requirements:
·
Resources :
A minimum base installation requires at
least 3MB of disk space
·
Web Server
: Drupal has been successfully deployed on both Apache and IIS, but Apache
is recommended. Drupal will work on Apache 1.3 or 2.x hosted on unix/linux, os
x or windows.
·
Database
Server : MySQL/PostgreSQL/SQLite. MySQL
4.1 or 5.0 is recommended.
·
PHP : Recommended – 5.2.x
o The
PHP extension for connecting to your chosen database must be installed and
enabled. Drupal's currently supported database connectors are: mysql (the
original MySQL extension), mysqli (an improved connector for newer MySQL
installations), and pgsql (for PostgreSQL).
Installation
Steps:
1.
Install Apache 2.2 until below screen
appears and enter the given values:
2.
To make sure Apache is working now you need
to open your browser window and type http://localhost
as the address, and if you get the same message like below image that mean
apache is working. If both IIS and apache are running, it is recommended to disable
IIS and restart apache.
3.
We need to configure apache so it’ll
recognize the php files and can parse the php files correctly. And the first
thing to do is extracting the PHP zip archive, say in c:\php.
4.
After finished with the extraction
process, now we need to go to the Apache installation path, and then open httpd.conf which is located
under the conf directory
5. In
order for apache to parse the php files correctly, first you need to Load the
PHP5 module into the Apache, and to do this you just need to add below line to
your Apache
httpd.conf (after the last line of the loadmodule section) :
LoadModule php5_module
"c:/php/php5apache2_2.dll"
6. Add
these lines inside the directive (before
the closing
for mime_module):
AddType
application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
7. We
need to configure apache so it’ll check the existence of index.php by default
too instead of just checking the index.html only for the default index
filename. Do it by replacing DirectoryIndex index.html by DirectoryIndex
index.html index.php.
The default configuration from Apache 2.2:
DirectoryIndex
index.html
The modified version:
DirectoryIndex
index.html index.php
Apache is now configured.
Now we need to configure php.
8.
Copy
php.ini-recommended from php directory into C:\Windows and then rename it to
php.ini’
9.
Open the php.ini file using notepad and
change the extension_dir to “c:\php\ext”.
10.
Now copy all dlls from your php directory
into C:\Windows\System32, all except those starting from php5*.dll.
11. Create
a file named test.php inside C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs
12.
Add below line to the test.php file then save and
close the notepad.
echo "Hello World";
?>
13.
Now open the command prompt and type the
following to restart the apache process:
Net
stop apache2.2 && net start apache2.2
14. Now
after finished restarting the apache process, we need to open the browser
window and point to
http://localhost/test.php
15. Copy
the Drupal folder to C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs and in the browser window enter http://localhost/drupal
to start using Drupal.
Drupal is now configured.
Installing MYSQL:
Next we will be installing MySQL version 5. Follow the steps
carefully.
1.
Extract mysql-5.0.27-win32.zip using WinZIP or a similiar program.
2.
Once extracted, double click on the "Setup.exe" file. An
installation wizard will appear.
Click "Next".
3.
Select "Typical" Installation and click
"Next".
4.
Click "Install". (Be patient, this can take up to
several minutes).
5.
The next screen will ask you to "Sign Up". Select
"Skip Sign-Up" for now.
6.
The next screen will tell you that the installation wizard is complete.
Make sure that the "Configure the MySQL Server now" field is
checked before clicking "Finish".
7.
The MySQL Server Instance Configuration Wizard should appear.
Click "Next".
8.
Select "Detailed Configuration" and click
"Next".
9.
Select "Developer Machine" and click "Next".
10.
Select "Multifunctional Database" and click
"Next".
11.
Click "Next".
12.
Select "Decision Support (DSS)/OLAP" and click
"Next".
13.
Select "Multifunctional Database" and click
"Next".
14.
Make sure "Enable TCP/IP Networking" is checked, the
Port Number is set to "3306", and "Enable Strict Mode" is
checked. Click "Next".
15.
Select "Standard Character Set" and click
"Next".
16.
Check "Install As Windows Service", set the Service Name
to "MySQL", and check "Launch the MySQL Server
automatically". Make sure that the "Include Bin Directory in Windows
Path" is NOT checked. Click "Next".
17.
On the next screen, check the box that says "Modify Security
Settings". Enter a password for the default "root" account, and
confirm the password in the box below. Do NOT check the boxes "Enable root
access from remote machines" or "Create An Anonymous Account".
Click "Next".
18.
Click "Execute". (This may take a few minutes. Be
patient).
19.
Click "Finish".
20.
To test if MySQL was installed correct, go to: Start > All
Programs > MySQL > MySQL Server 5.0 > MySQL Command Line Client. The
MySQL Command Line Client will appear:
21.
It will ask you for a password. Enter the password you created in
step 18. (If you enter an incorrect password MySQL will automatically close the
command line)
22.
Next, type in the commands shown above hown in blue)
If you don't get any errors, and it returns the information shown above, then
MySQL has been successfully installed! Next we will need to configure PHP to
work with MySQL.
Configuring PHP to work
with MySQL:
Now that both PHP and MySQL are installed, we have to configure
them to work together.
1.
Open up your php.ini file (C:/WINDOWS/php.ini) and find the line:
;extension=php_mysql.dll
To enable the MySQL extension, delete the
semi-colon at the beginning of that line.
2.
Next we must add the PHP directory to the Windows PATH. To do
this, click: Start > My Computer > Properties > Advanced >
Environment Variables. Under the second list (System Variables), there will be
a variable called "Path". Select it and click "Edit". Add
";C:\php" to the very end of the string and click "OK".
3.
Restart your computer for the changes to take effect.
4.
Create a new file in your "htdocs" directory called
"mysql_test.php".
5.
Copy the following code into "mysql_test.php" and click
save. (Make sure to replace the MYSQL_PASS constant with the MySQL Password you
specified during the MySQL installation).
# Define MySQL Settings
define("MYSQL_HOST", "localhost");
define("MYSQL_USER", "root");
define("MYSQL_PASS", "password");
define("MYSQL_DB", "test");
$conn = mysql_connect("".MYSQL_HOST."",
"".MYSQL_USER."", "".MYSQL_PASS."") or
die(mysql_error());
mysql_select_db("".MYSQL_DB."",$conn) or die(mysql_error());
$sql = "SELECT * FROM name";
$res = mysql_query($sql);
while ($field = mysql_fetch_array($res))
{
$id = $field['id'];
$name = $field['name'];
echo 'ID: ' . $field['id'] . '
';
echo 'Name: ' . $field['name'] . '
';
}
?>
6.
Open up Internet Explorer and type in
"http://localhost/mysql_test.php". If the "mysql_test.php"
page returns something similiar to:
ID: 1
Name: John
Then PHP & MySQL have been successfully
configured to work together. Congratulations! The next and final step is to
install phpMyAdmin.
Now that both Apache, PHP and MySQL are installed, we can install
phpMyAdmin, a tool that allows you to easily manage your MySQL databases.
1.
UnZip the file phpMyAdmin-2.11.10-english.zip
2.
Create a new folder called "phpmyadmin" in your
"htdocs" directory. Extract the contents of the "phpMyAdmin-2.9.2-english.zip"
ZIP file here. Your C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\phpmyadmin" directory should now look like:
3.
Create a new file in the "phpMyAdmin" directory (above)
called "config.inc.php". Place this code inside it and be sure to
replace "YOUR_PASSWORD_HERE" (in both places below) with your MySQL
Password:
/* $Id: config.sample.inc.php 9675 2006-11-03 09:06:06Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki .
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOUR_PASSWORD_HERE'; // Your MySQL Password
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'YOUR_PASSWORD_HERE'; // Your MySQL Password
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
- phpMyAdmin
has now been successfully installed!
Create database and user
using PHPMyAdmin
This presumes you have root access to PHPMyAdmin
- Log in to
PHPMyAdmin as the root user
- Click Privileges & 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
- Enter or generate
a password for the user.
- In the
Database for User list, select Create
database with same name and grant all privileges and click Go
Settings.php
1.
Make a file "settings.php" C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\drupal\sites\default
2.
Copy the content of
default.settings.php from the location C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\drupal\sites\default into
"settings.php"(Do not rename the "default.settings.php"
file to "settings.php". Just copy it. You need 2 files in your
default directory;)
Run the installation script
You will be guided through several screens to set up the database, create
tables,
add the first user account and provide basic web site settings.
Once guided through these Step the Drupal Installation will be completed.
For Further Reference
http://drupal.org/node/540242
http://bytes.com/topic/cms/answers/879944-how-configure-drupal-database-settings-during-installation
Following are the default items that comes with drupal