2021-09-10-Install-thttpd-Raspberry-Pi-OS.txt Raspberry Pi OS - 32 bit This was tested on a Raspberry Pi 3 Model B Rev 1.2, Revision a22082, with a 32 GB microSDHC card, running 2021-05-07-raspios-buster-armhf-full.zip. Changes from the Raspberry Pi 400 install are minimal, consisting of: a change in the files that were downloaded and installed because the files didn't exist, and the change in how to change the $PATH to add "/home/local/sbin:/home/local/bin:" because of where I moved the "thttpd" install, so the web site would still be there after a change in the OS, since "/home" is the only directory that one can keep, as all of the others are over written. ***************************** Programs that need to be added to Raspberry Pi OS for "thttpd" to compile: pi@frank-desktop:~$ pi@frank-desktop:~$ sudo apt update pi@frank-desktop:~$ pi@frank-desktop:~$ sudo apt install gcc make make-doc autoconf automake libtool flex bison glibc-doc whois pi@frank-desktop:~$ Adding "whois" will let you lookup IP Addersses of visitors to your "World Wide Website"! ***************************** Changing the built in $PATH to add "/home/local/sbin:/home/local/bin:" to the beginning of the PATH. pi@raspberrypi:~$ pi@raspberrypi:~$ $PATH bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games: No such file or directory pi@raspberrypi:~$ On the Raspberry Pi OS the built in "PATH" is stored in "/etc/profile" on two different lines. One will have to add "/home/local/sbin:/home/local/bin:" to the beginning of the quote. PATH="/usr/local/sbin://usr/local/bin: ...", to: PATH="/home/local/sbin:/home/local/bin:/usr/local/sbin: ...". pi@raspberrypi:~$ pi@raspberrypi:~$ cd /etc pi@raspberrypi:/etc $ pi@raspberrypi:/etc $ sudo nano profile Add "/home/local/sbin:/home/local/bin:" to the beginning of both: PATH="/home/local/sbin:/home/local/bin:/usr/local/sbin: ..." lines and save (control-o) and exit (control-x). Then type: "$PATH" at the command prompt. pi@raspberrypi:/etc $ pi@raspberrypi:/etc $ $PATH bash: /home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games: No such file or directory pi@raspberrypi:/etc $ Make sure everything is right! Then restart the computer and check the "$PATH" again to make sure "/home/local/sbin:/home/local/bin:" are there at the beginning of PATH. The computer has to be restarted so it can read the "profile" file. *****RESTART***** ***************************** I really liked when the "Geany" program loaded the "Install Program" since the bottom window could be opened as a terminal. I then moved the separation bar up so I would have more lines in the terminal. Then it was easy to copy the commands from the upper window with the instructions and paste them into the bottom window. On a paste, one does not have to be at the exact spot because it will be inserted wherever the cursor is sitting. It took me around two hours to get through all of the instructions. The main thing is to not hurry, and make sure you pick up all of the commands. On the Raspberry Pi you will have "pi" rather than "frank", and there are a few places you will have to input your own words. The only time I had to open a new terminal window was when I started the "test" and at that point the terminal will lock up because "thttpd" is running in it. At this point one has to start a new terminal window and then enter: "ps -e" which will list all of the PID numbers that are running. Then it is the process of finding the right numbers to: "sudo kill xxxx xxxx". The first run will be "sudo" and "thttpd" that one will need to kill. The second time will be "thttpd_wrapper" and "thttpd" that one needs to kill, since we are doing a progressive test to see that everything is working. After "thttpd" is killed, (usually 2 numbers), the terminal will come back. To get "httpd" on the "World Wide Web" one has to make some changes in the router and I listed the changers of three different old routers that I have so one should be able to get an idea of what needs to be changed. Even on my oldest router, I usually get the same IP Address every time I connect to the router with it running "DHCP", but sometimes my printer ends up on a different address and I have to figure out where it is. My Raspberry Pi 4B that is running my thttpd web site, I set up as static so it's IP Address stays the same. HTTP uses Port 80, so the router has to be able to let that port connect through the router to the "World Wide Web". With a 1 Gigabit connection the complete IPv4 Address can be checked in 45 minutes. and a 10 Gigabit connection with several machines can do the job in 4.5 minutes, that is just checking one port address for each address. It's kind of like, "Knock, Knock,is any one home?" If your server is up and running and connected, it is, "Some one is Home!", and you will get a line in your log file. Https://news.netcraft.com - August 2021 Web Server Survey - 25th August, 2021 In the August 2021 survey we received responses from 1,211,444,849 sites across 263,733,974 unique domains and 11,327,711 web-facing computers. This reflects a loss of 4.99 million sites, but a gain of 1.64 million domains and 67,600 computers. At this point you should be able to change to the Raspberry Pi 400 directions and install "thttpd" and be up and running. Frank Anderson, AC0XL