Difference between revisions of "Manual installation on Windows"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m
Tag: 2017 source edit
m
Tag: 2017 source edit
(5 intermediate revisions by the same user not shown)
Line 352: Line 352:
 
<br />
 
<br />
  
*
+
==Dolibarr installation==
 +
It's party time (get out the balloons and cotillions), the moment you've been waiting for so long has finally arrived! We will finally be able to install Dolibarr.
  
#
+
===Download Dolibarr===
 +
*Please visit the SourceForge mirrors at https://sourceforge.net/projects/dolibarr/files/.
 +
*Click on the folder '''Dolibarr ERP-CRM''', then on the last version number and click on the file with extension '''.zip''' to download it.
 +
 
 +
===Create folder <code>documents</code> of Dolibarr===
 +
Dolibarr needs a folder <code>documents</code> in which it stores generated documents (Sales proposals, Orders, Invoices, Intervention sheets, Delivery notes) but also documents uploaded by user (Account statements, Supplier invoices, etc.).
 +
 
 +
For security reasons, it is preferable to create the folder <code>documents</code> outside the Web Server (for us '''Apache2''').
 +
 
 +
*With the Windows'''File Explorer''', go to the '''Local Disk (C:)'''.
 +
*Create a new folder <code>dolibarr</code> then double click on it and create again a folder <code>documents</code>. So we get the directory <code>C:\dolibarr\documents</code>
 +
 
 +
===Extract Dolibarr archive===
 +
To extract Dolibarr archive, we will proceed in a similar way as '''Apache2''' using drag and drop technique.
 +
 
 +
*With Windows File Explorer, go in '''Local disk (C:)''' then in directory '''Apache24'''. Finally, go to the '''htdocs''' directory (<code>C:\Apache24\htdocs</code>).
 +
*Create the folder <code>dolibarr</code> then double click on it.
 +
*Double-click then on the Dolibarr archive you just downloaded to open it in a new window of the Windows '''File explorer'''.
 +
*Browse in the archive to folder <code>dolibarr-xx-x-x</code> then to folder <code>htdocs</code>.
 +
*Select all the files in the folder <code>htdocs</code> by using the '''Select all''' button of the '''Select''' group of the '''Home''' tab of the '''Windows File Explorer''' (or by using the keyboard shortcut Ctrl + A).
 +
*Drag the selected files to the folder <code>dolibarr</code> created previously (in the other window).
 +
 
 +
