Controller/InstallController.php
private function _createConfigFile()
    {
        $destinationPath = App::pluginPath('Gallery') . 'config' . DS . 'config.php';

        if (!file_exists($destinationPath)) {
            $configFile = new File(App::pluginPath('Gallery') . 'config' . DS . 'config.php.install');

            $configFile->copy($destinationPath);
        }
    }
private function _createConfigFile()
    {
        $destinationPath = App::pluginPath('Gallery') . 'config' . DS . 'config.php';

        if (!file_exists($destinationPath)) {
            $configFile = new File(App::pluginPath('Gallery') . 'config' . DS . 'config.php.install');

            $configFile->copy($destinationPath);
        }
    }
Create the config file copying the config.php.install file