Install Elgg by shell script

I am trying to install Elgg completely by a script that I'm developing. I have resolved all the dependencies and set the stage setup, but I have a problem running the file 'sample_installer.php' located in the following directory:

/myelgg/vendor/elgg/elgg/install/cli/sample_installer.php

However, when I execute...

$ php sample_installer.php

The following messages are shown me and the installation is not completed.

PHP Notice:  Undefined property: stdClass::$dbprefix in /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database/Config.php on line 37
PHP Notice:  Undefined property: stdClass::$dbhost in /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database/Config.php on line 107
PHP Notice:  Undefined property: stdClass::$dbuser in /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database/Config.php on line 108
PHP Notice:  Undefined property: stdClass::$dbpass in /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database/Config.php on line 109
PHP Notice:  Undefined property: stdClass::$dbname in /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database/Config.php on line 110
PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)' in /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Stack trace:
#0 /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:charset=u...', NULL, NULL, Array)
#1 /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(45): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:charset=u...', NULL, NULL, Array)
#2 /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, NULL, NULL, Array)
#3 /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(749): Doctrine\DBAL\Connection->connect()
#4 /myelgg/vendor/elgg/elgg/engine/classes/Elgg/Database.php(642): Doctrine\DBAL\Connection->quote('dbprefix in /myelgg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 103

Note: The elgg version that I used is the 2.0.2