How To Install webERP on Debian 12
In this tutorial, we will show you how to install webERP on Debian 12. webERP is a powerful, open-source, web-based Enterprise Resource Planning (ERP) system designed to streamline and manage various aspects of your business, including accounting, inventory management, customer relations, and more. This comprehensive ERP solution offers a wide range of features and customization options, making it suitable for businesses of all sizes and industries. One of the key advantages of webERP is that it is entirely free to use, allowing you to save on costly software licenses while still benefiting from a robust and flexible ERP system.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you the step-by-step installation of the webERP on a Debian 12 (Bookworm).
Prerequisites
Before proceeding with the installation of webERP on Debian 12, ensure you meet the following requirements:
- A server running one of the following operating systems: Debian 12 (Bookworm).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for the webERP.
- A user account with sudo privileges to execute administrative commands.
Install webERP on Debian 12 Bookworm
Step 1. Before installing webERP on your Debian 12 system, it’s crucial to ensure that your system is up to date. This will help prevent potential compatibility issues and ensure a smooth installation process. To update your package list and upgrade your packages, open a terminal and run the following commands:
sudo apt update sudo apt upgrade
Step 2. Installing LAMP.
To run webERP, you’ll also need to set up a LAMP stack on your Debian 12 server, which includes Apache web server, MySQL/MariaDB database management system, and PHP programming language. If you haven’t already installed these components, you can do so by running the following commands in your terminal:
sudo apt install apache2 mariadb-server php php-mysql libapache2-mod-php
In addition to the basic LAMP stack, webERP requires a few extra PHP modules to function properly. You can install these modules by running:
sudo apt install php-gd php-mbstring php-xml php-curl php-zip
Step 3. Installing webERP on Debian 12.
To get started with the installation, visit the official webERP website and download the latest version of the software. At the time of writing, the most recent stable release is version 4.15.2. Once the download is complete, verify the integrity of the downloaded file to ensure it hasn’t been corrupted during the transfer.
Next, extract the downloaded archive using the following command:
tar xvzf webERP-4.15.2.tar.gz
Now, move the extracted webERP directory to your web server’s document root, which is typically located at /var/www/html/
on Debian systems. You can do this with the following command:
sudo mv webERP /var/www/html/
Step 4. Creating the Database.
webERP relies on a MySQL/MariaDB database to store all its data, including company information, financial records, inventory levels, and more. To create a new database for webERP, log into your MySQL/MariaDB server as the root user:
sudo mysql -u root -p
Once logged in, create a new database for webERP with the following command:
CREATE DATABASE weberp;
Next, create a dedicated database user for webERP and grant them the necessary permissions to access and modify the database. Replace ‘your-strong-password
‘ with a strong, unique password:
CREATE USER 'weberp'@'localhost' IDENTIFIED BY 'your-strong-password'; GRANT ALL PRIVILEGES ON weberp.* TO 'weberp'@'localhost'; FLUSH PRIVILEGES;
Finally, import the webERP database schema using the provided SQL file. First, exit the MySQL/MariaDB shell with exit, then run:
sudo mysql -u weberp -p weberp < /var/www/html/webERP/sql/mysql/weberp-demo.sql
Step 5. Configuring webERP.
With the database set up, it’s time to configure webERP to work with your Debian 12 server. The main configuration file for webERP is located at /var/www/html/webERP/config.php
. Open this file in your favorite text editor, for example:
sudo nano /var/www/html/webERP/config.php
In the config.php file, you’ll need to update several settings to match your server environment and preferences. Some of the key settings to modify include:
- Database connection details (hostname, database name, username, password)
- Company information (name, address, logo)
- Authentication settings (enable/disable login options, password requirements)
- Default language and date format
Make sure to review all the available options in the config.php file and adjust them as needed for your specific setup.
Next, you’ll need to configure your Apache web server to properly handle webERP requests. One way to do this is by setting up a virtual host for webERP. Create a new Apache configuration file for webERP:
sudo nano /etc/apache2/sites-available/weberp.conf
Add the following configuration to the file, replacing your_domain with your actual domain name:
<VirtualHost *:80> ServerName your_domain DocumentRoot /var/www/html/webERP <Directory /var/www/html/webERP> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/weberp_error.log CustomLog ${APACHE_LOG_DIR}/weberp_access.log combined </VirtualHost>
Save the file and exit the editor. Then, enable the webERP virtual host and restart Apache:
sudo a2ensite weberp.conf sudo systemctl restart apache2
As a final security measure, it’s a good idea to move sensitive webERP files, such as the config.php file, out of the web server’s document root. You can do this by creating a new directory outside of the web root and moving the files there:
sudo mkdir /etc/weberp sudo mv /var/www/html/webERP/config.php /etc/weberp/ sudo ln -s /etc/weberp/config.php /var/www/html/webERP/config.php
Additionally, ensure that your webERP files and directories have the proper permissions set. The web server should have read access to all files, and write access only where necessary (e.g., the companies and sessions directories). You can set the appropriate permissions with:
sudo chown -R www-data:www-data /var/www/html/webERP sudo find /var/www/html/webERP -type d -exec chmod 755 {} \; sudo find /var/www/html/webERP -type f -exec chmod 644 {} \; sudo chmod 700 /var/www/html/webERP/companies sudo chmod 700 /var/www/html/webERP/sessions
Step 6. Accessing webERP Web UI.
To access the webERP setup wizard, open a web browser and navigate to your server’s domain name or IP address, followed by /webERP (e.g., http://your_domain/webERP). You should see the webERP login page. Click on the “Install/Update” link to start the setup wizard.
Congratulations! You have successfully installed webERP. Thanks for using this tutorial to install the latest version of the webERP on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official webERP website.