[[File:Extraire l'archive Dolibarr dans Apache2.png|none|thumb|773x773px|Extract htdocs directory of Dolibarr archive in the <code>dolibarr</code> directory of Apache2 Web Server.]]
 +
 
 +
Because of the large number of files provided with Dolibarr and depending on the speed of your hard drive or SSD, decompression can take several minutes.
 +
 
 +
[[File:Décompression archive Dolibarr.png|none|frame|Decompression of Dolibarr archive to directory <code>dolibarr</code> of Apache2 Web Server.|link=Special:FilePath/Décompression_archive_Dolibarr.png]]
 +
<br />
 +
 
 +
===Install Dolibarr===
 +
 
 +
*Start your favorite Web browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and enter the address <code>http://localhost/dolibarr</code> in the address bar then validate by '''Enter''' to start Dolibarr installation.
 +
<gallery widths="500" heights="375">
 +
File:Installation Dolibarr - Choix de la langue.png|This page allows you to change language (default language selected by default is automatically deduced from your browser language). Click on '''Next step ->'''.
 +
File:Installation Dolibarr - Vérification des prérequis.png|This page checks prerequisites to install Dolibarr (including different PHP extensions needed). If you followed correctly information of this page, all checks should be validated. Click on '''Start''' button to continue installation.
 +
File:Installation Dolibarr - Serveur Web.png|This page of installation allows you to define paths. Default values are correct except for '''Directory to contain generated documents (PDF, etc.)'''. Modify this value to indicate the directory we created previously (for reminder <code>C:/dolibarr/documents</code>).
 +
File:Installation Dolibarr - Base de données.png|On this same page, we will now fill information allowing installer to create Dolibarr database. Refer to section "Configure database" under the gallery for more information.
 +
File:Installation Dolibarr - Création du fichier de configuration.png|Installer create configuration file containing all information you filled so far and save it on disk in <code>C:\Apache24\htdocs\dolibarr\conf\conf.php</code>. It also creates the user '''dolibarr''' in MariaDB and the database '''dolibarr'''. Click on '''Next step ->'''.
 +
File:Installation Dolibarr - Création des tables.png|The installer now create all tables in the '''dolibarr''' database (this step can take several seconds, it's normal; be patient).
 +
File:Installation Dolibarr - Validation de la création des tables.png|This page confirms the good installation of tables, functions and reference data in the '''dolibarr''' database. You can also choose to indicate that you just successfully installed Dolibarr to Dolibarr Association (thank you!). Click on '''Next step ->'''.
 +
File:Installation Dolibarr - Création de l'administrateur.png|This last step allows you to create the Dolibarr user that will be used to identify you to access Dolibarr. Choose, again, a password different from previous ones (you should never reuse a password anyway) as well as your login. Click on '''Next step ->'''.
 +
File:Installation Dolibarr - Fin de l'installation.png|It's finished ! Congratulations, you can click on '''Access Dolibarr (configuration space)''' to finish installation. Installer also recommends you to create a file <code>install.lock</code> (we will see how to proceed below).
 +
</gallery>
 +
 
 +
===Configure the database===
 +
To make the explanations simpler, I have numbered the different fields you need to modify.
 +
<gallery widths="436" heights="259">
 +
File:Créer base de données.png
 +
File:Super-utilisateur base de données.png
 +
</gallery>
 +
0 - Check the box '''Create the database'''.
 +
 
 +
1 - Fill '''<code>dolibarr</code>''' as identifier (this user will be created in MariaDB by Dolibarr installer and will have '''<u>only</u>''' the authorization to access the newly created '''<code>dolibarr</code>''' database).
 +
 
 +
2 - Fill in a different password (that you have never used, and will be specific to the MariaDB user '''<code>dolibarr</code>''')
 +
 
 +
3 - Check '''Create owner or assign him rights to the database''' (this asks Dolibarr installer to create new MariaDB user named '''<code>dolibarr</code>''' that we filled if above with specified password).
 +
 
 +
4 - Enter '''<code>root</code>''' (this is the MariaDB user id of the database administrator with all rights).
 +
 
 +
5 - Enter the MariaDB password of the database administrator that you chose when you installed MariaDB (screen 4 of the installation).
 +
 
 +
<br />
 +
 
 +
====Terminate Dolibarr configuration====
 +
<gallery widths="500" heights="340">
 +
File:S'identifier.png|The Dolibarr login page.
 +
File:Configuration Dolibarr post-installation.png|The Dolibarr '''Configuration''' page.
 +
</gallery>
 +
Now that Dolibarr is successfully installed, we must finish initial setup (it is about filling your company information and activating one or more modules to use).
 +
 
 +
*Fill your username and password and click '''Login'''.
 +
 
 +
You are automatically redirected to page '''Configuration''' of Dolibarr because initial setup is not finished.
 +
 
 +
*In left menu, under '''Configuration''', click on '''Company/Organization''' and fill information about your company then click on '''Save''' at the bottom of page.
 +
*Always in the left menu, then click on '''Modules/Applications''' and activate the desired modules by clicking on the icon representing a switch at the end of the line.
 +
<gallery widths="550" heights="340">
 +
File:Informations société.png|The '''Company/Organisation''' page allows you to fill in the information of your company or organisation.
 +
File:Activation module.png|The '''Modules/Applications''' page allows you to activate and deactivate the modules you want to use according to your needs.
 +
</gallery>
 +
We have now finished initial configuration of Dolibarr. Bravo !
 +
 
 +
*Click on '''My dashboard''' to display Dolibarr startup page.
 +
 
 +
[[File:Avertissement tableau de bord.png|none|thumb|708x708px|The page '''My dashboard''' of Dolibarr. It currently presents warnings because we didn't create a file <code>install.lock</code> and that Dolibarr configuration file (<code>conf.php</code>) is writable by Web Server.|link=Special:FilePath/Avertissement_tableau_de_bord.png]]

Revision as of 16:43, 22 May 2020

This page describes the installation of various components needed to run Dolibarr on a Windows environment.

The installation has been done on Windows 10 but should be functional for earlier versions of Windows - some screenshots just won't fit.

If you are a beginner, please note that the section Installation - Update With DoliWamp (Windows .exe package) also discusses automated installation with DoliWamp.


The interest to install even the different "Server" components needed for Dolibarr to work properly is the possibility to choose newer versions than those proposed by the DoliWamp installer.

It is also an excellent way to understand how it works and to deepen your knowledge about deployment and maintenance of a Dolibarr instance.


This documentation page has been written with the goal to be understandable to the largest number of people (whatever the computer level). Some precisions could appear as trivial for some people but will certainly be useful for others. If you are a (great) beginner, don't try to go fast and take the time to read the different sections of the page carefully (allow a big half-day for implementation).


In the following page, it has been tried as much as possible to explain the different actions you are going to perform (the aim being to understand and not to copy/paste or mechanically apply instructions). In order to easily distinguish the explanations from the actions to be performed, please note that all the actions to be performed are preceded by a bullet (•).


Dolibarr Architecture

Dolibarr is a Web software of type "Client/Server.

So it requires a 'Web Server with scripting language PHP and a Relational Database Management System to work.

Dolibarr Client/Server Architecture


Functioning

On the "Client" side, you use a Internet browser (Firefox, Chrome, Opera, Internet Explorer, etc.) to access the Dolibarr interface by typing the address of the Web Server.

As soon as you type address to which Web Server answers (for example http://localhost/dolibarr), it will try to display main page of sub directory Dolibarr (according to Web Server configuration, main page of a directory - also called index page - can be for example index.html, index.htm or index.php).

Generally, by default, the Web Server will be configured to recognize only index.html files as index files but we will see together how to add index.php files.

The files .php being script files written in the PHP language, they will not be directly understandable by the browser of the "Client" which is only able to display HTML.

So we will have to tell the Web Server that when it encounters a file with the extension .php, it will have to use its module mod_php to interpret (or convert if you prefer) the PHP code into HTML code before sending it back to the "Client" (i.e. the browser).

Finally, we also need to install a Relational Database Management System, here MariaDB to store Dolibarr data (it's Dolibarr PHP scripts that will interact with the RDBMS to write or read data from it).

Installing and configuring MariaDB

First we will install the MariaDB database server.

Download MariaDB

  • Go to the MariaDB download site and click on the green button Download xx.x.x.xx Stable now! (normally the second green button on the page).
  • In the right column, to filter the available files :
  • Click on the link to download the only file now displayed in the list.

Install MariaDB

At this level, MariaDB is now installed and started. As a Windows "Service" has been created, the RDBMS will be automatically started at each (re)startup of the computer.

Installing and Configuring PHP


Download PHP

  • Please visit https://windows.php.net/download
  • In the list of proposed downloads, take the latest Thread Safe version of PHP corresponding to your architecture (x64 if your system is 64 bits or x86 if your system is 32 bits).
    • This is normally the second proposed download (Warning ! Be careful to download the Thread Safe version and NOT No Thread Safe').
  • Once you have found the right version, download the file by clicking on the link Zip.


Extract the archive to install PHP

  • Once downloaded, right click on the archive and select Extract all....
  • Indicate C:\php as the destination path and click Extract.


Extraire PHP.png


Configure PHP

Now that PHP is uncompressed in the right place, we'll configure some settings.

PHP is delivered with extensions and Dolibarr needs that some of these extensions are enabled (they are not enabled by default).

Enable Display of Filename Extensions

  • In the Windows File Explorer, click on the View tab and check the File Name Extensions checkbox in the Show/Hide group.
Enable Display of File Name Extensions.

Create PHP configuration file from template

To customize your PHP installation, you will have to modify the php configuration file (the file php.ini).

  • Go to the folder where you unpacked PHP (C:\php) using the File Explorer Windows > Local Disk (C: ) > php (if you had checked the Show extracted folders when done box when extracting the archive, the Windows File Explorer should already be open in the right place).

In this folder containing the PHP files, you will find two configuration files "template" php.ini-development and php.ini-production.

  • Make a copy (right click, Copy) of the file php.ini-production and paste it in the same directory (right click, Paste).
  • Rename the copied file (php - Copy.ini-production) to php.ini (right click, Rename on the file).

When validating the new filename, Windows will warn you following the modification of the file extension (you must answer Yes to this question to validate the renaming of the file).

Windows warning when changing file extension.


Activate PHP extensions needed for Dolibarr

Double-click on the file php.ini to open it in Notepad Windows and thus be able to modify it.

Scroll through the file to find the section starting with Dynamic Extensions framed by ; (about halfway through the file) :

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

In this section, you will need to remove the ; in front of some of the extensions to load them (change for example ;extension=gd2 to extension=gd2).

Remove the ; in front of the lines ;extension=curl, ;extension=gd2, ;extension=intl, ;extension=mysqli.

Modify some other PHP parameters

Tip : To easily find a parameter in the file php.ini, you can use the Search function of the Notepad Windows (menu Edit > Search or Ctrl + F). Enter your search then click on Next. Depending on your position in the file, feel free to reverse the direction of the search by selecting the option Top instead of Bottom in the frame Direction then click again on next to search in the opposite direction of the file.

The Search dialog box allows you to search a text in the file.


Set the time zone

Below the section :

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Under the sub-section [Date], replace the line ;date.timezone = with date.timezone = Europe/Paris (don't forget to remove the ; at the beginning of the line).

Increase the size of files that can be uploaded

By default, files that can be uploaded on server through button Browse... of Dolibarr forms (PDF bank statements, supplier invoices, etc.) are limited to a size of 2M.

If you want, you can increase this limit by modifying these lines :

  • replace line upload_max_filesize = 2M by upload_max_filesize = 16M for example ;
  • if you choose a value greater than 8M for upload_max_filesize, you will also need to replace post_max_size = 8M by post_max_size = 16M.


Save the file (File > Save or Ctrl + S) and close it.

We have now configured PHP.

Installing and configuring Apache2

Download Apache2


Extract the archive to install Apache2

Unlike installing PHP, we will proceed slightly differently for decompressing the Apache2 archive.

Instead of extracting the entire archive, we will only extract the folder Apache24.

  • To do this, start by double-clicking on the archive httpd-x.x.xx-winxx-VSxx.zip to open it in the Windows File Explorer.
  • Open the Windows File Explorer again and go to the Local Disk (C:).
  • Drag the folder Apache24 from the archive to the Local Disk (C:).
Decompress Apache2 by dragging the Apache24 folder to the Local Disk (C:)

This is followed by a copy of files (longer this time than for PHP) corresponding to the decompression of the archive in the Local Disk (C:).

Copy files from the Apache2 archive to the Local Disk (C:)

Configure Apache2

Now that Apache2 is uncompressed, we will need to change some parameters in its configuration file.

  • With the Windows File Explorer, go to the Local Disk (C:) and then to the Apache24 directory. Finally, go to the conf directory.
  • Double-click on the file httpd.conf to open the file with the Notepad Windows and thus modify the configuration file of Apache2.

Type the hostname of the Web Server

  • Search for the line #ServerName www.example.com:80 and replace it with ServerName localhost:80.

Treat the files index.php as index files

  • Look for the block
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

and replace it by

<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

So when we access a directory, Apache2 will first look for a index.php file before looking for a index.html file.

Interpreting *.php files

You remember, at the beginning, in the introductory section about Dolibarr architecture, I told you that browsers (Firefox, Chrome, Internet Explorer, etc.) that we use can understand and display only Web pages written in HTML language. So we must tell Apache2 to interpret (convert) files *.php into HTML code understandable by browsers.

  • At the very end of the file httpd.conf, skip a line and paste the following block of code to tell Apache2 to interpret the files *.php :
LoadModule php7_module "c:/php/php7apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
  • This will tell Apache2 to use the php7_module provided with PHP that we installed earlier to interpret the *.php files.
  • Save the file httpd.conf (File > Save or Ctrl + S) and close it.

Copy the files needed for the PHP extensions intl and curl into the bin/ directory of Apache2

PHP's intl extension is responsible for the internationalization (translation management) functions of the software that uses it. The PHP extension curl allows to make requests (contact) to external servers.

Dolibarr requires extensions intl and curl and these extensions need some libraries (function files) to work.

These libraries are provided with PHP, but since we use php7_module with Apache2, we need to copy these files from PHP directory to bin/ directory of Apache2 so that extensions intl and curl can work properly.

  • With the File Explorer Windows, go to the Local Disk (C:) then to the php directory (C:\php).
  • Select the files icudt65.dll, icuin65.dll, icuio65.dll, icuuc65.dll, libcrypto-1_1-x64.dll, libssl-1_1-x64.dll and libssh2.dll by clicking on the first file, then while holding the Ctrl key on your keyboard, select the other files by clicking on them.
  • Copy the files (right click, then Copy or Ctrl + C).
  • With the File Explorer Windows, go to the Local Disk (C:) then in the directory Apache24 and then in the sub directory bin (C:\Apache24\bin).
  • Paste the files (right click, then Copy or Ctrl + V).


Create and start the Windows "Service" to automatically launch Apache2

In the first part of this documentation, when we installed the RDBMS MariaDB, remember, there was a page in the installation wizard that proposed to create a Windows "Service" and customize its name.

"Services" are very handy and allow you to automatically start a software when you (re)start your computer. Contrary to the startup folder, "Services" are executed even before opening a Windows user "Session".

We will therefore create a Windows "Service" to automatically start Apache2 when the computer is (re)started.

  • Next to the Windows button that opens the start menu, in the search box "Type here to search", click then type cmd. In the list of proposed options, choose Run as administrator then validate the User Account Control window.
Execute Command Prompt Windows as administrator
  • Enter the following command in the Windows Command Prompt and validate with the Enter key :
C:/Apache24/bin/httpd.exe -k install
Creating the Windows "Service" with the Windows Command Prompt running as administrator.

The "Service" we just created hasn't started yet, so we need to start it for the first time (it will then be started automatically each time the computer is (re)started).

  • Enter the following command in the Windows Command Prompt and validate with the Enter key :
net start Apache2.4
Starting the Windows "Service" Apache2.4 with the Windows Command Prompt running as an Administrator

If the service doesn't start correctly, it's because your configuration file httpd.conf is invalid.

To determine the cause of your error if any, you can enter the following command in the Windows Command Prompt :

C:\Apache24\bin\httpd.exe -n "Apache2.4" -t

This command tests the validity of your httpd.conf file and should return the line where the error is encountered.

In addition to common syntax errors due to carelessness, one of the most common errors is the absence of the file C:\php\php7apache2_4.dll. This file is indeed missing if you have downloaded the wrong version of PHP (No Thread Safe) instead of the Thread Safe version. In this case, download the good archive (Thread Safe) and perform the Manual_Installation_On_Windows#Extract_the_archive_for_PHP_installation part again.

Another problem that can be encountered is the impossibility to start Apache2 because the port 80 is already used by another program. See the appendix What are "Listening Ports" and how to know if a program already occupies a specific port? for instructions on how to proceed.

Once you have corrected any errors, try again to start the Apache2.4 Service with the command mentioned above.

You can now close the Windows Command Prompt.

Apache2.4 is now installed as a Windows "Service" and started. The Apache2 "Web Server" will therefore be started automatically each time the computer is (re)started.

Check that everything's working

Before continuing (the installation of Dolibarr), let's take a moment to verify that our current installation works properly.

Check if the RDBMS MariaDB works properly

  • Beside the Windows button to open the start menu, in the search box "Type here to search", click and then type mysql client. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (MySQL Client (MariaDB 10.4 (x64)).
Run the software MySQL Client (MariaDB 10.4 (x64))

.

The MySQL Client (MariaDB 10.4 (x64) software is launched.

This is a command prompt specific to your RDBMS MariaDB allowing you to execute database commands (in SQL language).

  • Enter the password of the database administrator that you chose during the installation of MariaDB previously (in the fourth screen of the installer) then press Enter to validate the password.
  • Enter the SQL statement SHOW DATABASES; to list the current databases then press Enter to validate the command.

MariaDB should answer you with the list of databases automatically created during installation: information_schema, mysql, performance_schema and test.

List of databases managed by the RDBMS MariaDB installed on our computer.

This concludes our test of MariaDB's functionality.

We were indeed able to successfully connect to the RDBMS with the administrator password we had previously chosen and the execution of an SQL statement ( SHOW DATABASES; ) worked correctly.

You can now close the software MySQL Client (MariaDB 10.4 (x64).

Check if Apache2 works properly

  • Start your favorite Web Browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and enter the address http://localhost in the address bar then validate with Enter.

If you have correctly installed Apache2, the "Web Server" should answer you a nice It works!.

The Web Server default page 'Apache2.

This concludes our Apache2 test.

We were indeed able to get a response from the Web Server Apache2 (in this case It works!) which proves that it was correctly installed and started.

You can now close your Web Browser.

Check if PHP works properly

Concerning the PHP part, we have two things to check.

  1. The files index.php are correctly recognized when accessing a directory.
  2. The files *.php are correctly interpreted by PHP and return HTML.
  • With the Windows File Explorer, go to the Local Disk (C:) then in the directory Apache24. Finally, go to the htdocs directory (C:\Apache24\htdocs).

You will find in this folder a file index.html. This is the famous file which contains <html><body><h1>It works!</h1></body></html> is the HTML answer which was sent back to us Apache2 when we accessed the server by typing the address http://localhost.

  • In the folder htdocs (C:\Apache24\htdocs), create a new folder test (right click, New > Folder).
  • Double-click on the new folder test to enter it.
  • Create a new file index.php (right click, New > Text Document).
  • Open the document with the Windows Notepad (right click, Open with > Notepad; if Notepad is not proposed, click on Choose another software, then on More software and select Notepad in the list before validating with OK).
  • Enter the following PHP code in the file :
    <?php
    phpinfo();
    
  • Save the file index.php (File > Save or Ctrl + S) and close it.

When PHP processes a file, it looks for the opening and closing tags (?php and ?) that delimit the code it must interpret. ?php thus allows to indicate that we are going to write PHP code.

The function phpinfo displays a lot of information about the configuration of PHP, which will allow us to check that PHP works and that we have activated the right extensions.

  • Start your favorite Web Browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and this time enter the address http://localhost/test in the address bar then validate with Enter.

Apache2 should return a page generated by PHP containing all the configuration information. If you scroll this page, you should see sections related to the extensions we loaded previously (including curl, gd2, intl and mysqli). If one of these sections is not displayed, it means that the extension is not loaded (so you forgot to remove a semicolon in front of an extension name when editing the C:\php\php.ini or you forgot to copy one of the files mentioned in Copy the files needed for the PHP extensions intl and curl to the bin/ directory of Apache2. Check and correct if necessary your omissions and then restart the Service Apache2.4 so that your changes are taken into account (see appendix How to manage Windows "Services" ? to know how to restart an existing Service).

[[File:Phpinfo().png|border|none|thumb|750x750px|Apache2 returns the page with the configuration information generated by PHP.] <This concludes our test of PHP.

We were indeed able to verify that PHP works correctly because it returns the information related to its current configuration.

Moreover, the files PHP index.php are well interpreted as index files because our file was well executed by typing http://localhost/test (we did not need to type http://localhost/test/index.php ).

  • With the Windows File Explorer, go to the Local Disk (C:) then to the Apache24 directory. Finally, go to the htdocs directory (C:\Apache24\htdocs).
  • Delete the folder test that we previously created.

You can now close the Windows File Explorer and your Web Browser.

Dolibarr installation

It's party time (get out the balloons and cotillions), the moment you've been waiting for so long has finally arrived! We will finally be able to install Dolibarr.

Download Dolibarr

Create folder documents of Dolibarr

Dolibarr needs a folder documents in which it stores generated documents (Sales proposals, Orders, Invoices, Intervention sheets, Delivery notes) but also documents uploaded by user (Account statements, Supplier invoices, etc.).

For security reasons, it is preferable to create the folder documents outside the Web Server (for us Apache2).

  • With the WindowsFile Explorer, go to the Local Disk (C:).
  • Create a new folder dolibarr then double click on it and create again a folder documents. So we get the directory C:\dolibarr\documents

Extract Dolibarr archive

To extract Dolibarr archive, we will proceed in a similar way as Apache2 using drag and drop technique.

  • With Windows File Explorer, go in Local disk (C:) then in directory Apache24. Finally, go to the htdocs directory (C:\Apache24\htdocs).
  • Create the folder dolibarr then double click on it.
  • Double-click then on the Dolibarr archive you just downloaded to open it in a new window of the Windows File explorer.
  • Browse in the archive to folder dolibarr-xx-x-x then to folder htdocs.
  • Select all the files in the folder htdocs by using the Select all button of the Select group of the Home tab of the Windows File Explorer (or by using the keyboard shortcut Ctrl + A).
  • Drag the selected files to the folder dolibarr created previously (in the other window).
Extract htdocs directory of Dolibarr archive in the dolibarr directory of Apache2 Web Server.

Because of the large number of files provided with Dolibarr and depending on the speed of your hard drive or SSD, decompression can take several minutes.

Decompression of Dolibarr archive to directory dolibarr of Apache2 Web Server.


Install Dolibarr

  • Start your favorite Web browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and enter the address http://localhost/dolibarr in the address bar then validate by Enter to start Dolibarr installation.

Configure the database

To make the explanations simpler, I have numbered the different fields you need to modify.

0 - Check the box Create the database.

1 - Fill dolibarr as identifier (this user will be created in MariaDB by Dolibarr installer and will have only the authorization to access the newly created dolibarr database).

2 - Fill in a different password (that you have never used, and will be specific to the MariaDB user dolibarr)

3 - Check Create owner or assign him rights to the database (this asks Dolibarr installer to create new MariaDB user named dolibarr that we filled if above with specified password).

4 - Enter root (this is the MariaDB user id of the database administrator with all rights).

5 - Enter the MariaDB password of the database administrator that you chose when you installed MariaDB (screen 4 of the installation).


Terminate Dolibarr configuration

Now that Dolibarr is successfully installed, we must finish initial setup (it is about filling your company information and activating one or more modules to use).

  • Fill your username and password and click Login.

You are automatically redirected to page Configuration of Dolibarr because initial setup is not finished.

  • In left menu, under Configuration, click on Company/Organization and fill information about your company then click on Save at the bottom of page.
  • Always in the left menu, then click on Modules/Applications and activate the desired modules by clicking on the icon representing a switch at the end of the line.

We have now finished initial configuration of Dolibarr. Bravo !

  • Click on My dashboard to display Dolibarr startup page.
The page My dashboard of Dolibarr. It currently presents warnings because we didn't create a file install.lock and that Dolibarr configuration file (conf.php) is writable by Web Server.