What's bellow applies to Alfresco enterprise version and some things may need to be tweaked to align with community.
In terms of steps you cannot upgrade from 5.0 to 6.0 straight away you'll need to go through the path bellow (unless you already have 5.0.5 installed):
There is no in-place upgrade mecanism, so you'll need for each step to deploy an alfresco instance and copy over configuration/customizations, DB & contentstores from the old to the new instance, and then reindex content. I would recommand you of course do backups and test at each step the application is running as expected.
Your description of your current alfresco installation in /opt/ makes me think it was originally installed using the binary installer which shipped all the components (a jre, postgresql db server, and so on...).
This installer doesn't exist anymore in version 6.x and you will have to install every component yourself (e.g. using you package manager - if it provides appropriate components versions - or manually) and adapt configuration accordingly.
Make sure to install each component as per the compatibility matrix: https://docs.alfresco.com/6.0/concepts/supported-platforms-ACS.html (or the one for your target version of Alfresco)
Another important difference is that in 6.0 Alfresco does not embed the Solr FTS server. It is now a separate module (Alfresco Search service) you'll need to installation and reindex your whole repository.
May sound overwheming but if you don't have customizations that should not be a big deal.