GNU/Linux >> Linux Esercitazione >  >> Cent OS

Come installare WebERP su CentOS 8

webERP è un sistema di contabilità e gestione aziendale basato sul web gratuito, open source e completo. Hai solo bisogno di un browser web e di un lettore PDF per utilizzare il webERP. Con webERP, puoi gestire molte cose tra cui ordini di acquisto, negozio web, produzione, vendite, contabilità generale e spedizione. È scritto in PHP e utilizza MariaDB come backend del database. Questo tutorial ti mostrerà come installare webERP con Apache e Let's Encrypt SSL su CentOS 8.

Prerequisiti

  • Un server che esegue CentOS 8.
  • Un nome di dominio valido puntato all'IP del tuo server.
  • Sul server è configurata una password di root.

Installa il server LAMP

Innanzitutto, installa le estensioni Apache, MariaDB, PHP e altre estensioni PHP utilizzando il seguente comando:

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

Una volta installati tutti i pacchetti, avvia il servizio Apache e MariaDB e abilita l'avvio al riavvio del sistema utilizzando il seguente comando:

systemctl start httpd mariadb
systemctl enable httpd mariadb

Una volta terminato, puoi procedere al passaggio successivo.

Configura MariaDB

Successivamente, dovrai impostare una password root di MariaDB e proteggere l'installazione di MariaDB. Puoi farlo con il seguente comando:

mysql_secure_installation

Rispondi a tutte le domande come mostrato di seguito:

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!

Quindi, accedi alla shell di MariaDB con il seguente comando:

mysql -u root -p

Una volta connesso, crea un database e un utente per webERP con il seguente comando:

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

Quindi, concedi tutti i privilegi al database webERP con il seguente comando:

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

Quindi, svuota i privilegi ed esci da MariaDB con il seguente comando:

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

Una volta terminato, puoi procedere al passaggio successivo.

Installa webERP

Innanzitutto, scarica l'ultima versione di webERP con il seguente comando:

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

Una volta completato il download, estrai il file scaricato nella directory principale web di Apache utilizzando il seguente comando:

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

Quindi, imposta l'autorizzazione e la proprietà appropriate con il seguente comando:

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

Una volta terminato, puoi procedere al passaggio successivo.

Configura Apache per webERP

Successivamente, dovrai creare un nuovo file di configurazione dell'host virtuale Apache per ospitare il webERP. Puoi crearlo usando il seguente comando:

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

Aggiungi le seguenti righe:

<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> 

Salva e chiudi il file quando hai finito. Quindi, riavvia il servizio Apache per applicare le modifiche:

systemctl restart httpd

Ora verifica lo stato dell'Apache con il seguente comando:

systemctl status httpd

Dovresti ottenere il seguente 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...

A questo punto, il server web Apache è configurato per ospitare webERP. Ora puoi procedere al passaggio successivo.

WebERP sicuro con Let's Encrypt SSL

Successivamente, dovrai installare il client Certbot per installare Let's Encrypt SSL per webERP. Puoi installarlo con il seguente comando:

dnf install letsencrypt python3-certbot-apache

Successivamente, ottieni e installa un certificato SSL per il tuo dominio con il seguente comando:

certbot --apache -d weberp.example.com

Ti verrà chiesto di fornire il tuo indirizzo email e di accettare i termini del servizio:

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

Ora puoi accedere al tuo sito web in modo sicuro utilizzando l'URL https://weberp.example.com .

Configura Firewall

Successivamente, dovrai consentire le porte 80 e 443 attraverso il firewall. Puoi consentirli con il seguente comando:

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

Quindi, ricarica il firewall per applicare le modifiche:

firewall-cmd --reload

Accedi all'interfaccia web ERP web

Ora apri il tuo browser web e accedi all'interfaccia web webERP utilizzando l'URL https://weberp.example.com . Dovresti vedere la seguente pagina:

Seleziona la tua lingua e fai clic sul PASSAGGIO SUCCESSIVO . Dovresti vedere la seguente pagina:

Fornisci il nome del database, l'utente, la password e fai clic sul PASSAGGIO SUCCESSIVO . Dovresti vedere la seguente pagina:

Fornisci il nome della tua azienda, il fuso orario, il nome utente dell'amministratore, la password e fai clic su INSTALLA pulsante. Una volta terminata l'installazione, dovresti vedere la seguente pagina:

Fornisci il nome utente e la password dell'amministratore e fai clic su Accedi pulsante. Verrai reindirizzato alla dashboard webERP:

Conclusione

Congratulazioni! hai installato correttamente webERP con Apache e Let's Encrypt SSL su CentOS 8. Ora puoi esplorare webERP per ulteriori funzionalità e implementarle nel tuo ambiente di produzione.


Cent OS
  1. Come installare MariaDB su CentOS 7

  2. Come installare MongoDB su CentOS 8

  3. Come installare MariaDB su CentOS 8

  4. Come installare PhpWiki su CentOS 7

  5. Come installare WebERP su CentOS 8

Come installare MediaWiki su CentOS 7

Come installare CakePHP su CentOS 7

Come installare Oxwall su CentOS 7

Come installare PHPList su CentOS 7

Come installare PHP-Fusion su CentOS 7

Come installare Tine 2.0 su CentOS 7