Frappe Installation from Scratch

Installing Dependencies

  1. Create Ubuntu Image

  2. SSH onto machine as root

  3. Create ubuntu user with
    adduser ubuntu
    
  4. Make sure ubuntu user has sudo visudo below the root line
    ubuntu  ALL=(ALL:ALL) ALL
    
  5. Update apt sudo apt-get -y update

  6. Install git and redis
    • sudo apt install -y git python-dev redis-server
  7. Install MariaDB & set Root Password

    sudo apt-get install software-properties-common
    sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
    sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
    sudo apt-get update
    sudo apt-get install mariadb-server-10.3
    
  8. Install MySQL Client

    sudo apt-get install libmysqlclient-dev
    
  9. Update MySQL config sudo nano /etc/mysql/my.cnf

    [mysqld]
    character-set-client-handshake = FALSE
    character-set-server = utf8mb4
    collation-server = utf8mb4_unicode_ci
    
    [mysql]
    default-character-set = utf8mb4
    
  10. Restart MySQL & check if its working fine

    sudo service mysql restart
    mysql -uroot -p
    
  11. Install NodeJS curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - and sudo apt-get install -y nodejs

  12. Install yarn curl -o- -L https://yarnpkg.com/install.sh | bash

  13. Install emacs sudo apt-get install -y emacs

  14. Install wkhtmltopdf sudo apt-get install -y xvfb libfontconfig wkhtmltopdf

  15. Install pip sudo apt-get install -y python3-pip

Install bench

  1. Create Installs directory mkdir ~/Installs && cd ~/Installs
  2. Clone bench repo git clone https://github.com/frappe/bench bench-repo
  3. Install bench cd bench-repo && sudo python3 setup.py install
  4. Initialize Frappe Bench bench init frappe-bench –frappe-branch master && cd frappe-bench

Create new application

  1. Make sure to run ./env/bin/pip3 install werkzeug==0.16.0

  2. Create a new app: bench new-app library_management

  3. Create a site & install our app

    bench new-site site1.local
    bench --site site1.local install-app library_management