Installing Drupal on 5.0-Nano: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(New page: <span id="top"></span> {| cellpadding="2" |__TOC__||'''Installing Drupal on 5.0-Nano''' |} '''Introduction''' This step-by-step guide shows how to install Drupal on Uniform Server 5.0-Nan...)
 
m (Text replace - "projects/uniformserver" to "projects/miniserver")
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<span id="top"></span>
<span id="top"></span>
{| cellpadding="2"
{| cellpadding="2"
|__TOC__||'''Installing Drupal on 5.0-Nano'''
|__TOC__||'''Installing Drupal on 5-Nano Series'''
|}
|}
'''Introduction'''
'''Introduction'''
Line 7: Line 7:
This step-by-step guide shows how to install Drupal on Uniform Server 5.0-Nano and how to resolve common issues such as PHP mail and cron.  
This step-by-step guide shows how to install Drupal on Uniform Server 5.0-Nano and how to resolve common issues such as PHP mail and cron.  


'''''Provisional release, may be wait for D7.'''''
'''''Provisional release: maybe wait for D7.'''''


== Preparation - 1 ==
== Preparation - 1 ==
Line 16: Line 16:


# '''A)''' Create a new folder named '''drupal_b''' (Can be any name)
# '''A)''' Create a new folder named '''drupal_b''' (Can be any name)
# Extract a new copy of Uniform Server V5.0-Nano to this folder<br>&nbsp;--- Database user name '''root''' - No need to change this<br>&nbsp;--- Database password '''root''' - Before installing Drupal I recommend changing this using [[5.0-Nano: Security & passwords#MySQL Password | apanel]]   
# Extract a new copy of Uniform Server V5.0-Nano to this folder<br>&nbsp;--- Database user name '''root''' - No need to change this<br>&nbsp;--- Database password '''root''' - Before installing Drupal, I recommend changing this using [[5.0-Nano: Security & passwords#MySQL Password | apanel]]   
# '''Start''' Uniform Server.  
# '''Start''' Uniform Server.  


