Install ERPNext 13+ on OL8 ( Oracle Linux 8 and above )

Install ERPNext 13+ on OL8 ( Oracle Linux 8 and above ) After CentOS discontinued it's life cycle, we have published several articles on Ubuntu based installation of ERPNext. But several alternative

 · 2 min read


EBS 12.2 now certified with Oracle Linux 8 and Red Hat Enterprise Linux 8 |  Oracle E-Business Suite Technology Blog



yum update -y
init 6
sudo yum groupinstall 'Development Tools'

sudo yum install -y gcc make git mariadb mariadb-server nginx python3 python3-devel python2 python2-devel redis
---------
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
rpm -Uvh epel-release-latest-8.noarch.rpm

sudo yum install libxslt-devel libxml2-devel supervisor nodejs postgresql-devel xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 libXrender libXext redis git python3-devel


-----------------
sudo yum install supervisor  ( If this step giving an error, add the repo like shown below )
vim /etc/yum.repos.d/my-add.repo  -- add following lines
[Supervisor]
name=Supervisor for Oracle Linux 8 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/x86_64
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1
sudo yum install supervisor
sudo vim /etc/supervisord.conf -
uncomment or  add chown=erpnext:erpnext
----------------
curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -
npm install -g yarn
npm install -g npm@7.21.1
yarn add latest
npm install node-sass
npm install -g sass
------------
service mariadb start
mysql_secure_installation

Enter current password for root (enter for none): Press your [Enter] key, there is no password set by default
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
------------------------
service mariadb start
chkconfig mariadb on
service nginx start
chkconfig nginx on
chkconfig supervisord on
service supervisord start
-------------------
vim /etc/my.cnf.d/erpnext.cnf
[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
----------------------------

service mariadb restart
-----------------------

mysql -u root -p


MariaDB [(none)]>USE mysql;
MariaDB [(none)]>UPDATE user SET plugin='mysql_native_password' WHERE User='root';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

--------------------------
-------------------------------
useradd -m -s /bin/bash erpnext

passwd erpnext

usermod -aG wheel erpnext

------

su - erpnext


vim ~/.bashrc
add this lines
PATH=$PATH:~/.local/bin/
PATH=$PATH:/usr/local/bin/



source ~/.bashrc


su - erpnext
sudo mkdir /opt/bench


sudo chown -R erpnext:erpnext /opt/bench


cd /opt/bench

npm install node-sass@6.0.1

pip3 install --user frappe-bench
 bench init frappe-bench --frappe-branch version-13


cd frappe-bench
 sed -i '/web:/ s/$/ --noreload/' Procfile
 bench start >/tmp/bench_log &


bench new-site yourhost.example.com

--------
Install wkhtmltopdf herer if yum not working
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox**  ( Find the best link here is one https://wkhtmltopdf.org/downloads.html )
sudo rpm -Uvh wkhtmltox-0.12.6-1.centos***

----------------

source env/bin/activate
npm install sass
npm install node-sass
deactivate
-----------------

At this point we have a frappe site running - bench start and you will get the website on port 8000. But ERPNext not yet installed. Let's continue



bench get-app erpnext --branch version-13
 bench --site site1.local install-app erpnext  ( if you have more than one site mention site name like " bench --site site1.local install-app erpnext "


bench start


Now you have ERPNext on port 8000. ( http://yourhost.example.com:8000 )

You can run the setup-wizard on the browser. ( Setup-wizard often fail. Restart it again and again. This issue has been there since ages and yet to be fixed )


----- NOW deploy it in production mode - on nginx server -------


------
bench setup supervisor --yes
bench setup nginx

sudo ln -s `pwd`/config/supervisor.conf /etc/supervisord.d/frappe-bench.ini
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe-bench.conf

sudo service supervisord restart
sudo service nginx restart


sudo systemctl enable supervisord
 sudo systemctl enable nginx


restart the system - init 6 


--------------

Now Letsencrypt and SSL

--------------------------

It's explained here https://erpgulf.com/blog/support-forum/letsencrypt-on-ubuntu-version-20-for-erpnext




sudo service nginx stop


Team ERPGulf

The team behind ERPGulf blogs here, expresses their thoughts, shares the experience, often show the frustrations. Contact us on support@ERPGulf.com

No comments yet

No comments yet. Start a new discussion.

Add Comment