Installs the Module MBeanServer.
503434
private void installModuleMBeanServer() {
        try {
            Method method = ModuleLoader.class.getDeclaredMethod("installMBeanServer");
            method.setAccessible(true);
            method.invoke(null);
        } catch (Exception e) {
            SwarmMessages.MESSAGES.moduleMBeanServerNotInstalled(e);
        }
    }
508706
public function install()
    {
        $build = $this('mysql',
            $this->databases['default']['host'],
            '',
            $this->databases['default']['user'],
            $this->databases['default']['pass']);

        $main = $this('mysql',
            $this->databases['default']['host'],
            $this->databases['default']['name'],
            $this->databases['default']['user'],
            $this->databases['default']['pass']);

        $build->query('DROP DATABASE IF EXISTS `'.$this->databases['default']['name'].'`');
        $build->query('CREATE DATABASE `'.$this->databases['default']['name'].'`');

        //get schema
        $schema = $this('file', $this->cwd.'/schema.sql')->getContent();

        //add queries
        $queries = explode(';', $schema);

        $queries[] = "INSERT INTO `app` (
            `app_id`,
            `app_name`,
            `app_domain`,
            `app_token`,
            `app_secret`,
            `app_permissions`,
            `app_website`,
            `app_active`,
            `app_type`,
            `app_flag`,
            `app_created`,
            `app_updated`
        ) VALUES (
            1,
            'Main Application',
            '*.openovate.com',
            '986e7ce6bec660838491c1cd0a1f4ef6',
            'ba0d2fc7aab09dfa3463943c0aaa8551',
            '".implode(',', array(
                'public_profile',
                'public_sso',
                'personal_profile',
                'user_profile'
            ))."',
            'http://openovate.com/',
            1, NULL, 0, '2015-08-21 00:00:00', '2015-08-21 00:00:00'
        )";

        $queries[] = "INSERT INTO `auth` (
            `auth_id`,
            `auth_slug`,
            `auth_password`,
            `auth_token`,
            `auth_secret`,
            `auth_permissions`,
            `auth_facebook_token`,
            `auth_facebook_secret`,
            `auth_linkedin_token`,
            `auth_linkedin_secret`,
            `auth_twitter_token`,
            `auth_twitter_secret`,
            `auth_google_token`,
            `auth_google_secret`,
            `auth_active`,
            `auth_type`,
            `auth_flag`,
            `auth_created`,
            `auth_updated`
        ) VALUES (
            1,
            'admin@openovate.com',
            MD5('admin'),
            '986e7ce6bec660838491c1cd0a1f4ef6',
            'ba0d2fc7aab09dfa3463943c0aaa8551',
            '".implode(',', array(
                'public_profile',
                'public_sso',
                'personal_profile',
                'user_profile'
            ))."',
            NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, 0,
            '2015-09-11 23:05:17', '2015-09-11 23:05:17'
        )";

        $queries[] = "INSERT INTO `profile` (
            `profile_id`,
            `profile_name`,
            `profile_email`,
            `profile_phone`,
            `profile_detail`,
            `profile_company`,
            `profile_job`,
            `profile_gender`,
            `profile_birth`,
            `profile_website`,
            `profile_facebook`,
            `profile_linkedin`,
            `profile_twitter`,
            `profile_google`,
            `profile_active`,
            `profile_type`,
            `profile_flag`,
            `profile_created`,
            `profile_updated`
        ) VALUES (
            1,
            'Admin',
            'admin@openovate.com',
            '+63 (2) 654-5110',
            NULL, NULL, NULL, NULL, NULL,
            NULL, NULL, NULL, NULL, NULL, 1, NULL,
            0, '2015-09-11 23:05:16', '2015-09-11 23:05:16')";

        $queries[] = "INSERT INTO `app_profile` (`app_profile_app`, `app_profile_profile`) VALUES (1, 1)";
        $queries[] = "INSERT INTO `auth_profile` (`auth_profile_auth`, `auth_profile_profile`) VALUES (1, 1)";

        //now call the queries
        foreach($queries as $query) {
            $lines = explode("\n", $query);

            foreach($lines as $i => $line) {
                if(strpos($line, '--') === 0 || !trim($line)) {
                    unset($lines[$i]);
                    continue;
                }
            }

            $query = trim(implode("\n", $lines));

            if(!$query) {
                continue;
            }

            $main->query($query);
        }
    }
1184266
public function install()
	{
		parent::install();

		$Eresus = Eresus_CMS::getLegacyKernel();
		if (!is_dir($Eresus->froot.'templates/'.$this->name))
		{
			$umask = umask(0000);
			mkdir($Eresus->froot.'templates/'.$this->name, 0777);
			umask($umask);
		}
	}
