ERPNext installation

Note: For installing EFPNext, MariaDB version 10.1 is required. With version 10.2 the install script crashed with errors.

Prepare the firewall

For apache to run next to the nginx webserver, we need to change the default port for nginx. For this, we enter port 8874 in SELinux as well as in the firewall.

root$

semanage port -a -t http_port_t -p tcp 8874

root$

firewall-cmd --permanent --zone=public --add-port=8874/tcp

root$

firewall-cmd --reload

Create folder and add it to SELinux

To avoid conflicts with SELinux, we create the installation folder for ERPNext and apply a policy to the SELinux rules. We also create the frappe user under which ERPNext runs and add it as owner to the installation directory.

root$

mkdir /home/frappe

root$

semanage fcontext -a -t httpd_sys_rw_content_t '/home/frappe'

root$

restorecon '/home/frappe'

root$

useradd -M -s /bin/false frappe

root$

chown frappe:frappe /home/frappe

Network policies for ERPNext

Now we need to add two network policies to SELinux.

root$

setsebool -P httpd_can_sendmail on

root$

setsebool -P httpd_can_network_connect on

Download and execute the ERPNext install script

Before we start the installation script, we stop apache to avoid problems during the installation.

root$

systemctl stop httpd

 

And now get die script and start the installation.

root$

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

root$

python install.py --production

Configure nginx

To configure nginx for SSL and the port we enabled in SELinux and the firewall edit the file:

/etc/nginx/conf.d/frappe-bench.conf

Now find the line listen, usually with the value 80 and change it to your configured port number. Also add the lines for SSL, so it looks like this:

server {

listen 8874;
ssl on;
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;

...

}

Add domain name to ERPNext site configuration file

The doman name must be entered into the ERPNext configurations file especially for the generation of the automatic PDF invoices by e-mail. Open the file:

/home/frappe/frappe-bench/sites/[site_name]/site_config.json

and add the line: 

"host_name": "https://server.your-domain.at",

to the top of the file so it looks like this:

{

"host_name": "https://server.your-domain.com",
"db_name": "***************",
"db_password": "****************",
"encryption_key": "*******************************************",

 ...

}

Start ERPNext

Finally, restart the nginx webserver and re-enable apache if it is installed and not running.

root$

systemctl restart nginx

root$

systemctl start httpd

 

Now start ERPNext in your favorite web browser:

https://server.your-domain.com:8874

References

The original ERPNext development and installation site on github.

https://github.com/frappe/bench

Backup and restore an ERPNext installation.

https://discuss.erpnext.com/t/backup-restore/5675/4

PDF invoice formatting problem in mail attachments.

 https://discuss.erpnext.com/t/pdf-formatting-issue-in-e-mails/23112/5

Kommentare

Bitte rechnen Sie 3 plus 5.