WebERP is an accounting and business management system designed to require only a web browser and a PDF reader to use. It is Free Software for small and medium-sized enterprises (SMEs) with features suited to different needs, such as manufacturing companies, distribution chains, and wholesale businesses.
Links
- Official website: https://www.weberp.org/
- WebERP documentation: https://www.weberp.org/wiki/HomePage
Prerequisites
- An Ubuntu 20.04 LTS server.
- A root user or a user with sudo permissions.
- A DNS record to obtain a certificate with Certbot.
Installation
In this article, we explain how to install WebERP with MySQL as the database, NGINX as the web server with PHP and configure a Let's Encrypt certificate obtained with Certbot. Follow the steps below.
First, update the repositories and install the updates:
# apt update && apt upgrade -yThen, go to the temporary directory and download WebERP:
# cd /tmp && wget https://sourceforge.net/projects/web-erp/files/webERP_4.15.1.zipUnzip the downloaded file:
# apt install -y unzip && unzip webERP_4.15.1.zipInstall NGINX, MySQL, PHP for WebERP, and Certbot:
# apt install nginx mysql-server php-cli php-fpm php-mysql php-common php-curl php-dompdf php-gd php-zip php-apcu php-yaml php-xdebug php-mbstring php-xml php-json certbot python3-certbot-nginxNext, create a database for WebERP by running the following command:
# mysqladmin -u root --verbose create weberpThen, create a user (replace password with your desired password):
# mysql -u root --verbose -e "create user 'weberp'@'localhost' identified by 'password';"
Assign the user permissions on the database and perform a flush:
# mysql -u root --verbose -e "grant all on weberp.* to 'weberp'@'localhost' with grant option; flush privileges;"
Synchronize the extracted directory to the webroot:
# rsync -rtv webERP-4.15.1/ /var/www/html/Change the ownership and group recursively:
# chown -R www-data:www-data /var/www/html/Also change the directory permissions:
# chmod -R 755 /var/www/html/Then edit the site file:
# vi /etc/nginx/sites-available/defaultChange the server_name in the file to the subdomain or domain record:
server_name weberp.ejemplo.com;Add index.php to the index line:
index index.php;Replace the try_files line with:
try_files $uri $uri/ /index.php?$args;Also uncomment the lines for PHP support and deny access to .htaccess (not used by NGINX). It should look like this:
# pass PHP scripts to FastCGI server
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
include fastcgi.conf;
# fastcgi_index index.php;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS on;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
Check the modified configuration with:
# nginx -tIf the result is correct, restart the web service to reload the changes:
# systemctl restart nginx.serviceFinally, obtain a certificate using Certbot with redirect:
# certbot --nginx --redirect -d weberp.ejemplo.comWith this last step, you can access the admin directly over HTTPS from a browser to finish the installation using WebERP's built-in Wizard. The following will appear:
Set your desired language, click next, and configure the database with the user you created: Then modify the configuration and click install to finish the installation:
Have you tried it? Leave us your comments! 🙂