9
edits
Tag: 2017 source edit |
m (Minor grammatical changes, corrected misspelling of 'package') |
||
| Line 13: | Line 13: | ||
= Install Dolibarr = | =Install Dolibarr= | ||
This chapter describe different available methods to install Dolibarr for the first time (from the most simple to the manual one). See next chapter for upgrades. | This chapter describe different available methods to install Dolibarr for the first time (from the most simple to the manual one). See next chapter for upgrades. | ||
== On your dedicated computer/server (installation "On Premise") == | ==On your dedicated computer/server (installation "On Premise")== | ||
=== [[File:Logo_windows.png]] Manualy or with Doliwamp === | ===[[File:Logo_windows.png]] Manualy or with Doliwamp=== | ||
- '''Prerequisite''': Windows | - '''Prerequisite''': Windows | ||
| Line 28: | Line 28: | ||
However, 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: | However, 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. | *Download last Dolibarr version for Windows DoliWamp. | ||
For this, see at {{TemplateURLToDownloadDoliWamp}} | For this, see at {{TemplateURLToDownloadDoliWamp}} | ||
* Run the downloaded .exe and follow instructions. | *Run the downloaded .exe and follow instructions. | ||
=== [[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package) === | ===[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)=== | ||
- '''Prerequisite''': Linux Ubuntu | - '''Prerequisite''': Linux Ubuntu | ||
- '''Level''': Non experienced users | - '''Level''': Non experienced users | ||
This process works only for Ubuntu or Debian Linux users and is recommended for user with | This process works only for Ubuntu or Debian Linux users and is recommended for user with little computer knowledge. If you are experienced with Apache, PHP and Mysql installation, the chapter 'with standard package' is better for you. However, if you are a newbie user and running Ubuntu, you can use DoliDeb. DoliDeb is a specialized Dolibarr distribution for Debian or Ubuntu. This distribution allows you to make an installation under Ubuntu with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. | ||
* Steps to install DoliDeb are described into page [[Dolibarr for Ubuntu or Debian]]. | *Steps to install DoliDeb are described into page [[Dolibarr for Ubuntu or Debian]]. | ||
=== [[File:Logo_rpm.png|42px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package) === | ===[[File:Logo_rpm.png|42px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)=== | ||
- '''Prerequisite''': Linux Fedora, Redhat, Mandriva, Mageia or OpenSuse | - '''Prerequisite''': Linux Fedora, Redhat, Mandriva, Mageia or OpenSuse | ||
| Line 49: | Line 50: | ||
This process works only for Fedora, Redhat, Mandriva, Mageia or OpenSuse Linux users and is recommended for user with no computer knowledges. If you are experimented with Apache, PHP and Mysql installation, next chapter 'with standard package' is better for you. However, if you are a newbie user and running Fedora or Redhat, you can use DoliRpm. DoliRpm is a specialized Dolibarr distribution for Fedora, Redhat or Mandriva. This distribution allows you to make an installation under such OS with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. | This process works only for Fedora, Redhat, Mandriva, Mageia or OpenSuse Linux users and is recommended for user with no computer knowledges. If you are experimented with Apache, PHP and Mysql installation, next chapter 'with standard package' is better for you. However, if you are a newbie user and running Fedora or Redhat, you can use DoliRpm. DoliRpm is a specialized Dolibarr distribution for Fedora, Redhat or Mandriva. This distribution allows you to make an installation under such OS with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. | ||
* Steps to install DoliRpm are described into page [[Dolibarr for Redhat or Fedora (rpm package)]] or [[Dolibarr for Mandriva or Mageia (rpm package)]] or [[Dolibarr for OpenSuse (rpm package)]]. | *Steps to install DoliRpm are described into page [[Dolibarr for Redhat or Fedora (rpm package)]] or [[Dolibarr for Mandriva or Mageia (rpm package)]] or [[Dolibarr for OpenSuse (rpm package)]]. | ||
=== [[File:Gnu.png]] With Dolibarr (standard .zip package or from git) === | ===[[File:Gnu.png]] With Dolibarr (standard .zip package or from git)=== | ||
- '''Prerequisite''': Apache, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known. | - '''Prerequisite''': Apache, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known. | ||
| Line 59: | Line 60: | ||
You can follow this tutorial for any Dolibarr version >= 2.0.0 | You can follow this tutorial for any Dolibarr version >= 2.0.0 | ||
* Check that you have installed Apache, PHP {{PHPMinVersion}} and a database server (MySQL {{MySqlMinVersion}} or PostGreSQL) correctly (check list of installed packaged on your server by using the package manager of your distribution). If not, install them (use last recent version). | *Check that you have installed Apache, PHP {{PHPMinVersion}} and a database server (MySQL {{MySqlMinVersion}} or PostGreSQL) correctly (check list of installed packaged on your server by using the package manager of your distribution). If not, install them (use last recent version). | ||
* Check that main root or admin user/password couple for the server is known and works correctly. If this root or admin user/password is not known because not yet defined, read following chapter. Otherwise go on next step: | *Check that main root or admin user/password couple for the server is known and works correctly. If this root or admin user/password is not known because not yet defined, read following chapter. Otherwise go on next step: | ||
For Linux users, if you have just installed a MySQL server, the admin user is''' root'''. If the root password has never been set yet, you must run the following command to initialize the password: | For Linux users, if you have just installed a MySQL server, the admin user is''' root'''. If the root password has never been set yet, you must run the following command to initialize the password: | ||
| Line 104: | Line 105: | ||
* Go into the directory where to install Dolibarr (the web root directory defined for your web server) | *Go into the directory where to install Dolibarr (the web root directory defined for your web server) | ||
# For Debian and Ubuntu families, it is generally: /var/www (newer versions: /var/www/html) | |||
# For Mandriva, RedHat, Fedora: /var/www/html | #For Debian and Ubuntu families, it is generally: /var/www (newer versions: /var/www/html) | ||
# For Suse: /srv/www/htdocs | #For Mandriva, RedHat, Fedora: /var/www/html | ||
#For Suse: /srv/www/htdocs | |||
<source lang="bash"> | <source lang="bash"> | ||
$ cd /var/www | $ cd /var/www | ||
| Line 114: | Line 117: | ||
</source> | </source> | ||
* Get the application archive of last stable version | *Get the application archive of last stable version | ||
'''from zip file''' | '''from zip file''' | ||
| Line 120: | Line 123: | ||
$ wget http://www.dolibarr.org/files/dolibarr.zip | $ wget http://www.dolibarr.org/files/dolibarr.zip | ||
</source> | </source> | ||
* Uncompress archive | |||
*Uncompress archive | |||
<source lang="bash"> | <source lang="bash"> | ||
$ unzip dolibarr.zip | $ unzip dolibarr.zip | ||
| Line 131: | Line 136: | ||
Replace X.Y with the version you want to get. | Replace X.Y with the version you want to get. | ||
* 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) | *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) | ||
<source lang="bash"> | <source lang="bash"> | ||
$ mv dolibarr-x.y.z dolibarr | $ mv dolibarr-x.y.z dolibarr | ||
</source> | </source> | ||
* Change permission and owner of the 'dolibarr' directory to that of the group under which the web server runs (assumed to be 'www-data' for debian, 'apache' for redhat, mandriva, fedora) | |||
*Change permission and owner of the 'dolibarr' directory to that of the group under which the web server runs (assumed to be 'www-data' for debian, 'apache' for redhat, mandriva, fedora) | |||
<source lang="bash"> | <source lang="bash"> | ||
$ chmod -R 755 /var/www/dolibarr | $ chmod -R 755 /var/www/dolibarr | ||
| Line 143: | Line 151: | ||
$ chown -R apache.apache /var/www/html/dolibarr | $ chown -R apache.apache /var/www/html/dolibarr | ||
</source> | </source> | ||
* For Fedora, since SELinux is usually enabled, it is also advisable to run the following commands to make the 'dolibarr' directory compliant with the SELinux requirement (else you are likely to get quite a few alerts) : | |||
*For Fedora, since SELinux is usually enabled, it is also advisable to run the following commands to make the 'dolibarr' directory compliant with the SELinux requirement (else you are likely to get quite a few alerts) : | |||
<source lang="bash"> | <source lang="bash"> | ||
$ semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/dolibarr(/.*)?' | $ semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/dolibarr(/.*)?' | ||
| Line 149: | Line 159: | ||
</source> | </source> | ||
* 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, apache on Mandriva, RedHat, Fedora or other distributions ...). This is required because the web server will have to write into this file during install process. | *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, apache on Mandriva, RedHat, Fedora or other distributions ...). This is required because the web server will have to write into this file during install process. | ||
<source lang="bash"> | <source lang="bash"> | ||
$ cd dolibarr ; touch htdocs/conf/conf.php ; chown www-data htdocs/conf/conf.php | $ cd dolibarr ; touch htdocs/conf/conf.php ; chown www-data htdocs/conf/conf.php | ||
| Line 155: | Line 166: | ||
Note: For Ubuntu no need of htdocs, you just have to make dolibarr root by placing all files and folders of htdocs in /var/www/dolibarr then from browser do <MyIP>/dolibarr/index.php (see this discussion as reference to this addendum [http://askubuntu.com/questions/874456/php-code-displays-in-browser?noredirect=1#comment1357943_874456]) | Note: For Ubuntu no need of htdocs, you just have to make dolibarr root by placing all files and folders of htdocs in /var/www/dolibarr then from browser do <MyIP>/dolibarr/index.php (see this discussion as reference to this addendum [http://askubuntu.com/questions/874456/php-code-displays-in-browser?noredirect=1#comment1357943_874456]) | ||
* As a root user, create a directory that will be used to save all files 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, apache on Mandriva, RedHat, Fedora...). The web server must have write permission into this directory. It is recommanded to use a directory outside of your directory of web pages, for example - "/var/lib/dolibarr/documents" | *As a root user, create a directory that will be used to save all files 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, apache on Mandriva, RedHat, Fedora...). The web server must have write permission into this directory. It is recommanded to use a directory outside of your directory of web pages, for example - "/var/lib/dolibarr/documents" | ||
<source lang="bash"> | <source lang="bash"> | ||
| Line 161: | Line 172: | ||
</source> | </source> | ||
* Now call your browser to point to the main page | *Now call your browser to point to the main page | ||
<source lang="ini"> | <source lang="ini"> | ||
http://127.0.0.1/dolibarr/htdocs/ | http://127.0.0.1/dolibarr/htdocs/ | ||
| Line 170: | Line 182: | ||
</source> | </source> | ||
* Follow instructions of setup steps until end of install process. | *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 document directory that only root user can delete. This will lock the call of the install process again (you will have to remove this file for upgrades). | |||
If this is not done, Dolibarr will show you a warning once logged by an administrator user. | If this is not done, Dolibarr will show you a warning once logged by an administrator user. | ||
<source lang="bash"> | <source lang="bash"> | ||
| Line 178: | Line 191: | ||
</source> | </source> | ||
== On a mutualized Web Hosting Provider (without terminal/SSH access) == | ==On a mutualized Web Hosting Provider (without terminal/SSH access)== | ||
It is not possible to provide a generic documentation to install Dolibarr on a particular Web hosting provider as this depends on provider. | It is not possible to provide a generic documentation to install Dolibarr on a particular Web hosting provider as this depends on provider. | ||
In most cases, using the following process should works for most providers: | In most cases, using the following process should works for most providers: | ||
| Line 186: | Line 199: | ||
- '''Level''': Users with few Web and Database administration knowledges. Knowledge to use a tool (FTP, SFTP) to upload files on the server. | - '''Level''': Users with few Web and Database administration knowledges. Knowledge to use a tool (FTP, SFTP) to upload files on the server. | ||
* Check that you have an Apache web server, PHP and a database server (MySQL or PostGreSQL) that works correctly. | *Check that you have an Apache web server, PHP and a database server (MySQL or PostGreSQL) that works correctly. | ||
[[File:warning.png]] Warning, check that code page of PHP server and database server are same (utf8 recommended). | [[File:warning.png]] Warning, check that code page of PHP server and database server are same (utf8 recommended). | ||
* Check that main root or admin user/password couple for the server is known and works correctly. Ask them to your Web Hosting Provider if unknown. | *Check that main root or admin user/password couple for the server is known and works correctly. Ask them to your Web Hosting Provider if unknown. | ||
* Get the application archive of last stable version and uncompress it locally. | *Get the application archive of last stable version and uncompress it locally. | ||
* Upload all content of htdocs directory to your web root directory, for example using FTP in binary mode. | *Upload all content of htdocs directory to your web root directory, for example using FTP in binary mode. | ||
* Create a directory called "documents" into Dolibarr directory that will serve to save all documents generated and stocked by Dolibarr (PDF invoices, uploaded images, ...). The web server must have write permission into this directory. You can set permissions with your FTP client. | *Create a directory called "documents" into Dolibarr directory that will serve to save all documents generated and stocked by Dolibarr (PDF invoices, uploaded images, ...). The web server must have write permission into this directory. You can set permissions with your FTP client. | ||
* Now call your browser to point to the main page index.php | *Now call your browser to point to the main page index.php | ||
* Follow instructions of setup steps until end of install process. | *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. 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 as an administrator user. | *For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr installed directory. 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 as an administrator user. | ||
== On a SaaS or Cloud web hosting provider == | ==On a SaaS or Cloud web hosting provider== | ||
Dolibarr is also available on a lot of "ready to use" SaaS or Cloud platforms/services that provides preinstalled versions. | Dolibarr is also available on a lot of "ready to use" SaaS or Cloud platforms/services that provides preinstalled versions. | ||
| Line 213: | Line 226: | ||
See page [[Cloud Solutions]]. | See page [[Cloud Solutions]]. | ||
= Setup = | =Setup= | ||
== First setup == | ==First setup== | ||
See page [[First setup|Setup]]. | See page [[First setup|Setup]]. | ||
== Setup a LDAP connexion == | ==Setup a LDAP connexion== | ||
If you want to use a LDAP: See [[Install and configure OpenLDAP]]. | If you want to use a LDAP: See [[Install and configure OpenLDAP]]. | ||
= Import external data = | =Import external data= | ||
For this operation, read page [[Mass imports]]. | For this operation, read page [[Mass imports]]. | ||
=Upgrade Dolibarr= | |||
= Upgrade Dolibarr = | |||
This chapter describe process to upgrade an existing installation of Dolibarr from an old version to a new one. Process is same whatever is version you are coming fro and version you are going to, but will differ according to the distribution/operating system you used for your first installation. You should use the same for upgrade. | This chapter describe process to upgrade an existing installation of Dolibarr from an old version to a new one. Process is same whatever is version you are coming fro and version you are going to, but will differ according to the distribution/operating system you used for your first installation. You should use the same for upgrade. | ||
== [[File:Logo_windows.png]] With DoliWamp (Windows .exe package) == | ==[[File:Logo_windows.png]] With DoliWamp (Windows .exe package)== | ||
* First make a backup of your current installation | |||
* Download new .exe package of DoliWamp. | *First make a backup of your current installation | ||
* Run downloaded .exe file and follow steps without changing any default values. This will upgrades all your files. | *Download new .exe package of DoliWamp. | ||
* 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. | *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, the page in your browser will loop to start again the upgrade wizard as often as required to run upgrade process, version by version, until your reach the new installed version. | If there is more than one version late, the page in your browser will loop to start again the upgrade wizard as often as required to run upgrade process, version by version, until your reach the new installed version. | ||
== [[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package) == | ==[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)== | ||
* First make a backup of your current installation | |||
* Process to upgrade using Debian/Ubuntu package is same way than install process (see previous chapters), so it is as easy as installing a package. | *First make a backup of your current installation | ||
*Process to upgrade using Debian/Ubuntu package is same way than install process (see previous chapters), so it is as easy as installing a package. | |||
You can also read page [[Dolibarr for Ubuntu or Debian]]. | You can also read page [[Dolibarr for Ubuntu or Debian]]. | ||
== [[File:Logo_rpm.png|40px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package) == | ==[[File:Logo_rpm.png|40px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)== | ||
== [[File:Gnu.png]] With Dolibarr (standard .zip package) == | *First make a backup of your current installation | ||
*Process to upgrade using rpm package is same way than install process, so it is as easy as installing a package (see previous chapters). | |||
==[[File:Gnu.png]] With Dolibarr (standard .zip package)== | |||
This is tutorial to use when using standard distribution for a manual upgrade. | This is tutorial to use when using standard distribution for a manual upgrade. | ||
* First make a backup of your current installation | *First make a backup of your current installation | ||
*Go into the directory where you installed Dolibarr (it might be the root directory of your web, for example /var/www under Debian) | |||
<source lang="bash"> | <source lang="bash"> | ||
$ cd /var/www | $ cd /var/www | ||
</source> | </source> | ||
* Get archive of last version | *Get archive of last version | ||
<source lang="bash"> | <source lang="bash"> | ||
$ wget https://www.dolibarr.org/files/dolibarr.zip | $ wget https://www.dolibarr.org/files/dolibarr.zip | ||
</source> | </source> | ||
* Uncompress the archive | *Uncompress the archive | ||
<source lang="bash"> | <source lang="bash"> | ||
$ unzip dolibarr.zip | $ unzip dolibarr.zip | ||
</source> | </source> | ||
* 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). | *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). | ||
<source lang="bash"> | <source lang="bash"> | ||
$ cp -r dolibarr-x.y.z/* dolibarr | $ cp -r dolibarr-x.y.z/* dolibarr | ||
</source> | </source> | ||
* If no error, you can now remove the directory of source files | *If no error, you can now remove the directory of source files | ||
<source lang="bash"> | <source lang="bash"> | ||
$ rm -fr dolibarr-x.y.z | $ rm -fr dolibarr-x.y.z | ||
</source> | </source> | ||
* Now open your Dolibarr in your browser. It should open automatically the install/ | *Now open your Dolibarr in your browser. It should open automatically the install/ | ||
and choose ''Update'' in suggested menu. | and choose ''Update'' in suggested menu. | ||
| Line 296: | Line 319: | ||
Note: 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. | Note: 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. | ||
* For security reason, once setup is finished, you should create a file install.lock into Dolibarr documents directory. This will lock the call of the install process again (you will have to remove this file for future upgrades). If this is not done, Dolibarr will show you a warning once logged with an administrator user. | *For security reason, once setup is finished, you should create a file install.lock into Dolibarr documents directory. This will lock the call of the install process again (you will have to remove this file for future upgrades). If this is not done, Dolibarr will show you a warning once logged with an administrator user. | ||
<source lang="bash"> | <source lang="bash"> | ||
$ echo > documents/install.lock | $ echo > documents/install.lock | ||
$ chmod 444 documents/install.lock | $ chmod 444 documents/install.lock | ||
</source> | </source> | ||
edits