The Perfect Server - Debian 9 (Nginx, BIND, Dovecot, ISPConfig 3.1) - Page 2

10 Install Nginx, PHP (PHP-FPM), and Fcgiwrap

Nginx is available as a package for Debian which we can install as follows:

apt-get install nginx

If Apache2 is already installed on the system, stop it now...

service apache2 stop

The message "Failed to stop apache2.service: Unit apache2.service not loaded." is fine and does not indicate an error.

... and remove Apache's system startup links:

systemctl disable apache2

Start nginx afterwards:

service nginx start

(If both Apache2 and nginx are installed, the ISPConfig 3 installer will ask you which one you want to use - answer nginx in this case. If only one of these both is installed, ISPConfig will do the necessary configuration automatically.)

We can make PHP 7 work in nginx through PHP-FPM (PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites) which we install as follows:

apt-get install php7.0-fpm

PHP-FPM is a daemon process that runs a FastCGI server on the socket /var/run/php/php7.0-fpm.sock.

To get MySQL support in PHP, we can install the php7.0-mysql package. It's a good idea to install some other PHP modules as well as you might need them for your applications. You can search for available PHP modules like this:

apt-cache search php7

Pick the ones you need and install them like this:

apt-get install php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt mcrypt  imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring memcached php7.0-soap php7.0-opcache

Next open /etc/php/7.0/fpm/php.ini...

nano /etc/php/7.0/fpm/php.ini

... and set cgi.fix_pathinfo=0 and your timezone:

[...]
cgi.fix_pathinfo=0
[...]
date.timezone="Europe/Berlin"
[...]

(You can find all available timezones in the /usr/share/zoneinfo directories and its subdirectories.)

Now reload PHP-FPM:

service php7.0-fpm reload

To get CGI support in nginx, we install Fcgiwrap.

Fcgiwrap is a CGI wrapper that should work also for complex CGI scripts and can be used for shared hosting environments because it allows each vhost to use its own cgi-bin directory.

Install the fcgiwrap package:

apt-get install fcgiwrap

After the installation, the fcgiwrap daemon should already be started; its socket is /var/run/fcgiwrap.socket. If it is not running, you can use the fservice fcgiwrap script to start it.

That's it! Now when you create a nginx vhost, ISPConfig will take care of the correct vhost configuration.

10.1 Additional PHP Versions

Starting with ISPConfig 3.0.5, it is possible to have multiple PHP versions on one server (selectable through ISPConfig) which can be run through PHP-FPM incl. PHP 5.x and 7.x. To learn how to build additional PHP versions (PHP-FPM) and how to configure ISPConfig, please check this tutorial: How to install PHP 7.1, 7.2 and 5.6 as PHP-FPM & FastCGI for ISPConfig 3 on Debian 9

10.2 Install phpMyAdmin

Install phpMyAdmin as follows:

apt-get install phpmyadmin

Do not select an option when the installers is asking "Web server to reconfigure automatically:" and press ok.

Configure database for phpmyadmin with dbconfig-common? <-- yes
MySQL application password for phpmyadmin: <-- Press Enter
Password of the database's administrative user: <-- Enter the MySQL root password

You can now find phpMyAdmin in the /usr/share/phpmyadmin/ directory.

After you have installed ISPConfig 3.1, you can access phpMyAdmin as follows:

The ISPConfig apps vhost on port 8081 for nginx comes with a phpMyAdmin configuration, so you can use http://server1.example.com:8081/phpmyadmin or http://server1.example.com:8081/phpMyAdmin to access phpMyAdmin.

If you want to use a /phpmyadmin or /phpMyAdmin alias that you can use from your websites, this is a bit more complicated than for Apache because nginx does not have global aliases (i.e., aliases that can be defined for all vhosts). Therefore you have to define these aliases for each vhost from which you want to access phpMyAdmin.

To do this, paste the following into the nginx Directives field on the Options tab of the web site in ISPConfig:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

If you use https instead of http for your vhost, you should add the line fastcgi_param HTTPS on; to your phpMyAdmin configuration like this:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                       fastcgi_param HTTPS on; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

If you use both http and https for your vhost, you can use the $https variable. Go to the nginx Directives field again, and instead of fastcgi_param HTTPS on; you add the line fastcgi_param HTTPS $https; so that you can use phpMyAdmin for both http and https requests:

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                       fastcgi_param HTTPS $https; # <-- add this line
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param PATH_INFO $fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_intercept_errors on;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