455232
public static void loadDefaultEncryptionModule() {
		// Be sure that the cryptographical algorithms are loaded
		final Provider[] providers = Security.getProviders();
		boolean found = false;
		for (final Provider provider : providers) {
			if (provider instanceof SunJCE) {
				found = true;
				break;
			}
		}
		if (!found) {
			Security.addProvider(new SunJCE());
		}
	}
987740
def setup(basepath=DEFAULT_BASEPATH):
    """"""

    module_version = os.environ.get('MODULE_VERSION', DEFAULT_VERSION)
    moduleshome = os.path.join(basepath, module_version)

    # Abort if MODULESHOME does not exist
    if not os.path.isdir(moduleshome):
        print('payu: warning: MODULESHOME does not exist; disabling '
              'environment modules.')
        os.environ['MODULESHOME'] = ''
        return

    os.environ['MODULE_VERSION'] = module_version
    os.environ['MODULE_VERSION_STACK'] = module_version
    os.environ['MODULESHOME'] = moduleshome

    if 'MODULEPATH' not in os.environ:
        module_initpath = os.path.join(moduleshome, 'init', '.modulespath')
        with open(module_initpath) as initpaths:
            modpaths = [
                line.partition('#')[0].strip()
                for line in initpaths.readlines() if not line.startswith('#')
            ]

        os.environ['MODULEPATH'] = ':'.join(modpaths)

    os.environ['LOADEDMODULES'] = os.environ.get('LOADEDMODULES', '')

    # Environment modules with certain characters will cause corruption
    # when MPI jobs get launched on other nodes (possibly a PBS issue).
    #
    # Bash processes obscure the issue on Raijin, since it occurs in an
    # environment module function, and bash moves those to the end of
    # the environment variable list.
    #
    # Raijin's mpirun wrapper is a bash script, and therefore "fixes" by doing
    # the shuffle and limiting the damage to other bash functions, but some
    # wrappers (e.g. OpenMPI 2.1.x) may not be present.  So we manually patch
    # the problematic variable here.  But a more general solution would be nice
    # someday.

    if 'BASH_FUNC_module()' in os.environ:
        bash_func_module = os.environ['BASH_FUNC_module()']
        os.environ['BASH_FUNC_module()'] = bash_func_module.replace('\n', ';')
