Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > contrib-updates > by-pkgid > 02e45b2cd6a4a47c88f15dd2f64cf46c > files > 699

cherokee-1.0.8-1mdv2010.1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <meta name="ROBOTS" content="ALL" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="Keywords" content="cherokee web server httpd http" />
    <meta name="Description" content="Cherokee is a flexible, very fast, lightweight Web server. It is implemented entirely in C, and has no dependencies beyond a standard C library. It is embeddable and extensible with plug-ins. It supports on-the-fly configuration by reading files or strings, TLS/SSL (via GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly features, PHP, custom error management, and much more." />
    <link href="media/css/cherokee_doc.css" rel="stylesheet" type="text/css" media="all" />
  </head>
<body>
<h2 id="_a_href_index_html_index_a_8594_a_href_cookbook_html_cookbook_a"><a href="index.html">Index</a> &#8594; <a href="cookbook.html">Cookbook</a></h2>
<div class="sectionbody">
</div>
<h2 id="_cookbook_setting_up_drupal">Cookbook: Setting up Drupal</h2>
<div class="sectionbody">
<div class="paragraph"><p>Setting up <a href="http://drupal.org/">Drupal</a> with Cherokee is really
easy. This recipe describes the Drupal 6.x installation, which is the
latest release at the time of writing.</p></div>
<div class="paragraph"><p>There are two ways of installing Drupal: it can either be installed as
a new virtual server or be installed inside a directory of some of the
virtual servers that already exist.</p></div>
<h3 id="cherokee_vserver">Setting up Drupal as a new Virtual Server</h3><div style="clear:left"></div>
<div class="paragraph"><p>The first step would be to go to the virtual server list page. Once in
there, click on the <tt>Add</tt> button at the top of the panel to show the
list of available wizards.</p></div>
<div class="imageblock">
<div class="content">
<img src="media/images/admin_vservers_wizard.png" alt="media/images/admin_vservers_wizard.png" />
</div>
</div>
<div class="paragraph"><p>Now, you will have to select the <tt>CMS</tt> category, and run the Drupal
wizard.  At this stage the Drupal wizard will ask you for some basic
parameters about the installation. It will try to auto-fill as many
entries of the form as possible.  For instance, if it finds Drupal
installed in a standard location it will use that path as the default
directory.</p></div>
<div class="paragraph"><p>The new virtual server will be created after this form is submitted.
The virtual server configuration will cover the vast majority of the
cases. Most probably it will cover your needs, although you are free
to modify it as you will.</p></div>
<h3 id="cherokee_dir">Setting up Drupal inside a Directory</h3><div style="clear:left"></div>
<div class="paragraph"><p>Drupal can also be configured inside a directory. Let&#8217;s suppose we
want to set up Drupal inside the <tt>/blog</tt> directory of one of our
virtual servers.</p></div>
<div class="paragraph"><p>In this case, the first thing you will have to do is to enter the
virtual server configuration you&#8217;d like to configure Drupal in. Visit
the <tt>Behavior</tt> tab, use the <tt>Rule Management</tt> button and click on the
<tt>Add</tt> button at the top of the panel.</p></div>
<div class="imageblock">
<div class="content">
<img src="media/images/admin_vserver_wizard.png" alt="media/images/admin_vserver_wizard.png" />
</div>
</div>
<div class="paragraph"><p>As in the previous case, this wizard will ask some very basic
information, including the public web directory where Drupal will be
set up and the local Drupal source directory.</p></div>
<h3 id="drupal">Setting up Drupal</h3><div style="clear:left"></div>
<div class="paragraph"><p>First download and uncompress the distributed Drupal release into
<tt>/var/www/drupal</tt>, and create a database suitable for the installation.</p></div>
<div class="paragraph"><p>Log in to MySQL:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>mysql -u root -p</tt></pre>
</div></div>
<div class="paragraph"><p>And create the database for Drupal. We will be using the name
<em>drupal</em>, the user <em>drupaluser</em> and the password <em>drupalpassword</em>, but
you should set up your own.</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>CREATE DATABASE drupal;
GRANT ALL PRIVILEGES ON drupal.* TO drupaluser@localhost IDENTIFIED BY 'drupalpassword';
GRANT ALL PRIVILEGES ON drupal.* TO drupaluser@localhost.localdomain IDENTIFIED BY 'drupalpassword';
FLUSH PRIVILEGES;
quit;</tt></pre>
</div></div>
<div class="paragraph"><p>Then point your web browser to <tt>http://localhost</tt> and follow the
instructions provided by the installer.</p></div>
<div class="paragraph"><p>You will need to copy the config file and change the permissions manually to proceed:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>cd /var/www/drupal/sites/default
cp default.settings.php settings.php
chmod 644 settings.php</tt></pre>
</div></div>
<div class="paragraph"><p>And the installation will be almost automatic. Just fill up the
requested values and you will obtain the following results once your
are through.</p></div>
<div class="imageblock">
<div class="content">
<img src="media/images/cookbook_drupal.png" alt="media/images/cookbook_drupal.png" />
</div>
</div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">As of Drupal 6.14, a problem has been reported related to gzip
compression of multilingual contents. Since the Wizard is meant to
work out of the box, Cherokee disables gzip compression for the rule
that manages PHP in your Drupal <tt>Virtual Server</tt>. If you are not using
a multilingual Drupal or find another workaround for the issue, you
will probably want to enable gzip encoding on the PHP rule to increase
performance.</td>
</tr></table>
</div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
</body>
</html>