Configuring Drupal

The remainder of the Drupal configuration can be carried out using the web browser on your system. If you're installing on a remote web server, replace localhost in the following example URLs with the server's domain name (for instance, www.freesoftwarecreative.com) or IP address (such as 62.75.222.127).

First, point your browser at the http://localhost/drupal6/install.php page (see Figure 12-11).

[ilt [du y -n Hialwï JJtukmûriï $nls ijcip

~ Ô ïj hl 1 iv.'iVw . IhrrJ Yn ipnltf m -il I [ihp'pin'il ' = il' M O ■-- ^

Drupal

V*nfy roqiiirwnoiif q

Choose language

.«vin» hem 1o ir.-J.i 1 [)iup> 1 in Olltn Uivqu.Kjn

Sit up dtUbKC

InïM wir

Ctnfiguresite

Finished

[ hKp/AorwilhottWmpalWiwtalLphpTpraWc-dMaJti.lDcaJc-cn

Figure 12-11. Most Drupal settings are configured after installation, through the browser.

Note that this page has the . php extension, not the .html extension you see on a static web site. It's very important that you type the entire URL, including the install.php part; otherwise, you may see a page of error messages instead of the Drupal installation page.

By default, Drupal is installed with the administration pages in English, but you can click a link to information about how to change this setting. Of course, just because Drupal's administration pages are in English doesn't mean all the content posted to the site has to be in the same language. However, adding multilingual support to Drupal helps non-English-speaking users of your site when they register or post content (if you decide to let them do that).

If you're using the Ubuntu installer, the package requirements are in place and the database is already set up, so Drupal skips the next two steps and jumps straight to the Configure Site page. On this page, the first field is for your new Drupal site's name, which you should choose carefully, because it appears on most pages of the site. The default of the server name, localhost in this case, won't do.

Below this is the field for the site's official e-mail address. On a production web server, which is permanently connected to the Internet and has a mail server running, this feature enables Drupal to send e-mail to new users when they register for membership on your site (if you decide to allow third-party registrations). This From address should normally be within the same domain as the web site, so that anti-spam programs don't get confused about which server the mail is coming from. In this example, I've used the address [email protected] so people realize the e-mail isn't from a human being (see Figure 12-12).

Figure 12-12. Set the name of your web site and the From address for automated system e-mails.

If you don't have a mail server on your test machine, put your own e-mail address in this box for now. Drupal won't be able to send out e-mails, but that need not prevent you from trying the software. If you're using Ubuntu and you've installed the drupal6 metapackage, the exim4 mail server packages will have been installed automatically. For the purposes of testing Drupal, you don't need to configure the Exim mail server, which is just as well. Exim is a powerful program, but tuning it can get complicated. An alternative mail server that is easier to configure and that works perfectly well with Drupal is Postfix (GNU/Linux, Mac; www.postfix.org). Ubuntu users can find a package called postfix in Synaptic. Installing this package removes the exim4 packages, because it doesn't make sense to run two mail servers on the same machine.

Scroll down the "Configure site" page to the next section, headed "Administrator account." Enter the username you'd like, your own e-mail address, and a good strong password (see Figure 12-13). It's not a wise idea to reuse a password from the same or another system for this. Enter the password a second time to confirm your typing. Then, click the Save and Continue button at the bottom of the page.

Eite gdi( Vic* Hillary Bookirarlcs

Configure site | Drupnl - Mozilla ftrrfo* _ *

i v £ ^ £ http/i1ocalh<»tMnjpalMiistall.|^71ocalc»en6i|if^leJHlelaiJt v |<Jv;ii • ifac- ■ ;

Admn&tiXOr actounl

BUM |

fpflCCl MX ikmni pjr^euaE-anli W atoil'tvi fmpt^Odl. tyffcrtV irritfdtflCMa,

| d-jrn*tfH™«oftw*rct rcatiw.com |

Pjtvftcril itrpnglh: kujh

Confirm paitwanl:

__M

[ Done

Figure 12-13. Enter a name, an e-mail address, and a password for the system administrator (that's you).

If you run into a "Fatal error: Allowed memory size exhausted" message in the web browser when configuring Drupal, this is because PHP's default settings on Ubuntu only allow a script to use a maximum of 16MB memory, and Drupal can easily exceed that limit. To fix this problem, open a terminal, and change to the directory where the PHP configuration for Apache is stored:

cd /etc/php5/apache2

Then, edit the PHP configuration file, php.ini:

sudo nano php.ini

Use the Ctrl+W search feature in nano to find the text memory_limit, because php.ini is a long file. Change the default value of memory_limit = 16M to memory_limit = 32M (see Figure 12-14), and then write out the file with Ctrl+O.

Figure 12-14. Memory limit problems during Drupal installation can be fixed with a simple tweak to the PHP configuration.

Refresh the Drupal install page, and the error message should go away. In its place is a message that Drupal is already installed (see Figure 12-15).

*j Drupal already installed f Free Software far Creative People ■ Mozilla Firefo*

- " 6 © Ä MlirjïloiallwstAini^ ~ IM I •. Sc-nc t

Free Software for Creative People

1o*ttt m, yau must empty y«w Uittift?<iaMU«e 1 1o instil to a different database, ed t the appropriate settirhjs.jthp file in the stelaae«*

' Id opg'adc an ewst«ng ristatatcn. procccd to the update script. 1 View /Our Bulling vie

Dot*

Figure 12-15. After fixing the PHP memory limit, Drupal confirms that everything is OK

Navigate to http://localhost/drupal6/, or click the link that says "View your existing site." This takes you to the home page of your freshly installed CMS (see Figure 12-16). Of course, there is no content yet, and the graphical theme is a plain, default one, but the features you need to administer and start building the web site are all in place.

Figure 12-16. The home page of your new Drupal site has little content and a plain blue theme, but you'll fix that later.

Your administrator account should be already logged in, with your username shown at left on the web page. Below this are four key links: "My account," where personal settings are edited; "Create content," which is the route to uploading text, pictures, and video; "Administer", where you manage site content and users; and "Log out," which prevents others from tampering with your web site if you're using a shared computer.

Was this article helpful?

0 0

Post a comment