685844
public function install() {
		if (file_exists(__DIR__.'/../../../../../../mouf/no_commit/MoufUsers.php')) {
			$this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/moufusers_exists.php", $this);
			$this->template->toHtml();
			return;
		}
		
		$oldUmask = umask();
		umask(0);
		
		// Now, let's write the basic Mouf files:
		if (!file_exists(__DIR__."/../../../../../../mouf")) {
			mkdir(__DIR__."/../../../../../../mouf", 0775);
		}
		if (!file_exists(__DIR__."/../../../../../../mouf/no_commit")) {
			mkdir(__DIR__."/../../../../../../mouf/no_commit", 0775);
		}
		
		
		// Write Mouf.php (always):
		//if (!file_exists(__DIR__."/../../../../../../mouf/Mouf.php")) {
			$moufStr = "<?php
define('ROOT_PATH', realpath(__DIR__.'/..').DIRECTORY_SEPARATOR);
require_once __DIR__.'/../config.php';
if (defined('ROOT_URL')) {
	define('MOUF_URL', ROOT_URL.'vendor/mouf/mouf/');
}
		
require_once __DIR__.'/../vendor/autoload.php';
		
require_once 'MoufComponents.php';
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/Mouf.php", $moufStr);
			// Change rights on Mouf.php, but ignore errors (the file might be writable but still belong to someone else).
			@chmod(__DIR__."/../../../../../../mouf/Mouf.php", 0664);
		//}
		
		
		
		// Write MoufComponents.php:
		if (!file_exists(__DIR__."/../../../../../../mouf/MoufComponents.php")) {
			$moufComponentsStr = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 */
		
use Mouf\MoufManager;
MoufManager::initMoufManager();
\$moufManager = MoufManager::getMoufManager();
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/MoufComponents.php", $moufComponentsStr);
			chmod(__DIR__."/../../../../../../mouf/MoufComponents.php", 0664);
		}
		
		// Finally, let's generate the MoufUI.php file:
		if (!file_exists(__DIR__."/../../../../../../mouf/MoufUI.php")) {
			$moufUIStr = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 */
		
	?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/MoufUI.php", $moufUIStr);
			chmod(__DIR__."/../../../../../../mouf/MoufUI.php", 0664);
		}
		
		// Finally 2, let's generate the config.php file:
		if (!file_exists(__DIR__."/../../../../../../config.php")) {
			$moufConfig = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 * Use the UI to edit it instead.
 */
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../config.php", $moufConfig);
			chmod(__DIR__."/../../../../../../config.php", 0664);
		}
		
		// Finally 3 :), let's generate the MoufUsers.php file:
		if (!file_exists(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php")) {
			$moufConfig = "<?php
/**
 * This contains the users allowed to access the Mouf framework.
 */
\$users[".var_export(userinput_to_plainstring($_REQUEST['login']), true)."] = array('password'=>".var_export(sha1(userinput_to_plainstring($_REQUEST['password'])), true).", 'options'=>null);
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", $moufConfig);
			chmod(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", 0664);
		}
		
		umask($oldUmask);
		
		header("Location: ".ROOT_URL);
		
		
	}
36149
private void installModules(final Node node, final NetworkContext context, final Handler<AsyncResult<Void>> doneHandler) {
    List<ModuleContext> modules = new ArrayList<>();
    for (ComponentContext<?> component : context.components()) {
      if (component.isModule()) {
        modules.add(component.asModule());
      }
    }

    final CountingCompletionHandler<Void> counter = new CountingCompletionHandler<Void>(modules.size()).setHandler(doneHandler);
    for (ModuleContext module : modules) {
      installModule(node, module, counter);
    }
  }
1030800
public synchronized static void install() {
        if (!isInstalled()) {
            InputStream is = BMPCLocalLauncher.class.getResourceAsStream(BMP_LOCAL_ZIP_RES);
            try {
                // Unzip BrowserMob Proxy contained in the project "/resources"
                unzip(is, BMPC_USER_DIR);

                // Set executable permissions on the BrowserMob Proxy lanching scripts
                new File(BMP_LOCAL_EXEC_UNIX).setExecutable(true);
                new File(BMP_LOCAL_EXEC_WIN).setExecutable(true);

                // Check there is an installed version
                installedVersion();
            } catch (Exception e) {
                throw new BMPCUnexpectedErrorException("Installation failed", e);
            }
        }
    }
794436
public static void install() throws IOException {
        
        try {
            Field factoryField = Socket.class.getDeclaredField("factory");
            factoryField.setAccessible(true);
            SocketImplFactory currentSocketImplFactory = (SocketImplFactory) factoryField.get(null);
            if (null == currentSocketImplFactory || !SnifferSocketImplFactory.class.equals(currentSocketImplFactory.getClass())) {
                factoryField.set(null, null);
                Socket.setSocketImplFactory(new SnifferSocketImplFactory());
                previousSocketImplFactory = currentSocketImplFactory;
            }
        } catch (IllegalAccessException e) {
            throw new IOException("Failed to initialize SnifferSocketImplFactory", e);
        } catch (NoSuchFieldException e) {
            throw new IOException("Failed to initialize SnifferSocketImplFactory", e);
        }

    }
59636
def setup(self):
        
        for conf_name in self.py3_config["i3s_modules"]:
            module = I3statusModule(conf_name, self)
            self.i3modules[conf_name] = module
            if module.is_time_module:
                self.time_modules.append(module)
893327
function install()
    {
        if (!$this->brew->hasInstalledNginx()) {
            $this->brew->installOrFail('nginx', []);
        }

        $this->installConfiguration();
        $this->installServer();
        $this->installNginxDirectory();
    }
283730
public void addModule(Module module) {
		if (module instanceof HttpAdapterAware) {
			((HttpAdapterAware) module).setHttpAdapter(getHttpAdapter());
		}
		this.moduleRegistry.addModule(module);
	}
1240726
final void install() {
        Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        Uri uri = AndPermission.getFileUri(mSource.getContext(), mFile);
        intent.setDataAndType(uri, "application/vnd.android.package-archive");
        mSource.startActivity(intent);
    }
1257370
public function install()
    {
        $this->ensureComponentDirectoryExists();
        $this->updatePackages();
        $this->updateWebpackConfiguration();
        $this->updateBootstrapping();
        $this->updateComponent();
        $this->removeNodeModules();
    }
765695
def install_monitor(self, mon):
        """"""
        assert self.binded
        for module in self._modules:
            module.install_monitor(mon)
754912
public function install()
    {
        $path = $this->command->path.'/config/app.php';

        $contents = file_get_contents($path);

        $contents = str_replace(
            '        App\\Providers\\AppServiceProvider::class,',
            "        Laravel\Spark\Providers\SparkServiceProvider::class,\n        App\Providers\AppServiceProvider::class,",
            $contents
        );

        file_put_contents($path, $contents);
    }
926885
protected function install()
    {
        // Version-specific.
        $this->maybeRunVsUpgrades();

        // Misc installers.
        $this->createDbTables();
        $this->otherInstallRoutines();
        $this->doFlushRewriteRules();
        $this->maybeEnqueueNotices();

        // History/options.
        $this->updateHistory();
        $this->updateOptions();
    }