ISPConfig and "Perfect Server Howto" AutoInstaller

Discussion in 'Developers' Forum' started by Croydon, Aug 12, 2019.

  1. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Currently we are in the process of developing an official auto-installer for the perfect server tutorials including ISPConfig.

    We have completed a first beta version that supports installing / configuring Debian (9 and 10) and Ubuntu 18.04. The auto-installer will re-configure the server regarding the steps mentioned in the perfect server tutorials here on howtoforge.com.

    !Only use this on test servers or if you exactly know what you are doing!

    As the installer will reconfigure everything on the server it should only be used on a freshly set-up server. If you have already configured services on the server, those settings will most likely be lost!

    Using the installer is simple. Just open a server console and type:
    Code:
    curl https://get.ispconfig.org | sh -s -- --channel=dev
    or
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --channel=dev
    !This will use the stable-3.1 git branch! You should not use this on production servers currently!
    If you don't need rspamd support you can also install the ISPConfig latest stable with amavis instead:
    Code:
    curl https://get.ispconfig.org | sh -s -- --use-amavis
    or
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-amavis
    To see what other arguments are supported by the installer, just use:
    Code:
    curl https://get.ispconfig.org | sh -s -- --help
    or
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --help
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The auto installer now also supports nginx. Simply use --use-nginx argument.
     
    till and ahrasis like this.
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Can we see the source code for this? We might not want to install multiple php on our server and modify a bit of that code etc.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ahrasis likes this.
  5. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You can also file an issue as feature request so we can decide whether to integrate something in the installer like --no-multi-php or something similar.
     
    ahrasis likes this.
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Yes. Option to not install multiple php and may be choose one is nice eg --php=7.3.
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Warning for failures on using mariadb 10.4 repository:
    Error:
     
    Last edited: Aug 29, 2019
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    I don't think 10.4 is supported by ISPConfig, yet, is it, @till?
    The error about quota might be because of missing kernel module (quota support). Is it a VM?
     
    ahrasis likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Supported are only the versions that ship with the supported OS, so using a newer version from an external repo will most likely cuase failures and it's not supported to do that.
     
    ahrasis likes this.
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    It's ok. On that latest stable version of mariadb, I have a workaround.

    But quotaon error is kinda weird. I don't have problems running them manually though.

    Anyway, I will fork and modify it later.
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The quota error has been resolved now I guess (virtual kernel missing quota modules). In addition we now added --use-php=system to skip installing sury php packages on request.
     
    ahrasis likes this.
  12. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Just an idea for discussion/consideration, if there were hooks to add 3rd party scripts into the installer as options, I would probably use that (ie. to move some of my local setup to such scripts). Eg. during installation, options would be presented to use whatever 3rd party script packages happened to be available at that time, to add a set of extra features/config.

    Pro's: there might be some nice contributions which more people could easily find and utilize, possibly even letting 3rd party vendors integrate in a more standard manner.

    Con's: support questions would change, eg. if something were broken and users had to (re)install with no 3rd party scripts to ensure it's not a problem in the base autoinstaller. I don't really think that's much different than now, as users frequently say they do one thing when they have done another, or conflated multiple things, etc... Also it'd (obviously) take the time to write the (fairly simple?) integration hooks for the 3rd party packages.
     
    gbe and ahrasis like this.
  13. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Of course that could be possible somehow. I think it would be better to make this usable by arguments, e. g. --hook-xxxx-xxxx where xxxx-xxxx could be something like "pre-php" or "post-php" etc. The argument would then be provided with the path to a script file.
     
    ahrasis likes this.
  14. helios842000

    helios842000 New Member

    Hi, I installed under ubuntu 18.04 and everything works fine, except roundcube; the messages go to my mailboxes, but the sending fails to roundcube, every time I get this message: Relay access denied
    I did a search and I need to activate an authentication but I don't know where it is, if anyone can help me, thank you very much
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no authentication required as RoundCube is installed on localhost. Please make a new thread in the ispconfig installation forum and there post the exact messages that appear in the mail.log when you try to send an email.
     
  16. KatyComputer

    KatyComputer New Member

  17. till

    till Super Moderator Staff Member ISPConfig Developer

    The script in this thread is new and completely different from the tutorial you linked to, nothing described there applies to this new auto installer introduced. I recommend using the auto installer from this thread as it's the new official auto installer developed by ISPConfig while the one from the tutorial is developed by a third party.
     
    KatyComputer likes this.
  18. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I'm now getting around to testing this autoinstaller, and want to know what all is in scope for feature requests? It's intended to install a "Perfect Server" system, so as far as the script proper, anything that is not in a Perfect Server guide would not be considered for this, and should be a 3rd party integration, if/when that plays out?

    Eg. a simple example, on a mail server node, an option to install the unbound caching resolver would be handy. I'd gladly file an rfe for that, but is that totally out of scope for this?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Feel free to make an issue for it in the issue tracker of the installer :)
     
  20. churbz

    churbz New Member

    Brief research indicates that installing on Debian 10.4.0 using the latest install git files, it appears that an additional exception needs to be added in the file named: class.ISPConfigDebianOS.inc.php on or about line number 766. The modules to install array includes recode which is not available in PHP 7.4 (it's in the release notes).

    PHP:
            $php_modules = array(
                
    'common',
                
    'gd',
                
    'mysql',
                
    'imap',
                
    'cli',
                
    'mcrypt',
                
    'curl',
                
    'intl',
                
    'pspell',
                
    'recode',
                
    'sqlite3',
                
    'tidy',
                
    'xmlrpc',
                
    'xsl',
                
    'zip',
                
    'mbstring',
                
    'soap',
                
    'opcache'
            
    );
            if(
    ISPConfig::shallInstall('web')) {
                
    $php_modules[] = 'cgi';
                
    $php_modules[] = 'fpm';
            }

            foreach(
    $php_versions as $curver) {
                
    $packages[] = 'php' $curver;
                
    reset($php_modules);
                foreach(
    $php_modules as $curmod) {
                    if(
    version_compare($curver'7.2''>=') && in_array($curmod, array('mcrypt'), true)) {
                        continue;
                    }
                    
    $packages[] = 'php' $curver '-' $curmod;
                }
            }
            
    $this->installPackages($packages);
    It is my assumption that adding the below in the inner foreach could solve the problem of throwing an exception that causes the script to fail.
    PHP:
                   if(version_compare($curver'7.4''>=') && in_array($curmod, array('recode'), true)) {
                        continue;
                    }
    Hope this is constructive. Thanks.
     
    till and ahrasis like this.

Share This Page