Index of /dict-webinterface

      Name                                      Last modified       Size  Description

[DIR] Parent Directory 14-Mar-2022 23:31 - [   ] README.sdeb 16-Dec-2018 17:15 1k [   ] dictd-dicts-web1913.spec 14-Mar-2022 17:28 2k [   ] dictd-dicts-web1913-0.1.0-11mdk.sdeb 14-Mar-2022 17:29 12.5M [   ] dictd-dicts-web1913_0.1.0-11mdk_all.deb 14-Mar-2022 17:29 12.3M [   ] dictd-dicts-wn.spec 14-Mar-2022 17:49 2k [   ] dictd-dicts-wn-0.1.0-11mdk.sdeb 14-Mar-2022 18:04 9.2M [   ] dictd-dicts-wn_0.1.0-11mdk_all.deb 14-Mar-2022 18:04 8.9M [   ] dictd-dicts-easton.spec 14-Mar-2022 18:05 2k [   ] dictd-dicts-easton-0.1.0-11mdk.sdeb 14-Mar-2022 18:05 1.1M [   ] dictd-dicts-easton_0.1.0-11mdk_all.deb 14-Mar-2022 18:05 1.1M [   ] dict-webinterface.spec 14-Mar-2022 23:24 3k [   ] dict-webinterface-1.12.1+dfsg-8.sdeb 14-Mar-2022 23:25 210k [   ] dict-webinterface_1.12.1+dfsg-8_amd64.deb 14-Mar-2022 23:25 29k [   ] dict-webinterface.buildlog 15-Mar-2022 00:47 8k [IMG] dict-webinterface_1.12.1+dfsg-8_amd64.png 15-Mar-2022 01:29 208k [TXT] README.txt 15-Mar-2022 02:59 6k [TXT] README.html 15-Mar-2022 03:23 9k [   ] MD5SUM 15-Mar-2022 03:28 1k [   ] SHA1SUM 15-Mar-2022 03:28 1k [   ] SIZE 15-Mar-2022 03:28 1k

Building Webster's Hypertext Gateway for dictd on ubuntu 20.04


Building Webster's Hypertext Gateway for dictd on ubuntu 20.04




Build and Installation 
=======================

Packages :

   dictd-dicts-easton_0.1.0-11mdk_all.deb
   dictd-dicts-web1913_0.1.0-11mdk_all.deb
   dictd-dicts-wn_0.1.0-11mdk_all.deb
   dict-webinterface_1.12.1+dfsg-8_amd64.deb

Installation :

1. $ sudo apt install dict dictd dictzip

2. $ sudo dpkg -i dictd-dicts-web1913_0.1.0-11mdk_all.deb
   $ sudo dpkg -i dictd-dicts-wn_0.1.0-11mdk_all.deb
   $ sudo dpkg -i dictd-dicts-easton_0.1.0-11mdk_all.deb
  
   I made the following adjustment's :

   $ sudo vi /etc/dictd/dictd.conf 
		# Site section here:

		global {
		#listen_to 127.0.0.1
		# bind to local interfacea only
		}
		
		# Access section here:
		
		access {
		allow *
		allow localhost
		allow 127.0.0.1
		# this allows access only from local host
		allow inetd
		# this allows access from inetd server
		}
   This above config binds dictd to all interfaces and allows access
   from all network interfaces. Check with $ dict <word> to see if 
   it works.

3. The Webster's Hypertext Gateway for dictd 
   dict-webinterface_1.12.1+dfsg-8_amd64.deb is a hardwired binary
   which has its FQDN (Fully Qualified Domain Name) hostname
   compiled into the binaries :

   %define HOSTNAME	acer20.stokkie.net

   One will need to rebuild the 
   source package dict-webinterface-1.12.1+dfsg-8.sdeb using
   the tool /usr/bin/debbuild (See README.sdeb). Download 
   the perl script debbuild from here :
   ftp://crashrecovery.org/pub/linux/debbuild/v0.9.8/debbuild 

   -rwxr-xr-x  1 root root 70055 Jan 14  2021 debbuild*
   SHA1(debbuild)= f1ba556ec72d41810c2e07d852dd652ad545ca3c
   MD5(debbuild)= 69d071ad10bb4a25aa31ea75815f6e9e

   The contents of the source .sdeb package, which is also
   a tar file can be listed with :

   $ tar tvf dict-webinterface-1.12.1+dfsg-8.sdeb
-rw-r--r-- root/root    186312 2022-03-14 19:14 SOURCES/dict-webinterface.tar.gz
-rw-r--r-- root/root      8010 2022-03-14 21:19 SOURCES/dict-1.10-color-https-v2.patch
-rw-r--r-- root/root       518 2022-03-14 21:20 SOURCES/dict-1.10-br.patch
-rw-r--r-- root/root      1253 2022-03-14 21:23 SOURCES/dict-1.10-host.patch
-rw-r--r-- ubuntu/ubuntu  1406 2006-11-02 03:29 SOURCES/dict-favicon.ico
-rw-r--r-- ubuntu/ubuntu  4201 2020-09-11 03:38 SOURCES/penguin-s.gif
-rw-r--r-- root/root      2886 2022-03-14 23:24 SPECS/dict-webinterface.spec
   $ 

