setup_frappe.sh fails again on new Centos 7 (Workaround)

I’m using setup_frappe.sh to install ERPNext on a new updated Centos 7 install (fwiw, using a VirtualBox vm on Win7).

[root@whizzer ~]# ./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
Configuring CentOS services
Failed to issue method call: No such file or directory
[root@whizzer ~]#

From running the calls in configure_services_centos7() manually, it seems the cause may be related to mariadb.

[root@whizzer ~]# systemctl enable nginx
[root@whizzer ~]# systemctl enable mariadb
Failed to issue method call: No such file or directory
[root@whizzer ~]#

Any ideas?

Fwiw, I tried doing yum update on an existing vm first, but after it downloaded the updates it reported there was a problem updating mariadb and exited (which is why I started with a new install). Sorry I don’t have a transcript.

Regards,
Dale

Although it seems command aliasing was supposed to make replacing mysql with mariadb in RHEL/Centos transparent, the blogosphere indicates there can be problems.

The following hack made in setup_frappe.sh seems to work, but I’m sure someone can suggest a more correct solution.

configure_services_centos7() {
    run_cmd systemctl enable nginx
# hack for mariadb
    run_cmd chkconfig mysql on
#    run_cmd systemctl enable mariadb
    run_cmd systemctl enable redis
    run_cmd systemctl enable supervisord
    run_cmd systemctl enable memcached
}

start_services_centos7() {
    run_cmd systemctl start nginx
# hack for mariadb
    run_cmd service mysql start
#    run_cmd systemctl start mariadb
    run_cmd systemctl start redis
    run_cmd systemctl start supervisord
    run_cmd systemctl start memcached
}

I think the MariaDB guys changed something in packaging. Does systemctl enable mysql work?

Just read your second message. I’ll edit the script right away. Thanks!

I assumed chkconfig and service are deprecated and there should be a better way than my hack (otherwise I would have sent a pull-request for it).

Yeah, CentOS 7 has systemd now. Changed mariadb to mysql in those lines. Seems like a mariadb packaging vs systemd behaviour issue. https://bugzilla.redhat.com/show_bug.cgi?id=1014311

Lennart himself has commented on the issues (systemctl enable cannot accept a symlink)