If you have the Ubunbu LAMP server set up correctly the Moodle install is very quick as all the requirements will be met. I would start again and follow the Ubuntu step by step guide. I think it will be easier to get it right from the beginning rather than chase errors.