Installation - Upgrade

The following documentation describes processes to install or upgrade Dolibarr on a Windows, MAC OS or Unix like platform.


Install Dolibarr

With DoliWamp (.exe package)

- Prerequisite: Windows

- Level: Non experienced users

This process works only for Windows users and is recommanded for user with no computer knowledges. If you are experimented with Apache, PHP and Mysql installation, next chapter is better for you. Howerver, if you are a newbie user and running Windows, you can use DoliWamp. DoliWamp is a specialized Dolibarr distribution for Windows. This distribution allows you to make an installation under Windows with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. This is steps to install DoliWamp:

  • Download last Dolibarr version for Windows DoliWamp.

For this, see page download DoliWamp on NLTechno web site.

  • Run the downloaded .exe and follow instructions.

With Dolibarr (standard .tgz package)

- Prerequisite: Apache, PHP and a database server (MySQL or PostgreSQL) are already running correctly.

- Level: Users with few technical knowledges.

This procedure describe manual (and recommended) installation on a GNU/Linux system (Debian, Mandriva, ...), it can be used for other OS with minor changes. You can follow this tutorial for any Dolibarr version >= 2.0.0

  • Check that you have installed Apache, PHP and a database server (MySQL or PostGreSQL) correctly (check list of installed packged on your server by using the package manager of your distribution). If not, install them (use last recent version).

Note: The installer can create optionnaly the database if it does not exists yet, but in this case, you must know your database admin user and password.

For Linux users, if you have just installed MySQL database, the admin user is root. You must run the following command to initialize its password:

To complete...

For Linux users, if you have just installed PostgresSQL, you must run the following command to initialize an admin user and password. For this, add the following line in file /etc/postgresql/x.x/main/pg_hba.conf (replace x.x with your postgres version)

local   all         dolibarrowner    md5

Then launch commands from a root shell

sudo -s -u postgres
createuser dolibarrowner
psql -d template1 -c "alter user dolibarrowner with password dolibarrownerpass"
exit
sudo /etc/init.d/postgresql-8.3 restart

You can test a connection with this user with command

psql -d postgres -U dolibarrowner -W

And type your dolibarrownerpass as password and \q to quit if connection is ok.


  • Go into the directory where to install Dolibarr (the web root directory defined for your web server)
$ cd /var/www
  1. For Debian and Ubuntu families, it is generally: /var/www
  2. For Mandriva: /var/www/html
  3. For RedHat: to complete
  4. For Suse: to complete
  • Get the application archive of last stable version
$ wget http://www.dolibarr.org/files/dolibarr.tgz
  • Uncompress archive
$ tar xvfz dolibarr.tgz
  • Rename directory dolibarr-x.y.z into dolibarr to have a directory name that does not depends on version (replace x.y.z with source version)
$ mv dolibarr-x.y.z dolibarr
  • As a root user, create, into directory dolibarr/htdocs/conf, an empty configuration file called conf.php and set, as owner, the web server user (example www-data on Debian, nobody on old RedHat, apache on Mandriva, recent RedHat or other distributions ...). This is required because the web server will have to write into this file during install process.
$ cd dolibarr ; touch htdocs/conf/conf.php ; chown www-data htdocs/conf/conf.php
  • Always as a root user, create a directory that will serve to save all generated and stocked by Dolibarr (PDf invoices, uploaded images, ...), and attribute to this directory a owner that must be the web server (example www-data on Debian, nobody on old RedHat, apache on Mandriva or recent RedHat, ...). The web server must have write permission into this directory.
$ mkdir documents ; chown www-data documents
  • Now call your browser to point to the main page
http://127.0.0.1/dolibarr/htdocs/
  • Follow instructions of setup steps until end of install process.
  • For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr installed directory that only root user can delete. This will lock the call of the install process again (you will have to remove it for upgrades).

If this is not done, Dolibarr will show you a warning one logged by an administrator user.

$ touch /var/www/dolibarr/install.lock; chmod go-w /var/www/dolibarr;

Upgrade Dolibarr

With DoliWamp (.exe package)

  • Download new .exe package of DoliWamp.
  • Run downloaded .exe file and follow steps without changing any default values. This will upgrades all your files.
  • At the end of the execution, your browser is launched with a page to ask you to run upgrade of your database. Choose the upgrade according to your case.

If there is more than one version late, you must restart this setup a second time to choose launch all migration steps to be in new version from your old version.

With Dolibarr (.tgz package)

This chapter describes an upgrade process of Dolibarr (from an old existing version) to a more recent one. It works for any Dolibarr version that is >= 2.0.0

  • Go into the directory where you installed Dolibarr (it might be the root directory of your web, for example /var/www under Debian)
$ cd /var/www
  • Get archive of last version
$ wget http://www.nltechno.com/files/dolibarr.tgz
  • Uncompress the archive
$ tar xvfz dolibarr.tgz
  • Copy all new extracted files (the one uncompressed into directory dolibarr-x.y.z) to the directory where you put your old Dolibarr version. This will overwrite old files with new ones without removing files specifics to your installation (like conf.php file or complementary non official installed modules).
$ cp -r dolibarr-x.y.z/* dolibarr
  • If no error, you can now remove the directory of source files
$ rm -fr dolibarr-x.y.z
  • Now call the install/ page of Dolibarr in your browser
http://127.0.0.1/dolibarr/install/

If you have a message that tell the install process is locked by a file, remove the file install.lock stored in Dolibarr root directory.

  • Choose Update in proposed menu
  • For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr installed directory that only root user can delete. This will lock the call of the install process again (you will have to remove it for upgrades)

If this is not done, Dolibarr will show you a warning once logged with an administrator user.

$ echo > dolibarr/install.lock
$ chmod 444 dolibarr/install.lock

Setup a LDAP connexion

To complete.

Import external data

For this operation, read page Mass imports.