moglia
2009-09-22 81541100da4989dfd1d8dd0c670faa2397f9eb8e
install/install.php
@@ -53,6 +53,10 @@
//** Include the base class of the installer class
require_once('lib/installer_base.lib.php');
//** Ensure that current working directory is install directory
$cur_dir = getcwd();
if(realpath(dirname(__FILE__)) != $cur_dir) die("Please run installation/update from _inside_ the install directory!\n");
//** Install logfile
define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log');
define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../'));
@@ -105,6 +109,9 @@
$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', $tmp_out[0]);
unset($tmp_out);
// Check if the mysql functions are loaded in PHP
if(!function_exists('mysql_connect')) die('No PHP mysql functions available. Please ensure that the PHP mysql module is loaded.');
//** Get MySQL root credentials
$finished = false;
do {
@@ -129,7 +136,9 @@
unset($finished);
// Resolve the IP address of the mysql hostname.
if(!$conf['mysql']['ip'] = gethostbyname($conf['mysql']['host'])) die('Unable to resolve hostname'.$conf['mysql']['host']);
$tmp = explode(':',$conf['mysql']['host']);
if(!$conf['mysql']['ip'] = gethostbyname($tmp[0])) die('Unable to resolve hostname'.$tmp[0]);
unset($tmp);
//** initializing database connection
@@ -189,6 +198,10 @@
   swriteln('Configuring Apache');
   $inst->configure_apache();
   
    //** Configure vlogger
    swriteln('Configuring vlogger');
    $inst->configure_vlogger();
   //* Configure Firewall
   swriteln('Configuring Firewall');
   $inst->configure_firewall();
@@ -348,11 +361,15 @@
   }
   
   //** Configure Apache
   swriteln("\nHint: If this server shall run the ispconfig interface, select 'y' in the next option.\n");
   swriteln("\nHint: If this server shall run the ispconfig interface, select 'y' in the 'Configure Apache Server' option.\n");
   if(strtolower($inst->simple_query('Configure Apache Server',array('y','n'),'y')) == 'y') {   
      $conf['services']['web'] = true;
      swriteln('Configuring Apache');
      $inst->configure_apache();
        //** Configure vlogger
        swriteln('Configuring vlogger');
        $inst->configure_vlogger();
   }
   
   //** Configure Firewall