How to Install WebERP On Ubuntu 16.04
Kick-start your open source projects with access to hundreds of frameworks
WebERP a complete web based accounting and business management tool that can be used for online shop or a retail management system released under an OpenSource license. It is available in many languages and supports all popular operating systems including, Linux, Mac, and Windows. WebERP comes with a wide range of features like Purchase Orders, Sales orders, Manufacturing, Low foot-print, fast, simple code, Sales Analysis, PDF reports, Fully utf-8 compliant, Multi-currency support, Multiple themes and much more.
In this tutorial, I will show you step by step to install WebERP on Ubuntu 16.04 server.
- A fresh Ubuntu 16.04 server installed on your system.
- A non-root user with sudo privileges is setup on your server.
Let’s start by updating your system packages with the latest version with the following command:
sudo apt-get update -y
sudo apt-get upgrade -y
After your system is fully updated, restart the system to apply all these changes.
Install LAMP Server
WebERP runs on Apache, written in PHP and uses MySQL for storing the database. So you will need to install Apache, PHP, and MariaDB to your system.
First, install Apache, PHP and required PHP libraries with the following command:
sudo apt-get install apache2, php7.0 php7.0-cli php7.0-mysql php7.0-gd php7.0-mcrypt php7.0-json php-pear -y
Once the installation is complete, start Apache service and enable it to start on boot with the following command:
sudo systemctl start apache2
sudo systemctl enable apache2
By default, the latest version of the MariaDB is not available in Ubuntu 16.04. So you will need to add MariaDB repository to your system.
You can do this by running the following command:
sudo apt-get install software-properties-common -y
sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository ‘deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu xenial main’
Next, update the repository and install MariaDB server with the following command:
sudo apt-get update -y
sudo apt-get install mariadb-server mariadb-client -y
Once the installation is complete, start MariaDB service and enable it to start on boot with the following command:
sudo systemctl start mysql
sudo systemctl enable mysql
Next, you will need to secure MariaDB installation. You can do this by running the following script:
The above script will set the root password, remove anonymous users, disallow remote root login and remove test database.
Once the MariaDB is secured, login to MySQL console and create a database for WebERP:
mysql -u root -p
Enter your root password and create a database as per your need:
MariaDB [(none)]CREATE DATABASE weberp_db;
Next, create a username and password for WebERP with the following command:
MariaDB [(none)]CREATE USER ‘weberp’@’localhost’ IDENTIFIED BY ‘password’;
Next, grant privileges to the weberp database with the following command:
MariaDB [(none)]GRANT ALL PRIVILEGES ON weberp_db.* TO ‘weberp’@’localhost’;
Next, flush the privileges with the following command:
MariaDB [(none)]flush privileges;
Finally close the MySQL console:
You can download the latest version of the WebERP from their official website with the wget command as shown below:
After downloading WebERP, extract the downloaded source with the unzip command:
Next, copy the extracted directory to the Apache web root directory:
sudo cp -r webERP /var/www/html/weberp
Next, change the ownership of the weberp directory:
sudo chown -R www-data:www-data /var/www/html/weberp
Configure Apache for WebERP
Next, create an apache virtual host file for WebERP:
sudo nano /etc/apache2/sites-available/weberp.conf
Add the following lines:
VirtualHost *:80 ServerAdmin [email protected] DocumentRoot "/var/www/html/weberp/" ServerName yourdomain.com ServerAlias www.yourdomain.com Directory "/var/www/html/weberp/" Options FollowSymLinks AllowOverride All Order allow,deny allow from all /Directory ErrorLog /var/log/apache2/weberp-error_log CustomLog /var/log/apache2/weberp-access_log common /VirtualHost
Save the file when you are finished, then activate the new virtual host with the following command:
sudo a2ensite weberp
Finally, restart Apache service to reload the changes:
sudo systemctl restart apache2
Access WebERP Web Interface
WebERP runs on port 80, so you will need to allow port 80 through the firewall. First, enable the UFW firewall with the following command:
sudo ufw enable
Next, allow port 80 through the UFW firewall with the following command:
sudo ufw allow 80/tcp
You can get the status of the UFW firewall with the following command:
sudo ufw status
Once the UFW firewall is configured, open your web browser and type the URL http://yourdomain.com, you will be redirected to the WebERP welcome page as shown below:
WebERP install wizard
Select your language and click on the NEXT STEP button, you should see the WebERP database configuration page in below image:
Provide all the information like, host, database name, database username, and password, then click on the NEXT button. You should see the WebERP installation wizard in the below image:
Now, provide required details like Company name, Time zone, Admin account username, password, E-mail address, then click on the INSTALL button. You should see the WebERP login screen in below image:
Now, provide your Admin username and password, then click on the Login button. You should see the WebERP dashboard in the following image:
Now start using WebERP.