LAMP on a low-end Raspberry Pi?
bikegremlin
ModeratorOGContent Writer
No, I did not google.
Yet.
Did anyone install something like LAMP on a low-end Raspberry PI?
Does it work OK for PHP "websites" (MySQL won't be needed most probably)?
Which "install" should I try?
Thanks in advance for any help and tips.
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
Comments
Which Pi are you looking at ? Have seen YT videos where folks have used Pi Zero all the way upto Pi4,
I used to host a small-ish site on Pi 3B, Ubuntu 18.04 ( this was late 2018/early 19).
I like this guy's videos
blog | exploring visually |
No idea. It's on my desk, and I'm supposed to make it run. LOL.
Will probably connect it to a monitor in the morning and give it a go if possible. It has a HDMI outlet and USB ports.
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
Tested on raspberry pi 3: https://somik.org/ubuntu-18-04-install-llmp-stack/
If you can run it on a low end VPS, you can run it on a raspberry pi 3 or above. Performance is good for low traffic websites (or personal sites).
I ran from a microSD card. Do not that you may want to run it from a USB 3.0 drive or SSD if possible (and your raspberry pi has a USB 3.0 port).
Websites have ads, I have ad-blocker.
It is intended to run offline, locally, connected to a big screen for some presentation/service.
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
Pic of the pi ?
blog | exploring visually |
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
I wont recommend using the "offical" case. It sucks. Not enough airflow and the pi heats up. Also recommend using a fanless tiny heatsink on the pi CPU. Pi 4 heats up a lot compared to Pi 3 and consumes a lot of power. You also need to run it using the "official" power supply as most standard type c power supply cannot provide enough power for it. It needs 5.25V at 3A+
Something like this the following pic. Second picture is the type of heatsink case I use with my raspberry pi 4.
Websites have ads, I have ad-blocker.
That is sound advise
blog | exploring visually |
As long as you run it off a SATA ssd not SD card it should OK.
True, with probably only a Gig of RAM on the Pi, extra Swap on SSD would also help
blog | exploring visually |
Does it need to be an official Raspberry Pi, or is a cheaper alternative allowed as anecdotal "yes, it works"?
For a couple of years I had my children give their friends an Orange Pi Zero for their birthdays (the 512 meg version, mind you; 256 meg would be cheaping out on the wrong parts). I'd put in an "A1" app-class uSD card flashed with Yunohost running mail, Matrix, Nextcloud, Wordpress and the like. Having it combined with a domain of my children's choosing gave it a personal touch.
Taking for granted there would hardly ever be more than a handful visitors/users, the most important caveats were:
I didn't test the boards to their limits, neither did I run any yabs on them.
edit - quoterepair
edit more: Nextcloud and Wordpress would require MariaDB, while Matrix-synapse runs on Postgres. All in all, they were not speed monsters, but I was pleasantly surprised what possibilities there are with such a low powered board.
This is still in the "draft" version.
Nothing is defined, nor set in stone.
Roughly: the idea is to run a simple map "website" (PHP, but no DB) for users via a big touch screen (so, one user at a time).
Maybe it will be connected to the Net, but that's not 100% clearly defined yet.
My task was to see if that stuff can run on the Pi that we have at the moment (no guarantees that it will end up being used by the end).
As far as I understand, as it is, with a SD card, it should be able to run LAMP.
That's a start, and we'll see about what we'll go with and how the Pi wors with its current setup.
(It does have its own power supply - a Pi "charger" with a USB-C connector).
Relja
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
LAMP on a Raspberry Pi 3? We can go lower than that. I run it on a "Raspberry Pi Zero 1 W" which also has TasmoAdmin for controlling Tasmota plugs in house.
Stop the planet! I wish to get off!
Jeez, that's high end equipment guys! I have an original Model B Pi. Must dust down "Orac" and fire it up again, with DietPi
It wisnae me! A big boy done it and ran away.
NVMe2G for life! until death (the end is nigh)
Experience man... Did burn a few SD cards before finding out that heat is not a friend of SD cards...
No need. MicroSD is enough for regular use. I have 4xPi 3s running fully of microSD cards 24/7 for over 2 years. As long as the program does not write to the card very often, modern micro SD cards are good enough for these types of operations. Yes, it will be slow but will do fine in a pinch.
Agreed here. The USB out on router is not enough even for my ESP32 board...
That's some "low-end-hosting" you got going on in there! My Pi zero 1w is unofficially retired as I just got my Pi 2w.
Time for an upgrade! Get the new Pi 5. I have yet to get one myself but I hear good things about it (except for the price...)
https://www.raspberrypi.com/products/raspberry-pi-5/
Websites have ads, I have ad-blocker.
Ahh, don't you understand my username?
RPi 5=megabucks
Wasted on me,with my single FullHD plasma TV.
It wisnae me! A big boy done it and ran away.
NVMe2G for life! until death (the end is nigh)
It's a bad idea
Amadex • Hosting Forums • Wie ist meine IP-Adresse? • AS215325
Forum for System Administrators: sysadminforum.com
i was also tempted to buy a Pi Zero 2W, but I got discouraged by the same problems which put me away in buying a Pi 4 or Pi 5 later - that's temperatures. Yes, those come with more power, but also come with more heating and thermal throttling. Personally I love passing cooling - to leave them hidden in some corner of the room and forget about them. Besides, I don't really need all that computing power in such a small form-factor, nor do I need all that 4K video and whatnot.
I stopped at Pi 3 used for Retropie (on which I have an aluminium case) and Pi Zero 1W (on which I use the official plastic case). I do not intend to buy any newer version of Raspberry Pi due to temperatures. My attention nowadays started going into NanoPi boards, for keeping things low, small, and cheap
Here is an uptime of that Raspberry Pi Zero 1W:
Stop the planet! I wish to get off!
Yours is 4, so isn't a low-end one, actually.
Yes, it will work even for heavier stuff. I know a guy, who uses some Pis as a CCTV DVRs (security surveillance) in his office.
Raspberry Pi hosting is even offered as a service - collocation / dedicated:
If lazy, contact Selectel support and ask what are the typical software installs they offer for Pi 4:
https://selectel.ru/en/prices/
Modern microSD cards are getting less and less reliable, unfortunately.
Besides the amount of data written and free space available, temperature is also important.
☰ Probably the best Black Friday storage offers — AMD EPYC VDSes with NVMe slices (ref) from 250GB to 4TB and 500GB–10TB SAN disk. / Big HDD storage VPSes (ref) from $2.42/month per TB. / Storage dedis and hybrid VPS (SSD + HDD) are there as well.
I intend to do something like that too, with an automatic upload of the data into some cloud, or store it on an external HDD. I need to find the time for it.
Stop the planet! I wish to get off!
IIRC, this is one of the popular options for that: https://www.home-assistant.io/installation/raspberrypi/
☰ Probably the best Black Friday storage offers — AMD EPYC VDSes with NVMe slices (ref) from 250GB to 4TB and 500GB–10TB SAN disk. / Big HDD storage VPSes (ref) from $2.42/month per TB. / Storage dedis and hybrid VPS (SSD + HDD) are there as well.
Well, I have managed to install an Apache web server and PHP.
PhpMyAdmin install was a bit problematic, but that probably won't be needed anyway.
MySQL might have been installed properly, but I haven't tested that.
The unit does overheat in the original case.
It works very slowly when trying to use its crhomium browser (gets stuck/hung up on a lot of web pages - when opening one page). The uBlock installed on that browser doesn't seem to be blocking any ads (LES and BikeGremlin sites work wonderfully though ).
Will see when Gox returns from holiday if that's good for him, and if he ends up using it at all.
It took a few hours for me to get it to this stage (didn't have access to a separate computer for googling - that was my biggest problem really).
So far so good.
Relja of House Novović, the First of His Name, King of the Plains, the Breaker of Chains, WirMach Wolves pack member
BikeGremlin's web-hosting reviews
Congratulations, some headway indeed!
If open to lemp, webinoly in u 22.04 arm works quite well…
Or
HestiaCP on Debian 12 / U 22.04 arm. You can opt for apache install in the script
Makes the job easier
blog | exploring visually |
Even more lightweight but more limiting: I used to install Lighthttpd on my Rpi 3B+
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
If you wish to run a desktop on a Pi it works, but expect no more than some decent performance. A Raspberry Pi weights less than 50 grams, so everything ran on it needs to be light, while modern browsers tend to be... bloated.
With regards to uBlock, try the lightweight version as it would be more suitable on a lightweight Pi.
Stop the planet! I wish to get off!
Dear Biciklo Gremlin, try HestaCP. It supports ARM cpu.
Amadex • Hosting Forums • Wie ist meine IP-Adresse? • AS215325
Forum for System Administrators: sysadminforum.com
I believe I run it on the first gen RPi. No problem if your load is minimal.
The all seeing eye sees everything...
That's not been my experience...I've thrown out a handful of SD cards over the last couple years. What you say about don't write too often is precisely the issue...it's only a matter of time till it craps itself & you're always hoping there isn't some rogue software writing logs all the time or whatever. It can be fine even for years as you say but been on the losing side of that roll of dice once too often.
Eventually decided to just spend the 25 bucks on an adapter & ssd - crucially makes the entire pi feel tangibly faster too. But I also get that its not cheap especially when kitting out a cluster
Still have two on SD cards where I just don't care (pikvm - usually off, and ADS-B receiver which whatever).
The best porn is 460p anyways!!!
Free Hosting at YetiNode | Cryptid Security | URL Shortener | LaunchVPS | ExtraVM | Host-C | In the Node, or Out of the Loop?
The yeti is old-schooled. The yeti knows. 🍻
Stop the planet! I wish to get off!