Manually Install Frappe on Ubuntu 14.04 With a Remote SQL Server

Manually Install Frappe on Ubuntu 14.04 With a Remote SQL Server

Get Social!

frappeFrappe is a full stack web framework based on Python and Javascript which can be used to build and deploy web applications. The main focus of this post is to set up a Frappe environment that can be used for ERPNext.

Before starting, install MariaDB 10.x on a remote host (or local, but that’s less common in a production environment) as we’ll use that later.

Create a user for Frappe – here we’ll use frappe but you can change this for anything you like. If you do change the user remember to update the home directory.

Set the password for the frappe user with passwd.

Install the required dependencies. Notice that we’ve not included an SQL server as we’ll use a remote MariaDB SQL Server.

Download and install the latest version of wkhtmltopdf from Sourceforge.

Download Frappe from Github as the frappe user.

Run the pip installer for Frappe.

Create a new Bench as the frappe user.

Add the default site configuration file with the remote SQL database hostname/ IP and port number.

And add:

Before you create any sites, you’ll need to apply a few settings to your SQL server. This guide assumes you have a remote MariaDB SQL Server – log into it and add the below to your my.conf file.

And restart your SQL server for the changes to take affect.

Copy the Supervisor config file into place so that Frappe automatically starts up with the system.

 


17 Comments

Javier

27-Aug-2015 at 3:44 am

Great tutorial, thanks

However I found that your required dependencies are incomplete or outdated, the complete list is

apt-get install -y python-dev python-setuptools build-essential python-mysqldb git ntp vim screen htop libmariadbclient-dev libxslt1.1 libxslt1-dev redis-server libssl-dev libcrypto++-dev postfix nginx supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base nodejs npm wkhtmltopdf

wkhtmltopdf can be installed througth apt in Ubuntu 15.04 (at least)

    james.coyle

    27-Aug-2015 at 7:36 am

    Hi Javier – thanks for the comment.

    This is for Ubuntu 14.04 – Are the dependencies you note for 15.04?
    I only use LTS releases so I wouldn’t know about 15.04 – If you’re creating an enduring server I’d advise you to stick to LTS releases also.

    Cheers,

    James.

      Zul

      29-Feb-2016 at 9:12 am

      Hi James,

      I am using Laravel Forge to manage my VPS, so the steps with frappe user is really confusing me.

      Is it a must to run everything as the frappe user? What does it means by the frappe user?

        james.coyle

        2-Mar-2016 at 9:36 am

        You don’t have to – it’s just a non-privileged user that everything Frappe runs under.

vCentre

26-Jun-2016 at 10:17 pm

Hi

Please place a detailed and step-by-step guide to install ERPNext.com platform from manual installation points of view.

The guys out there are doing good job but it looks like some commits having bad impact on the overall performance.

Please go through and provide clear manual installation guide for the components named Bench, Frappe Framework and ERPNext.

They are calling the last two as Apps based on the 1st one as somehow engine.

Please assume that, non-skilled users like me are looking for installation specific versions of any of the above, in particular Frappe Framework which is not clear out there.

Please consider Ubuntu 14.04, MariaDB, Redis, NodeJS and WKHTMLtoPDF with patched QT.

Assume the source is available for any which is not supposed to be the latest ones.

Thank you!

Vikas Gupta

12-Jul-2016 at 8:39 am

Hey james, after this command “apt-get install -y python-dev python-setuptools build-essential python-mysqldb git ntp vim screen htop libmariadbclient-dev libxslt1.1 libxslt1-dev redis-server libssl-dev libcrypto++-dev postfix supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base cron mysql-client curl nginx”

I am stuck here..
postfix confugaration
Please select the mail server configuration type that best meets your
needs.

Now there is no option to choose. Please help me.

    james.coyle

    12-Jul-2016 at 8:41 am

    Hi Vikas,

    You should just be able to choose the Web Server option. It configures Postfix based on how it might be used.

      Vikas Gupta

      12-Jul-2016 at 8:58 am

      Hey James,
      Thanks for response. But actually there is no option to choose. Neither I can click on .
      Here it is looks like.

      Please select the mail server configuration type that best meets your
      │ needs.

      │ No configuration:
      │ Should be chosen to leave the current configuration unchanged.
      │ Internet site:
      │ Mail is sent and received directly using SMTP.
      │ Internet with smarthost:
      │ Mail is received directly using SMTP or by running a utility such
      │ as fetchmail. Outgoing mail is sent using a smarthost.
      │ Satellite system:
      │ All mail is sent to another machine, called a ‘smarthost’, for
      │ delivery.
      │ Local only:
      The only delivered mail is the mail for local users. There is no
      │ network.

        james.coyle

        12-Jul-2016 at 9:01 am

        You should choose whatever matches your environment – if you’re unsure then go for ‘Internet site’. Use the arrow keys and SPACEBAR to navigate.

Vikas Gupta

12-Jul-2016 at 9:14 am

Hey james,
Thanks for help. I have to press F12 to choose from options.
Here is another problem:

itdesktop@itdesktop:/tmp$ wget http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb/download
–2016-07-12 13:42:34– http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb/download
Resolving sourceforge.net (sourceforge.net)… 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: https://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb/download [following]
–2016-07-12 13:42:35– https://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb/download
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2016-07-12 13:42:36 ERROR 404: Not Found.

Plz help.

    james.coyle

    12-Jul-2016 at 9:22 am

    That version isn’t available anymore. As with most software, versions change as improvements are made. You will need to visit Sourceforge.net and find the latest version. It would be helpful if you could let us know what it is.

      Vikas Gupta

      12-Jul-2016 at 9:59 am

      Hey James,
      Founded the latest version on official website. Downloaded. It is tar file. Now what command I should use to continue my work?

        james.coyle

        12-Jul-2016 at 10:23 am

        Just continue the steps. If it’s a tar.gz file then you’ll need to extract it first using tar -zxvf FILENAME.

Vikas Gupta

12-Jul-2016 at 10:09 am

Here is the link http://wkhtmltopdf.org/downloads.html

Vikas Gupta

12-Jul-2016 at 11:16 am

itdesktop@itdesktop:/tmp$ pip install -e bench-repo
bench-repo should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
Storing debug log for failure in /home/itdesktop/.pip/pip.log

Vikas Gupta

12-Jul-2016 at 11:40 am

Hey James,
I am stuck at few places. Sending u where:
1.
itdesktop@itdesktop:/tmp$ pip install -e bench-repo
bench-repo should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
Storing debug log for failure in /home/itdesktop/.pip/pip.log

2.
sudo bench init frappe-bench && cd frappe-bench
[sudo] password for frappe:
frappe is not in the sudoers file. This incident will be reported.

Please reply.

    james.coyle

    12-Jul-2016 at 12:03 pm

    Re. 2: you will need to add the user frappe to the sudoers file.

Leave a Reply