This howto describes the installation of MemorySurfer with Apache under Debian 10.

open a terminal window and change into the directory.

[user@linux ~]$ cd Downloads/

downloading the .tar.xz file is probably done with a browser, but it could be done in the terminal too

[user@linux ~/Downloads]$ wget

Then check the file size.

[user@linux Downloads]$ ls -l
total 28
-rw-r--r--. 1 user user 41736 Jun 7 18:34 MemorySurfer.tar.xz

Check the SHA256.

[user@linux Downloads]$ sha256sum MemorySurfer.tar.xz
078c35f969770e2f74f8e91bea3b13901b4116076cb9a34b13f6b72135890275 MemorySurfer.tar.xz

Decompressing is probably better done in Files. But here is how to do it in the terminal:

[user@linux Downloads]$ xz -d MemorySurfer.tar.xz
[user@linux Downloads]$ ls -l
total 78528
-rw-r--r--. 1 user user 293376 May 21 19:08 MemorySurfer.tar
[use@linux Downloads]$ tar xf MemorySurfer.tar
[user@linux Downloads]$ ls -l
total 78524
drwxr-xr-x. 6 user user 4096 May 21 13:54 MemorySurfer
-rw-r--r--. 1 user user 293376 May 21 19:08 MemorySurfer.tar

Now change into the 'Debian' folder

[user@linux Downloads]$ cd MemorySurfer/Debian/

Eventually need to install make and gcc.

[user@linux ~/Downloads/MemorySurfer/Debian]$ sudo apt-get update [user@linux ~/Downloads/MemorySurfer/Debian]$ sudo apt-get install make [user@linux ~/Downloads/MemorySurfer/Debian]$ sudo apt-get install gcc

Then compile the program

[user@linux ~/Downloads/MemorySurfer/Debian]$ make
gcc -Wall -g -O0 -c ../memorysurfer.c
gcc -Wall -g -O0 -c ../imf/indexedmemoryfile.c
gcc -Wall -g -O0 -c ../imf/sha1.c
gcc -Wall -g -O0 -o memorysurfer.cgi memorysurfer.o indexedmemoryfile.o sha1.o -lm
[user@linux ~/Downloads/MemorySurfer/Debian]$ ls -l
total 448
-rw-rw-r--. 1 user user 36128 May 21 19:25 indexedmemoryfile.o
-rw-r--r--. 1 user user 532 May 18 22:49 makefile
-rwxrwxr-x. 1 user user 189456 May 21 19:25 memorysurfer.cgi
-rw-rw-r--. 1 user user 209400 May 21 19:23 memorysurfer.o
-rw-rw-r--. 1 user user 9312 May 21 19:25 sha1.o

now installing the web server

[user@linux ~/Downloads/MemorySurfer/Debian]$ sudo apt-get install apache2

copy the executable into cgi-bin/

[user@linux ~/Downloads/MemorySurfer/Debian]$ sudo cp memorysurfer.cgi /usr/lib/cgi-bin/

enable the CGI modul

[user@linux ~/Downloads/MemorySurfer/Debian]$ sudo a2enmod cgi [user@linux ~/Downloads/MemorySurfer/Debian]$ systemctl restart apache2

copy the favicon and the .css file into the html/ folder

[user@linux ~/Downloads/MemorySurfer/Debian]$ cd .. [user@linux ~/Downloads/MemorySurfer]$ sudo cp favicon.ico ms.css /var/www/html/

now create the folder were the .imsf files are stored

[user@linux ~/Downloads/MemorySurfer]$ cd /var/www/ [user@linux www]$ sudo mkdir memorysurfer [user@linux www]$ sudo chown www-data:www-data memorysurfer/

now the server should work - enter the following in the address bar of your browser

Jun 07, 2020