11 Install Let's Encrypt

ISPConfig 3.1 has support for the free SSL Certificate authority Let's encrypt. The Let's Encrypt function allows you to create free SSL certificates for your website from within ISPConfig.

apt-get install certbot

12 Install Mailman

ISPConfig allows you to manage (create/modify/delete) Mailman mailing lists. If you want to make use of this feature, install Mailman as follows:

apt-get install mailman

Select at least one language, e.g.:

Languages to support: <-- en (English)
Missing site list <-- Ok

Before we can start Mailman, a first mailing list called mailman must be created:

newlist mailman

[email protected]:~# newlist mailman
Enter the email of the person running the list:
 <-- admin email address, e.g. [email protected]
Initial mailman password: <-- admin password for the mailman list
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner...
 <-- ENTER

[email protected]:~#

Open /etc/aliases afterwards...

nano /etc/aliases

... and add the following lines:

[...]
## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Run

newaliases

afterwards and restart Postfix:

service postfix restart

Then start the Mailman daemon:

service mailman start

After you have installed ISPConfig 3, you can access Mailman as follows:

The ISPConfig apps vhost on port 8081 for nginx comes with a Mailman configuration, so you can use http://server1.example.com:8081/cgi-bin/mailman/admin/<listname> or http://server1.example.com:8081/cgi-bin/mailman/listinfo/<listname> to access Mailman.

If you want to use Mailman from your web sites, this is a bit more complicated than for Apache because nginx does not have global aliases (i.e., aliases that can be defined for all vhosts). Therefore you have to define these aliases for each vhost from which you want to access Mailman.

To do this, paste the following into the nginx Directives field on the Options tab of the web site in ISPConfig:

        location /cgi-bin/mailman {
               root /usr/lib/;
               fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
               include /etc/nginx/fastcgi_params;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
               fastcgi_intercept_errors on;
               fastcgi_pass unix:/var/run/fcgiwrap.socket;
        }

        location /images/mailman {
               alias /usr/share/images/mailman;
        }

        location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
        }

This defines the alias /cgi-bin/mailman/ for your vhost, which means you can access the Mailman admin interface for a list at http://<vhost>/cgi-bin/mailman/admin/<listname>, and the web page for users of a mailing list can be found at http://<vhost>/cgi-bin/mailman/listinfo/<listname>.

Under http://<vhost>/pipermail you can find the mailing list archives.

13 Install PureFTPd and Quota

PureFTPd and quota can be installed with the following command:

apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

Edit the file /etc/default/pure-ftpd-common...

nano /etc/default/pure-ftpd-common

... and make sure that the start mode is set to standalone and set VIRTUALCHROOT=true:

[...]
STANDALONE_OR_INETD=standalone
[...]
VIRTUALCHROOT=true
[...]

Now we configure PureFTPd to allow FTP and TLS sessions. FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure.

If you want to allow FTP and TLS sessions, run

echo 1 > /etc/pure-ftpd/conf/TLS

In order to use TLS, we must create an SSL certificate. I create it in /etc/ssl/private/, therefore I create that directory first:

mkdir -p /etc/ssl/private/

Afterwards, we can generate the SSL certificate as follows:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]:
<-- Enter your State or Province Name.
Locality Name (eg, city) []:
<-- Enter your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
<-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []:
<-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, YOUR name) []:
<-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
Email Address []:
<-- Enter your Email Address.

Change the permissions of the SSL certificate:

chmod 600 /etc/ssl/private/pure-ftpd.pem

Then restart PureFTPd:

service pure-ftpd-mysql restart

Edit /etc/fstab. Mine looks like this (I added ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 to the partition with the mount point /):

nano /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=f539c5cb-624f-4c27-a149-1446a251a453 / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1
# swap was on /dev/sda5 during installation
UUID=8d3194e7-edb5-4492-937d-d066b4994baf none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

To enable quota, run these commands:

mount -o remount /

quotacheck -avugm
quotaon -avug

14 Install BIND DNS Server

BIND can be installed as follows:

apt-get install bind9 dnsutils

If your server is a virtual machine, then it is highly recommended to install the haveged daemon to get a higher entropy for DNSSEC signing. You can install haveged on non-virtual servers as well, it should not hurt.

apt-get install haveged
systemctl enable haveged
service haveged start

An explanation on that topic can be found here.

15 Install Webalizer and AWStats

Webalizer and AWStats can be installed as follows:

apt-get install webalizer awstats geoip-database libtimedate-perl libclass-dbi-mysql-perl

