I think the recommended way to do this should do a backup of your mongodb database and download the bitnami installer of mongodb and install it on the new location.
Note: Don't forget to stop all the services before you install the new mongodb version, just to avoid a possible port conflict.
To stop all the services you have just to do:
sudo /opt/bitnami/ctlscript.sh stop
This is our recommended guide to make the backup and restore it.
Once you have installed the new mongodb and loaded the backup you can delete the old installation folder of mongodb.