'''''Download Drupal'''''  
'''''Download Drupal'''''  
<ol start="4">
<ol start="3">
<li> '''B)''' Create a new folder '''drupal_a''' (Can be any name its only a temporary folder)</li>
<li> '''B)''' Create a new folder '''drupal_a''' (Can be any name its only a temporary folder)</li>
<li> Download  Drupal '''6.13''' (or newer version) from [http://drupal.org/ here] save to a convenient folder for example '''drupal_a'''</li>
<li> Download  Drupal '''6.15''' (or newer version) from [http://drupal.org/ here] save to a convenient folder for example '''drupal_a'''</li>
<li>Unzip the downloaded file (drupal-6.13.tar.gz) Windows cannot do this use something like 7-Zip Portable<br>&nbsp;--- Download site: [http://portableapps.com/apps/utilities PortableApps.com]<br>&nbsp;--- File name: 7-Zip Portable - Multilingual file archiver and compressor</li>
<li>Unzip the downloaded file (drupal-6.15.tar.gz) Windows cannot do this. Use something like 7-Zip Portable<br>&nbsp;--- Download site: [http://portableapps.com/apps/utilities PortableApps.com]<br>&nbsp;--- File name: 7-Zip Portable - Multilingual file archiver and compressor</li>
<li>'''B)''' Extract '''drupal-6.13.tar.gz''' to current path, creates a new folder '''drupal-6.13.tar''' open this folder '''C)'''</li>
<li>'''B)''' Extract '''drupal-6.15.tar.gz''' to current path; creates a new folder '''drupal-6.15.tar'''. Open this folder '''C)'''</li>
<li>'''C)''' Extract  drupal-6.13.tar to current path, creates a new folder drupal-6.13 '''(D)'''<br>
<li>'''C)''' Extract  drupal-6.15.tar to current path; creates a new folder drupal-6.15 '''(D)'''.<br>
inside this is a second folder drupal-6.13 containing all the drupal files '''E)'''.</li>
Inside this is a second folder drupal-6.15 containing all the drupal files '''E)'''.</li>


</ol>
</ol>
'''''Copy files to Uniform Server'''''
'''''Copy files to Uniform Server'''''
<ol start="9">
<ol start="8">
<li>'''F)''' Copy folder '''drupal-6.13''' (E) to server root folder '''www''' '''(G)'''</li>
<li>'''F)''' Copy folder '''drupal-6.15''' (E) to server root folder '''www''' '''(G)'''</li>
<li>'''H)''' Rename folder '''drupal-6.13''' to '''drupal'''</li>
<li>'''H)''' Rename folder '''drupal-6.15''' to '''drupal'''</li>
<li>'''I)''' Navigate to folder UniServer\www\drupal\sites\'''default'''<br>&nbsp;--- Make a copy of file: '''default.settings.php'''<br>&nbsp;--- Rename this copy to: '''settings.php'''</li>
<li>'''I)''' Navigate to folder UniServer\www\drupal\sites\'''default'''<br>&nbsp;--- Make a copy of file: '''default.settings.php'''<br>&nbsp;--- Rename this copy to: '''settings.php'''</li>
</ol>
</ol>
Line 38: Line 38:
[[Image:Nano_drupal_1.gif]]
[[Image:Nano_drupal_1.gif]]
|}
|}
'''''[[#top | Top]]'''''
== Switch to production, start servers ==
UniServer’s default is to use the production PHP configuration file. However, you may have switched configuration files during development.
Before installing any applications, ensure that the production configuration is selected. 
'''''Check configuration file'':'''
# Start UniTray, in folder UniServer double click on '''Start.exe''', which creates the tray icon.
# Check configuration: Left click '''tray icon > Server Status''' – Top of page, php.ini displays either Production or development.
# If Production displayed, no action required; you can start servers.
# If development displayed, proceed as follows:
# Switch to production: Left click '''tray icon > Advanced > click php.ini to switch to Production'''.
'''''Start Servers'':'''
* Start Uniform Server. Left click '''tray icon > click Start UniServer '''


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 43: Line 60:
== Preparation - 2 ==
== Preparation - 2 ==
=== Create Drupal database ===
=== Create Drupal database ===
Creating the Drupal database is straight forward, note tables are automatically inserted during installation
Creating the Drupal database is straight forward. Note that tables are automatically inserted during installation.
{|
{|
|-
|-
Line 58: Line 75:
|}
|}
'''''Note'':'''
'''''Note'':'''
* You can start phpMyAdmin from Apanel, start Apanel by typing <nowiki>http://localhost/apanel/</nowiki> into your browser address bar.
* You can start phpMyAdmin from Apanel. Start Apanel by typing <nowiki>http://localhost/apanel/</nowiki> into your browser address bar.
* From Apanel click on the '''phpMyAdmin''' link. (left menu under tools)
* From Apanel click on the '''phpMyAdmin''' link. (left menu under tools)


Line 64: Line 81:


=== Optionally configure PHP email ===
=== Optionally configure PHP email ===
After you complete the final step in '''Install and set-up Drupal''' see below you will receive the following warning message:
After you complete the final step in '''Install and set-up Drupal''', see below. You will receive the following warning message:
<pre>
<pre>
warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25,
warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25,
Line 71: Line 88:
Unable to send e-mail. Please contact the site admin, if the problem persists.
Unable to send e-mail. Please contact the site admin, if the problem persists.
</pre>
</pre>
If you are only exploring and testing Drupal's functionality you can safely ignore this (Its only a warning and not an error). However if you would like to send emails via your ISP you have three options.
If you are only exploring and testing Drupal's functionality, you can safely ignore this; it's only a warning and not an error.  
 
However, if you would like to send emails via your ISP, you have four options.


==== A) Edit php.ini ====
==== A) Edit php.ini ====
Line 87: Line 106:
</pre>
</pre>


