This howto describes the installation of MemorySurfer with Apache under Raspberry Pi OS.
If you have Git installed cloning the repository is very convenient (and provides the most recent version) (otherwise look here for the download instructions).
$ git clone https://github.com/lopul/MemorySurfer.git
Cloning into 'MemorySurfer'...remote: Enumerating objects: 811, done.
remote: Counting objects: 100% (173/173), done.
remote: Compressing objects: 100% (173/173), done.
remote: Total 811 (delta 113), reused 0 (delta 0), pack-reused 638
Receiving objects: 100% (811/811), 582.55 KiB | 6.07 MiB/s, done.
Resolving deltas: 100% (518/518), done.
Now change into the 'RasPiOS' folder
$ cd MemorySurfer/RasPiOS/
Eventually need to install make and gcc.
$ sudo apt-get update
$ sudo apt-get install make
$ sudo apt-get install gcc
Then compile the program
:~/MemorySurfer/RasPiOS $ make
gcc -Wall -g -O0 -c ../memorysurfer.cgcc -Wall -g -O0 -c ../imf/indexedmemoryfile.c
gcc -Wall -g -O0 -c ../imf/sha1.c
gcc -o memorysurfer.cgi memorysurfer.o indexedmemoryfile.o sha1.o -lm
:~/MemorySurfer/RasPiOS $ ls -l
total 2416-rw-r--r-- 1 pi pi 69052 May 26 02:46 indexedmemoryfile.o
-rw-r--r-- 1 pi pi 1317 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
$ sudo apt-get install apache2
copy the executable into cgi-bin/
:~/MemorySurfer/RasPiOS $ sudo cp memorysurfer.cgi /usr/lib/cgi-bin/
enable the CGI modul
$ sudo a2enmod cgi
$ sudo systemctl restart apache2
copy the favicon, the .css and the .js file into the html/ folder
:~/MemorySurfer/RasPiOS $ cd ..
:~/MemorySurfer $ sudo cp favicon.ico ms.css ms.js /var/www/html/
now create the folder were the .imsf files are stored
$ cd /var/www/
:/var/www $ sudo mkdir memorysurfer
to give the webserver (www-data) access to the folder
:/var/www $ sudo chown www-data:www-data memorysurfer/
:/var/www $ ls -l
total 8drwxr-xr-x 3 root root 4096 Jan 9 16:23 html
drwxr-xr-x 2 www-data www-data 4096 Feb 6 03:56 memorysurfer
now the server should work - enter the following in the address bar of your browser
localhost/cgi-bin/memorysurfer.cgi
Feb 06, 2022