4. Setting up the perl script 'debbuild' to compile .deb binaries from
   RPMS source packages :

   $ sudo cp -p debbuild /usr/bin/debbuild
   $ sudo chmod 755 /usr/bin/debbuild
   $ sudo mkdir /usr/src/debian
   $ cd /usr/src/debian
   $ sudo mkdir BUILD BUILDROOT DEBS SDEBS SOURCES SPECS
   $ sudo apt-get install devscripts
   $ sudo apt-get install build-essential
   $ sudo apt-get install alien
   $ sudo apt-get install pax
   $ cd /usr/src/debian
   $ sudo tar xvf dict-webinterface-1.12.1+dfsg-8.sdeb
SOURCES/dict-webinterface.tar.gz
SOURCES/dict-1.10-color-https-v2.patch
SOURCES/dict-1.10-br.patch
SOURCES/dict-1.10-host.patch
SOURCES/dict-favicon.ico
SOURCES/penguin-s.gif
SPECS/dict-webinterface.spec
   $ cd SPECS/
   $ sudo vi dict-webinterface.spec

   adjust the FQDN hostname in the line with %define HOSTNAME into e.g.:
    
   %define HOSTNAME     dict.library.org
 
   when your webserver has this FQDN hostname configured, and works as such
   on the Internet. And also bump up the version numer from 8 to 9 :

   Release:        9
   
5. Prerequisite(s) for installation of apache2 on Ubuntu.
   Setting up your apache2 server :

   $ sudo apt install apache2 apache2-bin apache2-data apache2-utils
   $ sudo apt install libapache2-mod-php
   $ sudo a2enmod cgi
   $ sudo a2ensite default-ssl.conf
   $ sudo a2enmod ssl
   $ sudo systemctl restart apache2
 
   Next configure your certificates. One can e.g. obtain SSL certificates 
   from the letsencrypt.org ACME server. Or one can for tesing purposes
   create a Self-Signed SSL Certificate :

How To Enable HTTPS Protocol with Apache 2 on Ubuntu 20.04
https://www.rosehosting.com/blog/how-to-enable-https-protocol-with-apache-2-on-ubuntu-20-04/

6. Rebuilding dict-webinterface_1.12.1+dfsg-8_amd64.deb 

   $ cd /usr/src/debian/SPECS
   $ sudo sudo debbuild -v -ba dict-webinterface.spec

   See dict-webinterface.buildlog

   $ cd /usr/src/debian/DEBS/amd64
   $ sudo dpkg -i dict-webinterface_1.12.1+dfsg-9_amd64.deb 
Selecting previously unselected package dict-webinterface.
(Reading database ... 207941 files and directories currently installed.)
Preparing to unpack dict-webinterface_1.12.1+dfsg-9_amd64.deb ...
Unpacking dict-webinterface (1.12.1+dfsg-9) ...
Setting up dict-webinterface (1.12.1+dfsg-9) ...
   $ 
   $ dpkg -l | grep dict-webinterface
ii  dict-webinterface                          1.12.1+dfsg-9
                       amd64        Webster's Hypertext Gateway for dictd
   $ dpkg -L dict-webinterface
/.
/usr
/usr/lib
/usr/lib/cgi-bin
/usr/lib/cgi-bin/dict
/usr/lib/cgi-bin/http_webster
/var
/var/www
/var/www/html
/var/www/html/favicon.ico
/var/www/html/index.php
/var/www/html/picts
/var/www/html/picts/penguin-s.gif
    $
    $ dpkg-query -s dict-webinterface
Package: dict-webinterface
Status: install ok installed
Priority: optional
Section: System/Servers
Maintainer: Robert M. Stockmann 
Architecture: amd64
Version: 1.12.1+dfsg-8
Depends: dictd, dictd-dicts-web1913, dictd-dicts-wn, dictd-dicts-easton, 
 apache2, apache2-bin, apache2-data, apache2-utils, libapache2-mod-php, libc6
Description: Webster's Hypertext Gateway for dictd
 The Webster Hypertext Gateway interface provides a point-and-click client
 interface (for non-linemode browsers) for accessing various dictionary
 services on the Internet. It uses apache2 mod_cgi and interfaces
 with dictd which is open at port 2628.
 To use type the word for which you want the definition in the search
 window, click to select either an exact match or an approximate match,
 and then click on the "Look up definition" button. Words in the
 resulting definition are hypertext linked back into the dictionary,
 allowing you to use your mouse to access the definition of those
 related (and unrelated) words.
    $
  
That should do it. Here's a screenshot: 
dict-webinterface_1.12.1+dfsg-8_amd64.png

Robert M. Stockmann
Tue Mar 15 01:31:29 CET 2022