Dear All,
I followed the necessary steps (have shared below) to set the ERPNext server on a VM before setting it up on a server.
at the time of creation of a new site am getting errors. (have shared).
Need help to overcome this issue, please be kind enough to share your thoughts and advice same for a successful installation.
Please message me on this or pvt. msg me on skype : azli.zainulabdeen whatsapp : +94773404983
Installation Installation of OS and binaries 1. Installation of OS Ubuntu 16.04 Server editioninstalling ssh as frappe user
sudo apt install -y openssh-server
install vim as frappe user
sudo apt install -y vim
- Creation of swap space
free -h
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
sudo cp /etc/fstab /etc/fstab.bak
echo ‘/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab
-
Creation of application user with Sudo priviledges
sudo adduser frappe
sudo usermod -aG sudo frappe -
Creation of Folder to carry out the installation and setting the rights
sudo mkdir /erpnext
sudo chown -R frappe:frappe /erpnext
sudo chmod 775 /erpnext -
installation of required packages
su - frappe
sudo apt update
sudo apt install -y curl
sudo apt install -y wget
–open a putty and carry out the following installations
sudo apt-get install -y git build-essential python-setuptools python-dev libffi-dev libssl-dev
sudo pip install --upgrade setuptools urllib3 requests cryptography pip
if not successful above pip
{
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py --force-reinstall
sudo -H pip install --upgrade setuptools urllib3 requests cryptography pip
sudo -H pip install --upgrade urllib3 requests cryptography ansible
}
sudo apt install -y python-mysqldb
sudo apt install -y git-core
sudo apt install -y ntp vim screen htop
sudo apt install -y fontconfig
sudo apt install -y libxrender1
sudo apt install -y libxext6
sudo apt install -y xfonts-75dpi xfonts-base
sudo apt install -y cron
sudo apt install -y dirmngr
sudo apt install -y libmariadbclient-dev
sudo apt install -y mysql-client
sudo apt install -y libmysqlclient-dev
sudo apt install -y python-mysqldb
sudo apt install -y libxslt1.1 libxslt1-dev
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt install -y redis-server
sudo apt install -y libssl-dev libcrypto+±dev
–sudo apt install -y postfix —errors
sudo apt install -y supervisor
sudo apt install -y npm
sudo npm install -g yarn #or sudo apt install yarn
npm install --save-dev babel-preset-env
Installing NVM
sudo apt-get update
sudo apt-get install build-essential libssl-dev
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh
sudo bash install_nvm.sh
source ~/.profile
nvm ls-remote
nvm install 8.9.4 #or latest
nvm use 8.9.4
node -v
nvm alias default 8.9.4
nvm use default
–sudo apt install -y python-pip
–sudo pip install --upgrade setuptools
sudo -H pip install MySQL-python --no-use-wheel
sudo apt install -y nginx
sudo apt update
sudo apt install -y xvfb libfontconfig wkhtmltopdf
printf ‘#!/bin/bash\nxvfb-run -a --server-args=“-screen 0, 1024x768x24” /usr/bin/wkhtmltopdf -q $*’ > /usr/bin/wkhtmltopdf.sh
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
ln -s /usr/bin/nodejs /usr/bin/node
yarn config set cache ~/.my-yarn-cache-dir
#test
- Installation of Mariadb database
sudo apt install -y 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 install -y mariadb-server-10.3
Log in and Create Mysql Database
mysql -u root -p
MariaDB [(none)]> MariaDB [(none)]> CREATE DATABASE erpnext;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON erpnext.* TO ‘root’@‘localhost’ IDENTIFIED BY ‘mariadbpwd’ WITH GRANT OPTION;
grant all privileges on . to root@localhost identified by ‘mariadbpwd’ with grant option;
MariaDB [(none)]> \q;
- download frappe from github
su - frappe
cd /home/frappe
sudo git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench
sudo -H pip install -e bench
exit
Create a new Bench as the frappe user.
su - frappe
bench init frappe-bench
cd frappe-bench
#add database configurations
vi /home/frappe/frappe-bench/sites/common_site_config.json
{
“db_host”: “localhost”,
“db_port”: “3306”
}
edit the mysql.conf file
sudo vim /etc/mysql/my.conf
sudo vim /etc/mysql/mariadb.cnf
[mysqld]
bind-address = 0.0.0.0
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
[mysql]
default-character-set = utf8mb4
restart the services of the database
sudo 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/
To install ERPNext into your existing Frappe install, change to the frappe user and install the erpnext app.
su - frappe
cd frappe-bench
bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
#Creating New Erpnext Site
cd frappe-bench
bench new-site site1.localhost --db-name erpnext --mariadb-root-username root --mariadb-root-password mariadbpwd --install-app erpnext --verbose --force
bench new-site site1.localhost
</steps of Installation>
frappe@ubuntu:~/frappe-bench$ frappe@ubuntu:~/frappe-bench$ frappe@ubuntu:~/frappe-bench$ bench new-site site1.localhost --db-name erpnext --mariadb-root-username root --mariadb-root-password mariadbpwd --install-app erpnext --verbose --force Created user erpnext Created database erpnext Granted privileges to user erpnext and database erpnext ================================================================================ Creation of your site - site1.localhost failed because MariaDB is not properly configured to use the Barracuda storage engine. Please add the settings below to MariaDB's my.cnf, restart MariaDB then run `bench new-site site1.localhost` again.[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
[mysql]
default-character-set = utf8mb4
================================================================================
frappe@ubuntu:~/frappe-bench$
frappe@ubuntu:~/frappe-bench$
frappe@ubuntu:~/frappe-bench$ bench new-site site1.localhost
MySQL root password:
Creation of your site - site1.localhost failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB’s my.cnf, restart MariaDB then
run bench new-site site1.localhost
again.
[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
[mysql]
default-character-set = utf8mb4
================================================================================
frappe@ubuntu:~/frappe-bench$