Replace: SMTP = '''localhost''' with your ISP's SMTP server; for details check out this page [[PHP mail function | PHP mail function]]
Replace: SMTP = '''localhost''' with your ISP's SMTP server; for details check out this page [[PHP mail function|PHP mail function]]
   
   
Replace: sendmail_from = '''me@localhost.com''' with your real email address issued to you by your ISP.
Replace: sendmail_from = '''me@localhost.com''' with your real email address issued to you by your ISP.
Line 93: Line 112:
'''''Note'':'''
'''''Note'':'''
The above changes also need to be made to files:
The above changes also need to be made to files:
* '''php.ini_delvelopment_nano'''
* '''php.ini_delvelopment_nano''' (note spelling error)
* '''php.ini_production_nano'''
* '''php.ini_production_nano'''
These files are selectable from UniTray and overwrite php.ini this allows switching between production and development for testing.
These files are selectable from UniTray and overwrite php.ini. This allows switching between production and development for testing.


==== B) Install Fake Sendmail for Windows ====
==== B) Install Fake Sendmail for Windows ====
If your ISP requires authentication install [[Installing Fake Sendmail for Windows |Fake Sendmail for Windows]]
If your ISP requires authentication, install [[Installing Fake Sendmail for Windows |Fake Sendmail for Windows]]


==== C) Install a mailserver ====
==== C) 5.3-Nano+ Enable msmtp ====
One final option if you want to run your own mail server and your ISP does not block the mail ports check out this page [[SSL Part 2: Installing hMailServer | Installing hMailServer]]
If your ISP requires authentication, 5.3-Nano+ has '''msmtp''' installed (replacement for Fake Sendmail) see [[5.3-Nano: msmtp |  5.3-Nano: msmtp]] for details.
 
==== D) Install a mailserver ====
One final option: If you want to run your own mail server and your ISP does not block the mail ports, check out this page [[SSL Part 2: Installing hMailServer | Installing hMailServer]]




Line 107: Line 129:


== Install and set-up Drupal ==
== Install and set-up Drupal ==
The Drupal set-up is straight forward I have shown what needs to be entered in the action column.
The Drupal set-up is straight forward. I have shown what needs to be entered in the action column.


