Install ERPNext on bare metal Centos 7

The procedure here is essentially the same as Install ERPNext on Digital Ocean Centos 7, but updated for a bare metal server.

Here are my steps, described very briefly again. I’m starting with a Dell Optiplex 755 and Centos 7 Everything-DVD.

  • Boot into the MEBx BIOS (Ctrl-P instead of F2) and disable Intel ANT ME BIOS Extension (that doesn’t play nice). ThinkWiki has a good article, and besides knowing the default password to get in (admin), you MUST change the password – and it MUST be a strong password
  • install Centos from the “Everything-DVD”
    • use “Infrastructure Server” profile with add-ons: E-mail server, and File and Storage Server (CIFS…)
    • enable networking and enter the hostname (e.g. whizzer.local)
    • set root password (no user creation is needed)
  • Disable firewalld to allow remote clients to connect to the server (otherwise you will need to create a firewall rule.systemctl stop firewalld systemctl disable firewalld systemctl status firewalld
  • Disable SELinux to allow Nginx to respond to remote client requests (otherwise you will need to create SELinux rule) *ERPNext should be updated shortly and any necessary SELinux rules created during install).vi /etc/selinux/config

set SELINUX=disabled

  • connect using WinSCP and copy public ssh key to /root/.ssh/, also copy authorized_hosts and id_rsa (openssh), and rebootsystemctl reload sshd.service
  • update systemyum check update yum update

Follow the Easy Way in ERPNExt frappe bench README.md

  • wkhtmltopdf couldn’t be installed and was skipped (too bad, I need that!)
  • “pip-2.7 not found”, but pretty sure this message was informational and not an error.

Point browser at the server ip address.

  • server produced ERPNext login screen, so it seems the basics are working.
  • install wkhtmltopdf manually (appears the project has changed its hosting recently). When creating a test PDF from a web URL, a LOT of “unable to allocate memory” error messages were displayed, but the test PDF was created and wkhtomdopdf appears to be working correctly. For now, I’ll assume the errors were due to not being able to load some user thumbnail pics included on the source page.

Access the server from a browser (port 80) * Sign into ERPNext as “Adminstrator” using the password output at the end of the setup_frappe.sh execution. * The wizard runs after logging in. I’ll continue configuring ERPNext later after which I’ll perform a manual backup of the database.

setup_frappe.sh log

[root@whizzer ~]# wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
--2014-11-22 01:30:19--  https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 23.235.47.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|23.235.47.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11561 (11K) [text/plain]
Saving to: ‘setup_frappe.sh’

100%[=========================================================================>] 11,561      --.-K/s   in 0.1s

2014-11-22 01:30:20 (77.8 KB/s) - ‘setup_frappe.sh.1’ saved [11561/11561]

[root@whizzer ~]# sudo bash setup_frappe.sh --setup-production
Installing for centos 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding centos mariadb repo
Installing packages for centos. This might take time...
Installing wkhtmltopdf
Cannot install wkhtmltodpdf. Skipping...
Configuring CentOS services
Starting services
Adding frappe user
setup_frappe.sh: line 300: hash: pip-2.7: not found
Installing frappe-bench
Setting up first site

Frappe/ERPNext is installed successfully and is running on port 80.
Frappe password: xxxxx
MariaDB root password: xxxxx
Administrator password: xxxxx

The passwords are also stored at ~/frappe_passwords.txt
You can remove this file after making a note of the passwords.
[root@whizzer ~]#

install wkhtmltopdf

Stay tuned.

Backup database

systemctl status mariadb.service
mysqldump -u root -p --databases site1.local > ~/erpnextbkup/erpnext-1.sql

Restore database

mysql -u root -p site1.local < ~/erpnextbkup/erpnext-1.sql

One Reply to “Install ERPNext on bare metal Centos 7”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.