91
edits
No edit summary |
(Improved formatting) |
||
| Line 141: | Line 141: | ||
</source> Replace X.Y with the version you want to get. Remove "--depth 1" if you don't mind downloading the entire history of the project (programmers may find it useful but end users probably won't). | </source> Replace X.Y with the version you want to get. Remove "--depth 1" if you don't mind downloading the entire history of the project (programmers may find it useful but end users probably won't). | ||
*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 permissions 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 permissions 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 | ||
$ chown -R www-data.www-data /var/www/dolibarr | $ chown -R www-data.www-data /var/www/dolibarr | ||
| Line 157: | Line 153: | ||
</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(/.*)?' | ||
$ restorecon -R -v '/var/www/html/dolibarr' | $ restorecon -R -v '/var/www/html/dolibarr' | ||
</source> | </source> | ||
*As a root user, create, into directory dolibarr/htdocs/conf, an empty configuration file called conf.php and set the web server user as owner (for instance 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 the web server user as owner (for instance 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 | ||
</source> | </source> 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]) | |||
<source lang="bash"> | *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 recommended to use a directory outside of your directory of web pages, for example - "/var/lib/dolibarr/documents"<source lang="bash"> | ||
$ mkdir -p /var/lib/dolibarr/documents ; chown www-data /var/lib/dolibarr/documents | $ mkdir -p /var/lib/dolibarr/documents ; chown www-data /var/lib/dolibarr/documents | ||
</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/ | ||
</source> | </source> or if you didn't create the htdocs directory | ||
or if you didn't create the htdocs directory | |||
<source lang="ini"> | <source lang="ini"> | ||
http://127.0.0.1/dolibarr/ | http://127.0.0.1/dolibarr/ | ||
| Line 189: | Line 175: | ||
*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). | *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"> | ||
$ touch /var/lib/dolibarr/documents/install.lock; chmod go-w /var/lib/dolibarr/documents; | $ touch /var/lib/dolibarr/documents/install.lock; chmod go-w /var/lib/dolibarr/documents; | ||
edits