For a test server enter whats highlighted in bold, alternatively enter your own specific data.  
For a test server enter what's highlighted in bold, or enter your own specific data.  
{|cellpadding="4" cellspacing="1" style="background:#000000;"
{|cellpadding="4" cellspacing="1" style="background:#000000;"
|-style="background:#e8e8e8;"
|-style="background:#e8e8e8;"
Line 134: Line 156:
'''''Note'':''' Use Advanced Options if you moved servers (new MySQL port)
'''''Note'':''' Use Advanced Options if you moved servers (new MySQL port)
* Database host: '''localhost'''
* Database host: '''localhost'''
* Database port: '''3307''' (Note: 3307 is an example, Use UniTray to find MySQL port. Run '''Server Status''')
* Database port: '''3307''' (Note: 3307 is an example. Use UniTray to find MySQL port. Run '''Server Status''')
* Table prefix: (leave blank)  
* Table prefix: (leave blank)  


Line 149: Line 171:
* Confirm password: '''MPG-root66''' Use your own password
* Confirm password: '''MPG-root66''' Use your own password
<br>
<br>
* Clean URL's radio button is '''Enabled''' no need to change
* Clean URL's radio button is '''Enabled'''; no need to change
* Update notification leave '''checked'''.
* Update notification leave '''checked'''.
* Click '''Save and continue'''  
* Click '''Save and continue'''  
|}
|}
I mentioned in Preparation-2 you will receive a mail warning this can safely be ignored. If you implemented either of the above solutions a warning will not be issued.  
I mentioned in Preparation-2 you will receive a mail warning. This can safely be ignored. If you implemented any of the above solutions a warning will not be issued.  


To view your new site click "'''your newsite'''" link (or type <nowiki>http://localhost/drupal/</nowiki>).
To view your new site, click "'''your newsite'''" link (or type <nowiki>http://localhost/drupal/</nowiki>).


When you '''log into admin''' (click administer link) at the top of the admin page you will see
When you '''log into admin''' (click administer link) at the top of the admin page you will see
Line 168: Line 190:


== Cron ==
== Cron ==
Cron is unavailable on Windows it is a Unix process that periodically runs certain scripts. Although Drupal allows you to manually run '''cron.php''' this can can be inconvenient. The following section shows how to enable UniServer5.0-Nano's portable cron.
Cron is unavailable on Windows. It is a Unix process that periodically runs certain scripts. Although Drupal allows you to manually run '''cron.php''' this can can be inconvenient. The following section shows how to enable UniServer5.0-Nano's portable cron.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 225: Line 247:


== Portability ==
== Portability ==
If you want a portable version of Drupal copy the folder '''UniServer''' and all its content to your USB memory stick that’s it. Don’t expect fantastic speeds however it is usable.
If you want a portable version of Drupal, copy the folder '''UniServer''' and all its content to your USB memory stick. That’s it. Don’t expect fantastic speeds, however it is usable.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


== Plugin ==
The above instructions are generic allowing you to install the latest version of Drupal.
If you prefer a click and go solution go to [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/Applications/ '''SourceForge''']
* Under '''Plugins'''
* Navigate to sub-folder '''Uniform Server 5-Nano Plugins'''
* Download file [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/Applications/V55_Drupal/V55_Drupal_6_15.exe/download V55_Drupal_6_15.exe]
Save this to folder UniServer, to install double click on file. Drupal is pre-configured and ready to go. Check out the read me file for latest information.
'''''Note'':''' This plugin is intended to quickly get Drupal up and running allowing you to explore the software. If you intend running a production server delete the folders installed and perform a manual install this allows you to tailor Drupal and include any missing modules.
'''''[[#top | Top]]'''''
== MySQL Security ==
The above installation guide and associated downloadable plugin are intended to get the application up and running purely for testing.
If you are intending to put the application on line make sure to read any security advice provided with the application and check providers web site.
More impotently the above installation is an extreme security risk if put online as is. 
Its imperative you secure the MySQL server before putting your servers online.
Please read the following page [[MySQL Security | '''MySQL Security''']] and restrict privileges to any user that has connection access to your server.
'''''[[#top | Top]]'''''
== Summary ==
== Summary ==
I have shown how easy it is to install Drupal on Uniform Server 5.0-Nano.
I have shown how easy it is to install Drupal on Uniform Server 5.0-Nano.


Cron a Unix process is required to periodically update Drupal's status, Uniform Server 5.0-Nano uses Portable Cron which is built into yhe server.
Cron, a Unix process is required to periodically update Drupal's status. Uniform Server 5.0-Nano uses Portable Cron which is built into the server.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''

Latest revision as of 16:10, 17 October 2012

Installing Drupal on 5-Nano Series

Introduction

This step-by-step guide shows how to install Drupal on Uniform Server 5.0-Nano and how to resolve common issues such as PHP mail and cron.

Provisional release: maybe wait for D7.

Preparation - 1

Install Uniform server

  1. A) Create a new folder named drupal_b (Can be any name)
  2. Extract a new copy of Uniform Server V5.0-Nano to this folder
     --- Database user name root - No need to change this
     --- Database password root - Before installing Drupal, I recommend changing this using apanel
  3. Start Uniform Server.

Download Drupal

  1. B) Create a new folder drupal_a (Can be any name its only a temporary folder)
  2. Download Drupal 6.15 (or newer version) from here save to a convenient folder for example drupal_a
  3. Unzip the downloaded file (drupal-6.15.tar.gz) Windows cannot do this. Use something like 7-Zip Portable
     --- Download site: PortableApps.com
     --- File name: 7-Zip Portable - Multilingual file archiver and compressor
  4. B) Extract drupal-6.15.tar.gz to current path; creates a new folder drupal-6.15.tar. Open this folder C)
  5. C) Extract drupal-6.15.tar to current path; creates a new folder drupal-6.15 (D).
    Inside this is a second folder drupal-6.15 containing all the drupal files E).

