Manually Install Frappe on Ubuntu 14.04 With a Remote SQL Server
Category : How-to
Frappe 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/
Enabling web content compression is one of the simplest ways to save bandwidth and, for some users, speed up the time it takes to serve a page. All modern browsers support content compression and the CPU overhead for clients is a thing of the past.
Zimbra Email Server is an install anywhere, full featured email server solution. I know that sounds like a sales pitch, but it really is one of the better all-in-one on premise email solutions. It’s scalable, deployable on several platforms and hosts a comprehensive web mail service for users to manage email from a browser.
Installing Nginx on Debian or Ubuntu is as easy as a single apt-get command, however it does not install the latest version of Nginx. In fact, the latest stable Nginx version is 1.8 and the latest package in Debian’s standard repository is 1.2
A disk drive storage is usually persistent, that is, anything that is written to it will always be there exactly as it was written until it’s deleted or modified by an application. Power failures or computer restarts will not (for the most part) effect the data on the storage disk. You are limited in size by the capacity of the disk and the read and write speed will vary depending on the type of drive you have. Generally storage drives tend to be high in capacity and slow in speed.