Dolibarr Installation
Install dolibarr dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install -y php7.0 php7.0-cli php7.0-fpm php7.0-common php7.0-mysql php7.0-pgsql php7.0-sqlite3 php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-soap php7.0-curl php7.0-zip php7.0-xml nginx unzip
wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
sudo apt-get update && sudo apt-cache policy mysql-server && sudo apt install -f mysql-client=5.7.41-1ubuntu18.04 mysql-community-server=5.7.41-1ubuntu18.04 mysql-server=5.7.41-1ubuntu18.04
Install composer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
Edit nginx configuration:
nano /etc/nginx/sites-available/dolibarr.conf
server {
listen [::]:80;
listen 80;
server_name _; # Check this
root /var/www/dolibarr/htdocs; # Check this
index index.php index.html index.htm;
charset utf-8;
location / {
try_files $uri $uri/ /index.php;
}
location ~ [^/]\.php(/|$) {
try_files $uri =404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600;
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
}
Apply nginx configuration:
sudo ln -s /etc/nginx/sites-available/dolibarr.conf /etc/nginx/sites-enabled/
systemctl restart nginx.service
Download dolibarr:
sudo mkdir -p /var/www/dolibarr
cd /var/www/dolibarr
composer create-project dolibarr/dolibarr .
sudo chown -R www-data:www-data /var/www/dolibarr