Copy files to Uniform Server

  1. F) Copy folder drupal-6.15 (E) to server root folder www (G)
  2. H) Rename folder drupal-6.15 to drupal
  3. I) Navigate to folder UniServer\www\drupal\sites\default
     --- Make a copy of file: default.settings.php
     --- Rename this copy to: settings.php

Top

Switch to production, start servers

UniServer’s default is to use the production PHP configuration file. However, you may have switched configuration files during development.

Before installing any applications, ensure that the production configuration is selected.

Check configuration file:

  1. Start UniTray, in folder UniServer double click on Start.exe, which creates the tray icon.
  2. Check configuration: Left click tray icon > Server Status – Top of page, php.ini displays either Production or development.
  3. If Production displayed, no action required; you can start servers.
  4. If development displayed, proceed as follows:
  5. Switch to production: Left click tray icon > Advanced > click php.ini to switch to Production.

Start Servers:

  • Start Uniform Server. Left click tray icon > click Start UniServer

Top

Preparation - 2

Create Drupal database

Creating the Drupal database is straight forward. Note that tables are automatically inserted during installation.

  1. Left click tray icon > click phpMyAdmin - This opens phpMyAdmin in your browser
  2. A) We want to create a new database. Name it drupal (or something easy to remember if you change name make sure you use this name during installation.)
  3. B) Click on Create to create the database

Note:

  • You can start phpMyAdmin from Apanel. Start Apanel by typing http://localhost/apanel/ into your browser address bar.
  • From Apanel click on the phpMyAdmin link. (left menu under tools)

Top

Optionally configure PHP email

After you complete the final step in Install and set-up Drupal, see below. You will receive the following warning message:

warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
in Z:\www\drupal\includes\mail.inc on line 193.
Unable to send e-mail. Please contact the site admin, if the problem persists.

If you are only exploring and testing Drupal's functionality, you can safely ignore this; it's only a warning and not an error.

However, if you would like to send emails via your ISP, you have four options.

A) Edit php.ini

Open php.ini located in folder UniServer\usr\local\php

Locate this section:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = me@localhost.com

Replace: SMTP = localhost with your ISP's SMTP server; for details check out this page PHP mail function

Replace: sendmail_from = me@localhost.com with your real email address issued to you by your ISP.

Note: The above changes also need to be made to files:

  • php.ini_delvelopment_nano (note spelling error)
  • php.ini_production_nano

These files are selectable from UniTray and overwrite php.ini. This allows switching between production and development for testing.

B) Install Fake Sendmail for Windows

If your ISP requires authentication, install Fake Sendmail for Windows

C) 5.3-Nano+ Enable msmtp

If your ISP requires authentication, 5.3-Nano+ has msmtp installed (replacement for Fake Sendmail) see 5.3-Nano: msmtp for details.

D) Install a mailserver

One final option: If you want to run your own mail server and your ISP does not block the mail ports, check out this page Installing hMailServer


Top

Install and set-up Drupal

The Drupal set-up is straight forward. I have shown what needs to be entered in the action column.

For a test server enter what's highlighted in bold, or enter your own specific data.

Drupal Step Action
 
  1. Start UniTray, in folder UniServer double click on Start.exe tray icon created.
  2. Switch to production, Left click tray icon > Advanced > click php.ini switch to Production.
  3. Start Uniform Server. Left click tray icon > click Start UniServer
  Type the following into browser address bar http://localhost/drupal/

This opens Drupal's installation page (http://localhost/drupal/install.php?profile=default)

1. Choose language Click Install Drupal in English
2. Verify requirements Automatically Confirmed OK
3. Set up database
  • Database name: drupal
  • Database user name: root
  • Database password: root
  • Click Save and continue

Note: Use Advanced Options if you moved servers (new MySQL port)

  • Database host: localhost
  • Database port: 3307 (Note: 3307 is an example. Use UniTray to find MySQL port. Run Server Status)
  • Table prefix: (leave blank)
