How to Install WebERP On CentOS 8

webERP is a free, open-source, and complete web-based accounting and business management system. You just need a web browser and PDF reader to use the webERP. With webERP, you can manage many things including, purchase orders, web store, manufacturing, sales, general ledger, and shipping. It is written in PHP and uses MariaDB as a database backend. This tutorial will show you how to install webERP with Apache and Let's Encrypt SSL on CentOS 8.

Prerequisites

  • A server running CentOS 8.
  • A valid domain name pointed with your server IP.
  • A root password is configured on the server.

Install LAMP Server

First, install the Apache, MariaDB, PHP, and other PHP extensions using the following command:

dnf install httpd mariadb-server php php-mysqli php-curl php-json php-cgi php-xmlrpc php-gd php-mbstring unzip -y

Once all the packages are installed, start the Apache and MariaDB service and enable them to start at system reboot using the following command:

systemctl start httpd mariadb
systemctl enable httpd mariadb

Once you are finished, you can proceed to the next step.

Configure MariaDB

Next, you will need to set a MariaDB root password and secure the MariaDB installation. You can do it with the following command:

mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none): 
Set root password? [Y/n] Y
New password: 
Re-enter new password: 
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Next, login to MariaDB shell with the following command:

mysql -u root -p

Once connected, create a database and user for webERP with the following command:

MariaDB [(none)]> create database weberp;
MariaDB [(none)]> create user [email protected] identified by 'password';

Next, grant all the privileges to the webERP database with the following command:

MariaDB [(none)]> grant all privileges on weberp.* to [email protected] identified by 'password';

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

Once you are finished, you can proceed to the next step.

Install webERP

First, download the latest version of webERP with the following command:

wget https://sourceforge.net/projects/web-erp/files/webERP_4.15.zip

Once the download is completed, extract the downloaded file to the Apache web root directory using the following command:

unzip webERP_4.15.zip -d /var/www/html

Next, set proper permission and ownership with the following command:

chown -R apache:apache /var/www/html/webERP
chmod -R 755 /var/www/html/webERP

Once you are finished, you can proceed to the next step.

Configure Apache for webERP

Next, you will need to create a new Apache virtual host configuration file to host the webERP. You can create it using the following command:

nano /etc/httpd/conf.d/weberp.conf

Add the following lines:

<VirtualHost *:80> 
ServerAdmin [email protected]
DocumentRoot /var/www/html/webERP
ServerName weberp.example.com
<Directory /var/www/html/webERP/> 
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory> 
ErrorLog /var/log/httpd/weberp.org-error_log
CustomLog /var/log/httpd/weberp.org-access_log common
</VirtualHost> 

Save and close the file when you are finished. Next, restart the Apache service to apply the changes:

systemctl restart httpd

Now, verify the status of the Apache with the following command:

systemctl status httpd

You should get the following output:

? httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           ??php-fpm.conf
   Active: active (running) since Sat 2021-05-01 05:57:27 EDT; 13s ago
     Docs: man:httpd.service(8)
 Main PID: 4896 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 25014)
   Memory: 24.8M
   CGroup: /system.slice/httpd.service
           ??4896 /usr/sbin/httpd -DFOREGROUND
           ??4898 /usr/sbin/httpd -DFOREGROUND
           ??4899 /usr/sbin/httpd -DFOREGROUND
           ??4900 /usr/sbin/httpd -DFOREGROUND
           ??4901 /usr/sbin/httpd -DFOREGROUND

May 01 05:57:27 centos8 systemd[1]: Stopped The Apache HTTP Server.
May 01 05:57:27 centos8 systemd[1]: Starting The Apache HTTP Server...

At this point, Apache web server is configured to host webERP. You can now proceed to the next step.

Secure webERP with Let's Encrypt SSL

Next, you will need to install the Certbot client to install the Let's Encrypt SSL for webERP. You can install it with the following command:

dnf install letsencrypt python3-certbot-apache

Next, obtain and install an SSL certificate for your domain with the following command:

certbot --apache -d weberp.example.com

You will be asked to provide your email address and accept the term of service:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Account registered.
Requesting a certificate for weberp.example.com
Performing the following challenges:
http-01 challenge for weberp.example.com
Waiting for verification.
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/httpd/conf.d/weberp.conf
Redirecting all traffic on port 80 to ssl in /etc/httpd/conf.d/weberp.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://weberp.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: [email protected]).


IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/weberp.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/weberp.example.com/privkey.pem
   Your certificate will expire on 2021-06-09. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again with the "certonly" option. To non-interactively
   renew *all* of your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

You can now access your website securely using the URL https://weberp.example.com.

Configure Firewall

Next, you will need to allow ports 80 and 443 through the firewall. You can allow them with the following command:

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https

Next, reload the firewall to apply the changes:

firewall-cmd --reload

Access webERP Web Interface

Now, open your web browser and access the webERP web interface using the URL https://weberp.example.com. You should see the following page:

Select your language and click on the NEXT STEP. You should see the following page:

Provide your database name, user, password and click on the NEXT STEP. You should see the following page:

Provide your Company name, Time Zone, Admin username, password and click on the INSTALL button. Once the installation has been finished, you should see the following page:

Provide your admin username, password and click on the Login button. You will be redirected to the webERP dashboard:

Conclusion

Congratulations! you have successfully installed webERP with Apache and Let's Encrypt SSL on CentOS 8. You can now explore webERP for more features and implement them in your production environment.

Share this page:

Suggested articles

0 Comment(s)

Add comment