The Perfect Server - Debian 11 (Bullseye) ?

Discussion in 'ISPConfig 3 Priority Support' started by HSorgYves, May 6, 2022.

  1. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Have the howtos "The Perfect Server - Debian xx" been dropped in favor of the auto-installer?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The recommended installation method on Debian 11 is the auto-installer, the guide has been updated for Debian 11 quite some time ago. Might be that I'll write an update for the old Debian perfect server guide though if I have some spare time.
     
    HSorgYves and Th0m like this.
  3. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Thanks for your quick reply Till.
    Which guide are you referring to? The manual?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. SirAdams

    SirAdams New Member

    Please add to this guide on start info about change default shell to bash.
    I use this guide to auto configure Debian 10.
     
  6. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    The autoinstaller changes the default shell to bash, no need to do that beforehand.
     
  7. SirAdams

    SirAdams New Member

    Two days ago I did a fresh installation of Debian 10 with autoinstaller. It's impossible to successfully complete the installation if you don't first start a bash shell using sudo bash
    Nowhere is this mentioned in the installation which is why I wrote about it.
    So since the autoinstaller does the changes itself there should be a minimum mention on the bash wget rule ... or something like that.
     
  8. SirAdams

    SirAdams New Member

    I have another question about doing all the installations....
    In the documentation you mention:
    Then edit the /etc/hostname file:
    nano /etc/hostname
    It shall contain only the subdomain part, in our case:
    server1​
    However if I enter the GUI into "Server Config" and try to change the "Hostname" field to "Server1" I get an error that a wrong hostname is given so I have to enter "Server1.example.com" which causes the change in /etc/hostname to "server1.example.com".
    This does not seem to match what you wrote earlier?
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is your default shell? On a plain system, the AI should run fine and change the default shell to Bash for later.

    Why are you changing it in the panel?

    Do you have "The network configuration option is only available for Debian and Ubuntu Servers. Do not enable this option if your network interface is not eth0." checked? You should not use that anymore in most cases.
     
  10. SirAdams

    SirAdams New Member

    My default shell is clean instalation debian 10 from netinstaller! i do nothing, just start autoinstaller!

    Hmm, because i move server to new place and i need change default name? ?

    Yes, my server is debian 10/11
    And i don't enable this option, just enter new name.
    Something is for repair in this panel?
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What was the error you saw?

    Default name? The guide clearly instructs you to use your own hostname when setting up the server - not server1.example.com, that's just a placeholder in the guide.
     
  12. SirAdams

    SirAdams New Member

    Sorry, i don't remember. Installation fail. After use bash cmd, installation successful.

    No matter. It's not important to me. I am making a suggestion that a user using this field may make a different entry than is provided for in the documentation.
    I also do not want to describe why the name change was necessary because it is not relevant here.
     
  13. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Out of curiosity I installed a new Debian 10.12 netinstall and selected "SSH server" and "standard system utilities" as usual. I configured the hostname and hosts and updated the system. I launched AI while my user shell was bash and /bin/sh a symlink to dash:
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-php=system
    The symlink of /bin/sh was changed to bash. However I got the following error:
    Code:
    [INFO] Installing Mailman
    [INFO] Installing packages mailman
    [ERROR] Exception occured: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    This error is not related to bash vs. dash at all and you verified yourself that changing to bash upfront is not needed as the installer reconfigures the shell correctly from dash to bash.
     
  15. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    True. I already said it worked for me, however on Debian 11. :)
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Just to finish up this topic, I ran the auto-installer on a Debian 10.12 system, it worked flawlessly, no change of dash to bash required upfront and mailman was installed too. Here is the whole install output, I just removed some apt output lines at the beginning to make it easier readable.

    Code:
    root@server1:~# which sh
    /usr/bin/sh
    root@server1:~# ls -la /usr/bin/sh
    lrwxrwxrwx 1 root root 4 Jun 19  2019 /usr/bin/sh -> dash
    root@server1:~# cat /etc/debian_version
    10.12
    root@server1:~# wget -O - https://get.ispconfig.org | sh -s -- --use-php=system
    --2022-05-15 19:51:23--  https://get.ispconfig.org/
    Resolving get.ispconfig.org (get.ispconfig.org)... 2606:4700:20::681a:af6, 2606:4700:20::ac43:4b70, 2606:4700:20::681a:bf6, ...
    Connecting to get.ispconfig.org (get.ispconfig.org)|2606:4700:20::681a:af6|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2004 (2.0K) [application/octet-stream]
    Saving to: ‘STDOUT’
    
    -                                               100%[====================================================================================================>]   1.96K  --.-KB/s    in 0s
    
    2022-05-15 19:51:23 (16.8 MB/s) - written to stdout [2004/2004]
    
    PHP cli missing, trying to install.
    .........
    WARNING! This script will reconfigure your complete server!
    It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
    Type 'yes' if you really want to continue: yes
    [INFO] Starting perfect server setup for Debian GNU/Linux 10 (buster)
    [INFO] Checking hostname.
    [INFO] Enabling contrib and non-free repositories.
    [INFO] Updating packages
    [INFO] Updated packages
    [INFO] Installing packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, gnupg, software-properties-common, ntp
    [INFO] Installed packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, gnupg, software-properties-common, ntp
    [INFO] Activating rspamd repository.
    [INFO] Activating GoAccess repository.
    [INFO] Updating packages (after enabling 3rd party repos).
    [INFO] Updated packages
    [INFO] Default shell is currently dash.
    [INFO] Setting bash as default shell.
    [INFO] Default shell is now bash.
    [INFO] Installing packages dbconfig-common, postfix, postfix-mysql, postfix-doc, mariadb-client, mariadb-server, openssl, rkhunter, binutils, sudo, getmail
    [INFO] Installed packages dbconfig-common, postfix, postfix-mysql, postfix-doc, mariadb-client, mariadb-server, openssl, rkhunter, binutils, sudo, getmail
    [INFO] Installing packages dovecot-imapd, dovecot-pop3d, dovecot-mysql, dovecot-sieve, dovecot-managesieved, dovecot-lmtpd
    [INFO] Installed packages dovecot-imapd, dovecot-pop3d, dovecot-mysql, dovecot-sieve, dovecot-managesieved, dovecot-lmtpd
    [INFO] Generating mySQL password.
    [INFO] Writing MySQL config files.
    [INFO] Configuring postfix.
    [INFO] Restarting postfix
    [INFO] Installing packages software-properties-common, dnsutils, resolvconf, clamav, clamav-daemon, clamav-docs, zip, unzip, bzip2, xz-utils, lzip, rar, arj, nomarch, lzop, cabextract, apt-listchanges, libnet-ldap-perl, libauthen-sasl-perl, daemon, libio-string-perl, libio-socket-ssl-perl, libnet-ident-perl, libnet-dns-perl, libdbd-mysql-perl, bind9, spamassassin, rspamd, redis-server, postgrey, p7zip, p7zip-full, unrar-free, lrzip
    [INFO] Installed packages software-properties-common, dnsutils, resolvconf, clamav, clamav-daemon, clamav-docs, zip, unzip, bzip2, xz-utils, lzip, rar, arj, nomarch, lzop, cabextract, apt-listchanges, libnet-ldap-perl, libauthen-sasl-perl, daemon, libio-string-perl, libio-socket-ssl-perl, libnet-ident-perl, libnet-dns-perl, libdbd-mysql-perl, bind9, spamassassin, rspamd, redis-server, postgrey, p7zip, p7zip-full, unrar-free, lrzip
    [INFO] Stopping Rspamd.
    [INFO] (Re)starting Bind.
    [INFO] Disabling spamassassin daemon.
    [INFO] Checking local dns resolver.
    [INFO] Installing packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-python, libapache2-mod-passenger
    [INFO] Installed packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-python, libapache2-mod-passenger
    [INFO] Installing packages php-pear, php-memcache, php-imagick, php-gettext, mcrypt, imagemagick, libruby, memcached, php-apcu, php7.3, php7.3-common, php7.3-gd, php7.3-mysql, php7.3-imap, php7.3-cli, php7.3-curl, php7.3-intl, php7.3-pspell, php7.3-recode, php7.3-sqlite3, php7.3-tidy, php7.3-xmlrpc, php7.3-xsl, php7.3-zip, php7.3-mbstring, php7.3-soap, php7.3-opcache, php7.3-cgi, php7.3-fpm
    [INFO] Installed packages php-pear, php-memcache, php-imagick, php-gettext, mcrypt, imagemagick, libruby, memcached, php-apcu, php7.3, php7.3-common, php7.3-gd, php7.3-mysql, php7.3-imap, php7.3-cli, php7.3-curl, php7.3-intl, php7.3-pspell, php7.3-recode, php7.3-sqlite3, php7.3-tidy, php7.3-xmlrpc, php7.3-xsl, php7.3-zip, php7.3-mbstring, php7.3-soap, php7.3-opcache, php7.3-cgi, php7.3-fpm
    [INFO] Disabling conflicting apache modules.
    [INFO] Enabling apache modules.
    [INFO] Enabling default PHP-FPM config.
    [INFO] Setting default system php version.
    [INFO] Installing package phpmyadmin
    [INFO] HTTPoxy config.
    [INFO] Installing acme.sh (Let's Encrypt).
    [INFO] acme.sh (Let's Encrypt) installed.
    [INFO] Installing Mailman
    [INFO] Installing packages mailman
    [INFO] Installed packages mailman
    [INFO] Installing packages quota, quotatool, haveged, geoip-database, libclass-dbi-mysql-perl, libtimedate-perl, build-essential, autoconf, automake, libtool, flex, bison, debhelper, binutils
    [INFO] Installed packages quota, quotatool, haveged, geoip-database, libclass-dbi-mysql-perl, libtimedate-perl, build-essential, autoconf, automake, libtool, flex, bison, debhelper, binutils
    [INFO] Adding quota to fstab.
    [INFO] Installing packages pure-ftpd-common, pure-ftpd-mysql, webalizer, awstats, goaccess
    [INFO] Installed packages pure-ftpd-common, pure-ftpd-mysql, webalizer, awstats, goaccess
    [INFO] Enabling TLS for pureftpd
    [INFO] Disabling awstats cron.
    [INFO] Installing packages fail2ban, ufw
    [INFO] Installed packages fail2ban, ufw
    [INFO] Activating Buster Backports repository.
    [INFO] Installing roundcube.
    [INFO] Installing packages roundcube/buster-backports, roundcube-core/buster-backports, roundcube-mysql/buster-backports, roundcube-plugins/buster-backports
    [INFO] Installed packages roundcube/buster-backports, roundcube-core/buster-backports, roundcube-mysql/buster-backports, roundcube-plugins/buster-backports
    [INFO] Installing ISPConfig3.
    [INFO] Adding php versions to ISPConfig.
    [INFO] Checking all services are running.
    [INFO] mysql: OK
    [INFO] clamav-daemon: OK
    [INFO] postfix: OK
    [INFO] bind9: OK
    [INFO] pureftpd: OK
    [INFO] apache2: OK
    [INFO] rspamd: OK
    [INFO] redis-server: OK
    [INFO] dovecot: OK
    [INFO] Installation ready.
    [INFO] Your Mailman password is: xxxxxxxxxxxx
    [INFO] Your ISPConfig admin password is: xxxxxxxxxxxxxxx
    [INFO] Your MySQL root password is: xxxxxxxxxxxxxxx
    [INFO] Warning: Please delete the log files in /tmp/ispconfig-ai/var/log/setup-* once you don't need them anymore because they contain your passwords!
    root@server1:~# ls -la /usr/bin/sh
    lrwxrwxrwx 1 root root 4 May 15 19:55 /usr/bin/sh -> bash
     
    HSorgYves likes this.
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    And the auto-installer even mentions the shell change btw:

    Code:
    [INFO] Default shell is currently dash.
    [INFO] Setting bash as default shell.
    [INFO] Default shell is now bash.
     
    HSorgYves and Th0m like this.
  18. SirAdams

    SirAdams New Member

    On Debian I noticed one problem that has been occurring for some time now.
    If I log in as a normal user and then use "su" even though I have entered my password everything does not work. For example, installing packages does not work. I have to additionally use "bash" or "sudo bash" to get everything working as it should.

    I also found a second problem. When I select PHP-FPM for apache from the panel the pages don't work, and at least one CMS based page didn't want to work. It was only when I gave:
    apt-get install libapache2-mod-php5.6
    ...
    apt-get install libapache2-mod-php8.0
    the site started working.
    I spent an hour trying to get the site to work so it's not likely a coincidence.
    I don't know how with FAST-CGI because there the site wasn't working properly either and after running PHP-FPM I stopped checking further because it's a client created site and I don't know the exact mechanics of it.

    And yes, bash is my default terminal on new and old installation.
     
    Last edited: May 17, 2022
  19. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Use "su -" or "sudo -i".
    You can only load one version of mod_php at a time; my guess is that your site requires an older version of php, and you are now using php 5.6 for it so it works, but it failed with newer php under both fpm and fast-cgi modes. That's just a guess, it could be you need to install additional php modules, etc. You can do what you want here, but I would purge all mod_php packages from the system, set the site to fpm mode, create a small phpinfo page and see if it loads, then troubleshoot from there. If the phpinfo page loads, try loading the site and check the php error log to see what's going on (also check the software requirements for that site, eg. php version and modules); if the phpinfo page doesn't load, something is broken in the fpm setup (and my above guess is wrong), check starting/stopping the daemon manually, check log files for errors, etc.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    You use the wrong command. Since Debian 10, one has to use:

    su -

    But that's not ISPConfig related in any way, the way recent su versions work has been changed. Btw, we do mention that even in the perfect server install guides.

    I run quite a few Debian 10 and 11 systems, all installed according to the perfect server guide or using auto-installer, and none of them has any issues with php-fpm. So most likely you did some modifications in your setup which make it differ from a standard install that cause this. The apache mod_php module is not related to running PHP scripts by php-fpm.
     
    Th0m likes this.

Share This Page