Manually Install ERPNext on a Manual Install of Frappe

Manually Install ERPNext on a Manual Install of Frappe

Tags :

Category : How-to

Get Social!

erpnext-screenERPNext is an Enterprise Resource Planning suite similar to Odoo. It manages every aspect of your business from time and expense tracking and payroll to invoicing and manufacturing.

Installing ERPNext is simple enough if you go with their automated approach, but can be a little more tricky when you’re wanting to control where services are. The automated install assumes everything is on the same box however it’s very likely you’ll have your database installed elsewhere.

ERPNext uses a Python framework called Frappe which must be installed before you can use ERPNext. This guide assumes you’ve completed the previous post in this series of manually installing Frappe.

To install ERPNext into your existing Frappe install, change to the frappe user and install the erpnext app.

su - frappe
bench get-app erpnext https://github.com/frappe/erpnext

Login to your SQL server (this can be MySQL or MariaDB) and create a new database for the ERPNext installation.

create database erpnext;

Add a user with all privalages on the database.

GRANT ALL PRIVILEGES ON erpnext.* TO 'root'@'erphost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Replace erphost with your IP address of the server hosting Frappe and ERPNext and password with the password you would like to use for this remote root user.

Run the commands on the Frappe host to create a new site for the ERPNext installation.

bench new-site site1.local --db-name erpnext --mariadb-root-username root --mariadb-root-password password --install-app erpnext --verbose --force

Again, replace password with the password of the root user we just created.

The database tables and core data should now be installed and you’ll be prompted for an administrator username. This will be the initial username that you use to access the front page site.

Create a config for Bench, Nginx and Supervisor and copy them into place:

bench setup procfile
bench setup nginx
bench setup supervisor
cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default
cp /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/supervisor.conf

And that’s it – restart everything and your ERPNext site should be accessible from http://ip-address/

service nginx restart
service supervisor restart

 


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.

useradd -d /home/testuser -m -d /home/frappe frappe

Set the password for the frappe user with passwd.

passwd frappe

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

apt-get update
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

Download and install the latest version of wkhtmltopdf from Sourceforge.

cd /tmp/
wget http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb/download
dpkg -i download
apt-get -f -y install

Download Frappe from Github as the frappe user.

su - frappe
cd /home/frappe
git clone https://github.com/frappe/bench bench-repo
exit

Run the pip installer for Frappe.

pip install -e bench-repo

Create a new Bench as the frappe user.

su - frappe
bench init frappe-bench && cd frappe-bench

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

vi /home/frappe/frappe-bench/sites/common_site_config.json

And add:

{
 "db_host": "database.host.com",
 "db_port": "3306"
}

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.

vi /etc/mysql/my.conf
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

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

service mysql restart

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

cp /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/

 


Visit our advertisers

Search

Quick Poll

Are you using Docker.io?

Visit our advertisers