Update and Upgrade Packages
sudo apt-get update -ysudo apt-get upgrade -y
Create a new user – (bench user)
sudo adduser frappesudo usermod -aG sudo frappesudo su frappecd /home/frappe
Install Required Packages
Install GIT
sudo apt-get install git
Install Python
sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils
Install Python Virtual Environment
sudo apt-get install python3.10-venv
Install Software Properties Common
sudo apt-get install software-properties-common
Install MariaDB
sudo apt install mariadb-server mariadb-client
Install Redis Server
sudo apt-get install redis-server
Install other packages
sudo apt-get install xvfb libfontconfig wkhtmltopdfsudo apt-get install libmysqlclient-dev
Configure MYSQL Server
sudo mysql_secure_installation
When you run this command, the server will show the following prompts. Please follow the steps as shown below to complete the setup correctly.
- Enter current password for root: (Enter your SSH root user password)
- Switch to unix_socket authentication [Y/n]: Y
- Change the root password? [Y/n]: Y
It will ask you to set new MySQL root password at this step. This can be different from the SSH root user password.
- Remove anonymous users? [Y/n] Y
- Disallow root login remotely? [Y/n]: N
- Remove test database and access to it? [Y/n]: Y
- Reload privilege tables now? [Y/n]: Y
Edit MYSQL default config file
sudo nano /etc/mysql/my.cnf
Add the following block of code exactly as is:
[mysqld]character-set-client-handshake = FALSEcharacter-set-server = utf8mb4collation-server = utf8mb4_unicode_ci[mysql]default-character-set = utf8mb4
Restart the MYSQL Server
sudo service mysql restart
Install CURL
sudo apt install curl
Install Node
# 1. Install NVMcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash# 2. Load NVM (for current shell session)source ~/.bashrc # or source ~/.profile, depending on your shell# 3. Install Node.js 18nvm install 18# 4. Set default Node version (so it loads automatically)nvm use v18.20.8nvm alias default v18.20.8# 5. Verifynode -vnpm -v
Install NPM
sudo apt-get install npm
Install Yarn
sudo npm install -g yarn
Install Frappe Bench
sudo pip3 install frappe-bench
Initialize Frappe Bench
bench init --frappe-branch version-15 frappe-bench
Switch directories into the Frappe Bench directory
cd frappe-bench
Change user directory permissions
chmod -R o+rx /home/frappe
Create a New Site
bench new-site [site-name]
Setting ERPNext for Production
Enable Scheduler
bench --site [site-name] enable-scheduler
Disable maintenance mode
bench --site [site-name] set-maintenance-mode off
Setup production config
sudo bench setup production frappe
Setup NGINX to apply the changes
bench setup nginx
Restart Supervisor and Launch Production Mode
sudo supervisorctl restart allsudo bench setup production frappe
No comments yet. Login to start a new discussion Start a new discussion