This howto describes the installation of MemorySurfer with Apache under Raspbian.

open a terminal window and change into the directory.

pi@raspberrypi:~ $ cd Downloads/

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

pi@raspberrypi:~/Downloads $ wget

Then check the file size.

pi@raspberrypi:~/Downloads $ ls -l
total 32
-rw-r--r-- 1 pi pi 38976 May 26 02:16 MemorySurfer.tar.xz

Check the SHA256.

pi@raspberrypi:~/Downloads $ sha256sum MemorySurfer.tar.xz
f2db680aa7e0775220d46c1f9f1eaf7852c7c8e395c3189a0e48514a86575634 MemorySurfer.tar.xz

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

pi@raspberrypi:~/Downloads $ xz -d MemorySurfer.tar.xz
pi@raspberrypi:~/Downloads $ ls -l
total 248
-rw-r--r-- 1 pi pi 252928 May 26 02:16 MemorySurfer.tar
pi@raspberrypi:~/Downloads $ tar xf MemorySurfer.tar
pi@raspberrypi:~/Downloads $ ls -l
total 252
drwxr-xr-x 7 pi pi 4096 May 26 01:21 MemorySurfer
-rw-r--r-- 1 pi pi 252928 May 26 02:16 MemorySurfer.tar

Now change into the 'Raspbian' folder

pi@raspberrypi:~/Downloads $ cd MemorySurfer/Raspbian/

Eventually need to install make and gcc.

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo apt-get update pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo apt-get install make pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo apt-get install gcc

Then compile the program

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ make
gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wall -g -O0 -fsanitize=address -static-libasan -c ../memorysurfer.c
gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wall -g -O0 -fsanitize=address -c -static-libasan ../imf/indexedmemoryfile.c
gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wall -g -O0 -fsanitize=address -static-libasan -c ../imf/sha1.c
gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard -Wall -g -O0 -fsanitize=address -static-libasan -lm -o memorysurfer.cgi memorysurfer.o indexedmemoryfile.o sha1.o
pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ ls -l
total 2416
-rw-r--r-- 1 pi pi 69052 May 26 02:46 indexedmemoryfile.o
-rw-r--r-- 1 pi pi 832 Mar 10 01:28 makefile
-rwxr-xr-x 1 pi pi 1956608 May 26 02:46 memorysurfer.cgi
-rw-r--r-- 1 pi pi 418592 May 26 02:46 memorysurfer.o
-rw-r--r-- 1 pi pi 19724 May 26 02:46 sha1.o

now installing the web server

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo apt-get install apache2

copy the executable into cgi-bin/

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo cp memorysurfer.cgi /usr/lib/cgi-bin/

enable the CGI modul

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo a2enmod cgi pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ sudo systemctl restart apache2

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

pi@raspberrypi:~/Downloads/MemorySurfer/Raspbian $ cd .. pi@raspberrypi:~/Downloads/MemorySurfer $ sudo cp favicon.ico ms.css /var/www/html/

now create the folder were the .imsf files are stored

pi@raspberrypi:~/Downloads/MemorySurfer $ cd /var/www/ pi@raspberrypi:/var/www $ sudo mkdir memorysurfer pi@raspberrypi:/var/www $ sudo chown www-data:www-data memorysurfer/

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

Jun 12, 2020