Table of Contents

Local installation

Windows

To install Dotclear locally, you need:

The WAMP5 software allows you to install a full environment featuring this prerequisites.

Warning:

Wamp5 does not run on Windows 98 and Me; you need XP (any version). If you're using Windows Vista, you will need Wamp5 1.7.0 or above.

Download the software from the official site and install it on your computer.

Note:

WAMP5 has a compact installation: all the necessary files are copied to the installation directory, which is by default named wamp and located at the root of the boot drive. You are free to choose another location at the time of installation.

Dotclear 2 should then be downloaded, extracted and copied to the root directory of the server (www directory in wamp). You may find it useful to create a specific directory (for example dotclear) in www, if you wish to test other scripts or Dotclear installation locally.

Immediately place an empty directory named tmp into dotclear.

Once this is done, start Wamp. An icon should appear in your notification area (bottom-right corner of your screen) and informs you that the services (Apache and MySQL) are running.

A database named "test" is provided with Wamp5. That is the database we are going to use (if you wish to create another one, you can do it with PhpMyAdmin via the menu added by Wamp5 to the notification area).

Installing with the wizard:

Open you browser and go to: http://localhost/dotclear/admin/install/wizard.php

Below are the parameters required for the configuration:

Press "Save", fill in your details (email, last name, first name) then in the next screen, write down the username and password that are provided and log in.

Installing from the config.php file:

You can install Dotclear manually by renaming inc/config.php.in into config.php and entering the following details:

// Database driver (mysql, pgsql, sqlite)
define('DC_DBDRIVER','mysql');
 
// Database hostname (usually "localhost")
define('DC_DBHOST','localhost');
 
// Database user
define('DC_DBUSER','root');
 
// Database password
define('DC_DBPASSWORD','');
 
// Database name
define('DC_DBNAME','test');
 
// Tables' prefix
define('DC_DBPREFIX','dc_');
 
// Crypt key (password storage)
define('DC_MASTER_KEY','yourpassword');
 
 
// Admin URL. You need to set it for some features.
define('DC_ADMIN_URL','admin');
 
// Cookie's name
define('DC_SESSION_NAME','dcxd');
 
// Plugins root
define('DC_PLUGINS_ROOT',dirname(__FILE__).'/../plugins');
 
// Template cache directory
define('DC_TPL_CACHE',dirname(__FILE__).'/../cache');

Then open your browser and go to: http://localhost/dotclear/admin/install.

Mac OS X

Prerequisites

Installation

The easiest way is to install the MAMP package that provides you with an Apache server and a totally independent MySQL server.

Note:

The root directory for the Apache server embedded in MAMP is named htdocs and located in the MAMP directory. This location may be changed via MAMP preferences.

If you wish to use a PostgreSQL database, you only need to install the PostgreSQL Unified Installer package (version 8.1.5b successfully tested on MacOSX 10.3.9). you will then have all you need to install the server as well as a few tools (server control, database and user creation). The installation process is typical of Mac OS X: double-click on PostgreSQL.mpkg package (located in the server directory of the mounted disk image).

Note:

Once started, the Apache server is accessible at: http://localhost:8888/.

Once you have installed the servers, you need to create a UTF-8 encoded database. The MAMP package include phpMyAdmin to manage MySQL databases. If you wish to use PostgreSQL, you can download and install phpPgAdmin .

Below are the parameters required to configure phpPGAdmin:

You should then download and install Dotclear 2 in the root directory of the server (htdocs) or in another directory you created for this purpose. Below are the parameters required for the configuration:

Tip:

If you wish to manage two installations of Dotclear simultaneously, you should use a different name for the session cookie in each installation (in inc/config.php). This will allow you to login and have administrative sessions open to both installations the same time.

Linux

Warning:

This tutorial is not adapted to a Linux-based personal hosting solution for one or several Dotclear blogs, but is only intended for local tests before or in conjunction with an online version at a third-party hosting provider. Also, to make it simpler, the tutorial only covers installations with MySQL. Don't worry, though - if your hosting providers offers PostgreSQL, you will be able to import the data you created locally.

Installation

Note:

All Linux distributions typically provide the packages required to install a fully functional Apache server, with all sorts of modules and configuration options 1).

The easiest way is to download a server that is "ready to use", designed for testing: XAMPP. This one does not provide the security of a "production" server, but you get everything you need in one single package :-) !

In fact, XAMPP will install: an Apache web server, a MySQL database server, the languages PHP 4 and 5 (version 5, required for Dotclear 2, is actived by default), phpMyAdmin, and phpSQLiteAdmin, as well as all the libraries necessary to make them run. Al of this is included in a small 50 MB package.

Once you have downloaded it, extract it into your /opt directory as indicated on the website, with a simple

sudo tar xzf xampp-linux-x.x.x.tar.gz -C /opt

You can then start the server:

sudo /opt/lampp/lampp start

and take two minutes to configure the passwords (basic security):

sudo /opt/lampp/lampp security

Now check the following address in your favourite browser: http://localhost/ or http://127.0.0.1/

If a pretty page is displayed, then everything's alright. Otherwise, you have missed something in the previous steps ;-)

But you'll still find people who say that Linux is far too complicated! :-D

Prepare the server to "host" Dotclear

MySQL : activating InnoDB

Important:

Dotclear 2 MySQL to use InnoDB to run properly: that's why you need to activate it, because it's disabled by default in XAMPP.

Nothing tricky here: open the configuration file in your favorite text editor (with administrator permissions)

sudo vim /opt/lampp/etc/my.cnf

Look for the following lines:

# Comment the following line to unskip and use InnoDB
skip-innodb

and comment the line as you're recommended, which should give you

# Comment the following line to unskip and use InnoDB
#skip-innodb

Don't forget to save your changes then restart the server:

sudo /opt/lampp/lampp restart

MySQL: creating the database

Log into phpMyAdmin as root (providing the password you have previously defined for MySQL with lampp security, or leaving the password field empty if you're not afraid and haven't configured the security): http://localhost/phpmyadmin/

In the left column of the main area, you will see the title "create a database". Enter the name of the new base (for example dotclear) then choose the collation type utf8_unicode_ci. You can then press the "create" button. We're over with phpMyAdmin :-)

Placing Dotclear files

Download the last version of Dotclear 2 then extract it into the htdocs directory of the XAMPP installation:

sudo tar xzf dotclear-2.x.x.tar.gz -C /opt/lampp/htdocs/

Then authorise anyone to read, write and execute files (this is a local installation, there isn't much danger around):

 sudo chmod -R 777 /opt/lampp/htdocs/dotclear/

We're now ready to start the wizard.

Initial configuration of Dotclear 2

Go back to your browser: http://localhost/dotclear/admin/install/wizard.php

Choose MySQL as "Type of database", enter localhost as "name of the database host", dotclear as your "database name", root as "username for the database", enter the password you defined for MySQL into the "password for the database" field, then leave the prefix and the location of the temporary directory unchanged.

Normally, if you click on "Save", you are directed to the next page where you only have to fill your email, last name and first name.

With XAMPP, there are no mail server activated, so the following page displays a default login name and the associated password, with a link for you to log in.

Dotclear is now all yours for all the local tests you want to inflict on it. Time to play! ;-)

1) but most likely if you have mastered Apache already, you won't need this tutorial