How to enable RAC mode of a previously installed ORACLE_HOME

Scenario

You installed Oracle, then you added your machine into a cluster and now you want your Oracle home to be able to create RAC databases.

You need to run the bellow code on each machine where you want to enable the RAC mode.

export ORACLE_HOME=/databases/ee/product/18x/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk rac_on
make -f ins_rdbms.mk ioracle

Then you can run dbca and it will show the RAC option enabled.