LISTSERV for Linux is developed primarily under Red Hat Enterprise Linux (RHEL) and its "debranded" counterpart, CentOS.  The Ubuntu distribution of Linux poses some interesting challenges, in that its designers have chosen different options for various programs needed by LISTSERV.

L-Soft engineers installed a non-GUI copy of Ubuntu Server 18.04 LTS on a Microsoft Windows Server 2016 Hyper-V virtual machine, Generation 1 VM, with 2GB RAM and 2 virtual processors.  This is probably overkill if the machine is intended for low-volume mailing and no DBMS connections, etc.  (If you are running on modern, dedicated hardware rather than in a virtual machine environment, you are probably already starting with 4GB or more of RAM and at least 8 CPU cores, so you may not have to worry about this.)

When we started the Ubuntu installation, we took all the defaults offered at install time, other than manually configuring the eth0 Internet connection and setting the initial user.  We did not change the default disk partitioning.

After the Ubuntu installation completed and the machine was rebooted, we found that the following packages were required to be installed for use with LISTSERV:

Apache web server:

sudo apt-get install apache2

Postfix mail server:

sudo apt-get install postfix

GCC Gnu C compiler:

sudo apt-get install gcc

OpenLDAP development libraries:

sudo apt-get install libldap2-dev

The "Make" utility:

sudo apt-get install make


Apache


Unlike the default in Red Hat Enterprise Linux (RHEL) and CentOS, Apache is not installed as "httpd".  It is installed as "apache2".  Thus, the base configuration file is found in /etc/apache2, and it is called apache2.conf.

Apache is not set up to serve CGI by default, nor does it serve CGI from the expected /var/www/cgi-bin directory as in RHEL/CentOS.  The Ubuntu designers have chosen to place the cgi-bin directory under /usr/lib/cgi-bin .  When running the LISTSERV installation kit, be on the lookout for being asked where to place the WA cgi; you will have to change the directory specified to /usr/lib/cgi-bin .

In order to make Apache serve the CGI, you will also need to add a symbolic link as follows:

me@ubu:~$ cd /etc/apache2/mods-enabled
me@ubu:~$ sudo ln -s ../mods-available/cgi.load


and then restart Apache:

me@ubu:~$ sudo apachectl restart


Otherwise you will simply get a 404 when you attempt to reach the WA interface.

Postfix


When you install Postfix, you will be asked what type of installation you want to make.  We recommend starting with "Internet Site" so you don't have to reconfigure it later.  (You may have to tweak Postfix for other reasons, but it is simplest to start with a site that will accept inbound and outbound mail from the Internet without having to go through the extensive Postfix configuration file to set that up.)

OpenSSH


OpenSSH is actually already installed when you finish the base Ubuntu Server installation, but we recommend that you disable the ability to log in as 'root'.  This is done by finding the "PermitRootLogin" configuration variable in /etc/ssh/sshd_config and changing its value to "no":

PermitRootLogin no


Then save the file and restart sshd with

me@ubu:~$ sudo systemctl restart sshd

Ubuntu's "Uncomplicated Firewall" (ufw)


Ubuntu Server 18.04 LTS has a firewall utility that is not enabled by default.  You enable it with

me@ubu:~$ sudo ufw enable


after which you can do the following:

me@ubu:~$ sudo ufw allow Apache
me@ubu:~$ sudo ufw allow Postfix
me@ubu:~$ sudo ufw allow OpenSSH


You can then query it to see if that all took:

me@ubu:~$ sudo ufw status


which should result in something like this:

me@ubu:~$ sudo ufw status

Status: active

To                         Action      From

--                         ------      ----

Apache                     ALLOW       Anywhere

OpenSSH                    ALLOW       Anywhere

Postfix                    ALLOW       Anywhere

Apache (v6)                ALLOW       Anywhere (v6)

OpenSSH (v6)               ALLOW       Anywhere (v6)

Postfix (v6)               ALLOW       Anywhere (v6)

Install LISTSERV from the Linux-RH7x64.bin.gz download kit


If you have completed the above tasks, this should be a fairly straightforward installation, although you will want to note the following:

When you reach the question

What is the path to your CGI directory? (The web interface will be installed there.)
[/var/www/cgi-bin]


you must change the path to /usr/lib/cgi-bin , as noted above.

See the LISTSERV 17.0 Simplified Install Manual for Unix for installation instructions for LISTSERV.

Setting up LISTSERV as a SystemD service under Ubuntu


Again, this differs from the instructions for RHEL/CentOS because Ubuntu keeps the unit files in a different place.

First, copy the sample service definition found in /home/listserv/listserv-systemd-service.sample to /lib/systemd/system/listserv.service , and change its permissions to 644.

me@ubu:~$ sudo cp /home/listserv/listserv-systemd-service.sample /lib/systemd/system/listserv.service

me@ubu:~$ sudo chmod 644 /lib/systemd/system/listserv.service


Then enable the service:

me@ubu:~$ systemctl enable listserv.service


You should then be able to start, restart, stop, and query the status of LISTSERV with the following commands:

me@ubu:~$ systemctl start listserv.service

me@ubu:~$ systemctl restart listserv.service

me@ubu:~$ systemctl stop listserv.service

me@ubu:~$ systemctl status listserv.service