Open /etc/cron.d/awstats afterwards...

nano /etc/cron.d/awstats

... and comment out everything in that file:

#MAILTO=root

#*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

# Generate static reports:
#10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

 

16 Install Jailkit

Jailkit is needed only if you want to chroot SSH users. It can be installed as follows (important: Jailkit must be installed before ISPConfig - it cannot be installed afterwards!):

apt-get install build-essential autoconf automake libtool flex bison debhelper binutils

cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.19.tar.gz
tar xvfz jailkit-2.19.tar.gz
cd jailkit-2.19
echo 5 > debian/compat
./debian/rules binary

You can now install the Jailkit .deb package as follows:

cd ..
dpkg -i jailkit_2.19-1_*.deb
rm -rf jailkit-2.19*

17 Install Fail2ban and UFW Firewall

This is optional but recommended, because the ISPConfig monitor tries to show the log:

apt-get install fail2ban

To make fail2ban monitor PureFTPd and Dovecot, create the file /etc/fail2ban/jail.local:

nano /etc/fail2ban/jail.local

[pure-ftpd]
enabled = true
port = ftp
filter = pure-ftpd
logpath = /var/log/syslog
maxretry = 3

[dovecot]
enabled = true
filter = dovecot
logpath = /var/log/mail.log
maxretry = 5

[postfix-sasl]
enabled = true
port = smtp
filter = postfix-sasl
logpath = /var/log/mail.log
maxretry = 3

Restart fail2ban afterwards:

service fail2ban restart

To install the UFW firewall, run this apt command:

apt-get install ufw

Share this page:

Suggested articles

7 Comment(s)

Add comment

Comments

From: PVasileff at: 2018-03-01 21:36:56

In phpmyadmin alias for nginx, may be line:

fastcgi_pass unix:/var/run/php5-fpm.sock;

must be:

fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

?

From: till at: 2018-03-02 10:08:26

Thank you for the notice. I've missed changing that, it is fixed now.

From: Podrepny at: 2018-03-06 13:57:08

...fservice fcgiwrap script to start it.

May be: "...service fcgiwrap script to start it."

From: peri0603 at: 2018-03-18 02:28:03

 Why do you not include the HHVM (HipHop VirtualMachine) packages in your tutorials!!!

They already available for Debian Stretch here: https://docs.hhvm.com/hhvm/installation/linux

From: till at: 2018-03-18 10:53:17

HHVM shall not be installed as part of this tutorial. HHVM PHP mode will be removed from ISPConfig core as there is no real speed benefit compared to PHP 7.x versions anymore (HHVM mode was added at a time that PHP 7 did not exist yet and HHVM was much faster than PHP at that time). The HHVM PHP mode is less stable than the other PHP modes, it uses more resources and the current implementation does not support systemd. So it makes no sense installing it.

From: peri0603 at: 2018-03-18 02:31:50

By installing phpmyadmin i don't get asked to enter the Password of the database's administrative user:

[email protected]:~# apt-get install phpmyadminReading package lists... DoneBuilding dependency treeReading state information... DoneThe following additional packages will be installed:  dbconfig-common dbconfig-mysql libjs-sphinxdoc libjs-underscore php-bz2  php-mysql php-phpseclib php-tcpdf php7.0-bz2Suggested packages:  php-libsodium php-gmp php5-imagick www-browserRecommended packages:  php5-gd php5-mcryptThe following NEW packages will be installed:  dbconfig-common dbconfig-mysql libjs-sphinxdoc libjs-underscore php-bz2  php-mysql php-phpseclib php-tcpdf php7.0-bz2 phpmyadmin0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.Need to get 12.8 MB of archives.After this operation, 48.2 MB of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 http://ftp.de.debian.org/debian stretch/main amd64 dbconfig-common all 2.0.8 [617 kB]Get:2 http://ftp.de.debian.org/debian stretch/main amd64 dbconfig-mysql all 2.0.8 [996 B]Get:3 http://ftp.de.debian.org/debian stretch/main amd64 libjs-underscore all 1.8.3~dfsg-1 [63.8 kB]Get:4 http://ftp.de.debian.org/debian stretch/main amd64 libjs-sphinxdoc all 1.4.9-2 [69.5 kB]Get:5 http://ftp.de.debian.org/debian stretch/main amd64 php7.0-bz2 amd64 7.0.27-0+deb9u1 [9,982 B]Get:6 http://ftp.de.debian.org/debian stretch/main amd64 php-bz2 all 1:7.0+49 [5,048 B]Get:7 http://ftp.de.debian.org/debian stretch/main amd64 php-mysql all 1:7.0+49 [5,052 B]Get:8 http://ftp.de.debian.org/debian stretch/main amd64 php-phpseclib all 2.0.4-1 [178 kB]Get:9 http://ftp.de.debian.org/debian stretch/main amd64 php-tcpdf all 6.2.12+dfsg2-1 [7,891 kB]Get:10 http://ftp.de.debian.org/debian stretch/main amd64 phpmyadmin all 4:4.6.6-4 [3,911 kB]Fetched 12.8 MB in 1s (10.4 MB/s)Preconfiguring packages ...Selecting previously unselected package dbconfig-common.(Reading database ... 46349 files and directories currently installed.)Preparing to unpack .../0-dbconfig-common_2.0.8_all.deb ...Unpacking dbconfig-common (2.0.8) ...Selecting previously unselected package dbconfig-mysql.Preparing to unpack .../1-dbconfig-mysql_2.0.8_all.deb ...Unpacking dbconfig-mysql (2.0.8) ...Selecting previously unselected package libjs-underscore.Preparing to unpack .../2-libjs-underscore_1.8.3~dfsg-1_all.deb ...Unpacking libjs-underscore (1.8.3~dfsg-1) ...Selecting previously unselected package libjs-sphinxdoc.Preparing to unpack .../3-libjs-sphinxdoc_1.4.9-2_all.deb ...Unpacking libjs-sphinxdoc (1.4.9-2) ...Selecting previously unselected package php7.0-bz2.Preparing to unpack .../4-php7.0-bz2_7.0.27-0+deb9u1_amd64.deb ...Unpacking php7.0-bz2 (7.0.27-0+deb9u1) ...Selecting previously unselected package php-bz2.Preparing to unpack .../5-php-bz2_1%3a7.0+49_all.deb ...Unpacking php-bz2 (1:7.0+49) ...Selecting previously unselected package php-mysql.Preparing to unpack .../6-php-mysql_1%3a7.0+49_all.deb ...Unpacking php-mysql (1:7.0+49) ...Selecting previously unselected package php-phpseclib.Preparing to unpack .../7-php-phpseclib_2.0.4-1_all.deb ...Unpacking php-phpseclib (2.0.4-1) ...Selecting previously unselected package php-tcpdf.Preparing to unpack .../8-php-tcpdf_6.2.12+dfsg2-1_all.deb ...Unpacking php-tcpdf (6.2.12+dfsg2-1) ...Selecting previously unselected package phpmyadmin.Preparing to unpack .../9-phpmyadmin_4%3a4.6.6-4_all.deb ...Unpacking phpmyadmin (4:4.6.6-4) ...Setting up php-tcpdf (6.2.12+dfsg2-1) ...Setting up php-phpseclib (2.0.4-1) ...Setting up libjs-underscore (1.8.3~dfsg-1) ...Setting up libjs-sphinxdoc (1.4.9-2) ...Processing triggers for php7.0-fpm (7.0.27-0+deb9u1) ...Processing triggers for man-db (2.7.6.1-2) ...Processing triggers for hicolor-icon-theme (0.15-1) ...Setting up dbconfig-common (2.0.8) ...Creating config file /etc/dbconfig-common/config with new versionSetting up php-mysql (1:7.0+49) ...Setting up php7.0-bz2 (7.0.27-0+deb9u1) ...Creating config file /etc/php/7.0/mods-available/bz2.ini with new versionSetting up dbconfig-mysql (2.0.8) ...Setting up php-bz2 (1:7.0+49) ...Setting up phpmyadmin (4:4.6.6-4) ...Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.confCreating config file /etc/dbconfig-common/phpmyadmin.conf with new versionCreating config file /etc/phpmyadmin/config-db.php with new versionchecking privileges on database phpmyadmin for [email protected]: user creation needed.granting access to database phpmyadmin for [email protected]: success.verifying access for [email protected]: success.creating database phpmyadmin: success.verifying database phpmyadmin exists: success.populating database via sql...  done.dbconfig-common: flushing administrative passwordProcessing triggers for php7.0-fpm (7.0.27-0+deb9u1) [email protected]:~#

From: till at: 2018-03-18 10:56:01

Then your base system uses non-standard apt settings which suppress the dialog. The tutorial here is based on a standard Debian system and on such systems, you will see the questions as shown in the tutorial.