4. Install site Automatically Confirmed
5. Configure site
  • Site name: localhost
  • Site e-mail address: me@localhost


  • Username (admin): admin Use your own admin name
  • E-mail address: Use your own email address
  • Password (admin):MPG-root66 Use your own password
  • Confirm password: MPG-root66 Use your own password


  • Clean URL's radio button is Enabled; no need to change
  • Update notification leave checked.
  • Click Save and continue

I mentioned in Preparation-2 you will receive a mail warning. This can safely be ignored. If you implemented any of the above solutions a warning will not be issued.

To view your new site, click "your newsite" link (or type http://localhost/drupal/).

When you log into admin (click administer link) at the top of the admin page you will see

"Cron has not run. Please visit the status report for more information."
  1. Click the status report link:
  2. Navigate to "Cron maintenance tasks" to the right click "run cron manually"
  3. After a short time you will receive a message "Cron ran successfully."

Top

Cron

Cron is unavailable on Windows. It is a Unix process that periodically runs certain scripts. Although Drupal allows you to manually run cron.php this can can be inconvenient. The following section shows how to enable UniServer5.0-Nano's portable cron.

Top

Enable portable Cron

Edit file: UniServer\unicon\main\run_cron.php

Uncomment this line as shown:

$dummy = file("http://localhost/drupal/cron.php");

Change the timer to suit application

sleep(15);  // Set required delay (seconds)

Top

Run portable Cron

Manually run cron from UniTray

  • Start: Left click tray icon > Advanced > click Start Portable Cron
  • Stop: Left click tray icon > Advanced > click Stop Portable Cron

Top

Automatically start and stop with servers

Edit file: UniServer\unicon\tray_menu\UniTray1.ini

Locate these lines under [Menu.Left] Menu section (for convenience lines have been split):

Type: item; Caption: "Start UniServer (Apache MySQL)";
 Action: shellexecute; FileName: "%PHP%\php.exe";
 Parameters: " -n %ServerConMain%\start_servers.php 7";ShowCmd: hidden; Glyph: 9

Type: item; Caption: "Stop  UniServer (Apache MySQL)";
 Action: shellexecute; FileName: "%PHP%\php.exe";
 Parameters: " -n %ServerConMain%\stop_servers.php 7";ShowCmd: hidden; Glyph: 11

  • Replace start_servers.php 7 with start_servers.php 23
  • Replace stop_servers.php 7 with start_servers.php 23

Note: Values are binary coded

 Note: Binary 1+2+4+16 = 23  
 1  - Run Apache server 
 2  - Run MySQL  server
 4  - Start Index page
 16 - Run cron

Related links:

Portable Cron

LCC portable cron program

Top

Portability

If you want a portable version of Drupal, copy the folder UniServer and all its content to your USB memory stick. That’s it. Don’t expect fantastic speeds, however it is usable.

Top

Plugin

The above instructions are generic allowing you to install the latest version of Drupal.

If you prefer a click and go solution go to SourceForge

  • Under Plugins
  • Navigate to sub-folder Uniform Server 5-Nano Plugins
  • Download file V55_Drupal_6_15.exe

Save this to folder UniServer, to install double click on file. Drupal is pre-configured and ready to go. Check out the read me file for latest information.

Note: This plugin is intended to quickly get Drupal up and running allowing you to explore the software. If you intend running a production server delete the folders installed and perform a manual install this allows you to tailor Drupal and include any missing modules.

Top

MySQL Security

The above installation guide and associated downloadable plugin are intended to get the application up and running purely for testing.

If you are intending to put the application on line make sure to read any security advice provided with the application and check providers web site.

More impotently the above installation is an extreme security risk if put online as is. Its imperative you secure the MySQL server before putting your servers online.

Please read the following page MySQL Security and restrict privileges to any user that has connection access to your server.

Top

Summary

I have shown how easy it is to install Drupal on Uniform Server 5.0-Nano.

Cron, a Unix process is required to periodically update Drupal's status. Uniform Server 5.0-Nano uses Portable Cron which is built into the server.

Top