LAMP on a low-end Raspberry Pi?

bikegremlinbikegremlin ModeratorOGContent Writer
edited April 16 in Technical

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

«1

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

    Thanked by (1)bikegremlin

    Squats are the new Push-ups

  • bikegremlinbikegremlin ModeratorOGContent Writer

    @vyas said:
    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

    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).

    Thanked by (2)bikegremlin vyas

    Artificial intelligence is no match for our natural stupidity.

    Time flies like an arrow; fruit flies like a banana.

  • bikegremlinbikegremlin ModeratorOGContent Writer

    @somik said:
    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).

    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 ?

    Squats are the new Push-ups

  • bikegremlinbikegremlin ModeratorOGContent Writer

    @vyas said:
    Pic of the pi ?


    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.

    Thanked by (2)vyas bikegremlin

    Artificial intelligence is no match for our natural stupidity.

    Time flies like an arrow; fruit flies like a banana.

  • @somik said:
    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+

    That is sound advise

    Thanked by (1)bikegremlin

    Squats are the new Push-ups

  • havochavoc OGContent Writer

    As long as you run it off a SATA ssd not SD card it should OK.

    Thanked by (1)bikegremlin
  • vyasvyas OG
    edited April 16

    @havoc said:
    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

    Thanked by (1)bikegremlin

    Squats are the new Push-ups

  • wankelwankel OG
    edited April 16

    @bikegremlin said: 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)?

    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:

    • SD cards can run for a long time, but can fail without warning as well
    • A stable power supply is mandatory. USB-out on most routers is not enough

    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.

    Thanked by (1)bikegremlin
  • bikegremlinbikegremlin ModeratorOGContent Writer
    edited April 16

    @wankel said:

    @bikegremlin said: 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)?

    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:

    • SD cards can run for a long time, but can fail without warning as well
    • A stable power supply is mandatory. USB-out on most routers is not enough

    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

  • rootroot OG
    edited April 16

    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.

    Thanked by (3)vyas bikegremlin wankel

    How are you... online?

  • 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

    Thanked by (2)vyas bikegremlin

    It wisnae me! A big boy done it and ran away.
    NVMe2G for life! until death (the end is nigh)

  • @vyas said:

    @somik said:
    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+

    That is sound advise

    Experience man... Did burn a few SD cards before finding out that heat is not a friend of SD cards...

    @havoc said:
    As long as you run it off a SATA ssd not SD card it should OK.

    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.

    @wankel said:
    Taking for granted there would hardly ever be more than a handful visitors/users, the most important caveats were:

    • SD cards can run for a long time, but can fail without warning as well
    • A stable power supply is mandatory. USB-out on most routers is not enough

    Agreed here. The USB out on router is not enough even for my ESP32 board...

    @root said:
    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.

    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.

    @AlwaysSkint said:
    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

    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/

    Thanked by (1)bikegremlin

    Artificial intelligence is no match for our natural stupidity.

    Time flies like an arrow; fruit flies like a banana.

  • edited April 17

    @somik said: Time for an upgrade!

    Ahh, don't you understand my username? ;)
    RPi 5=megabucks :anguished:

    Dual 4Kp60

    Wasted on me,with my single FullHD plasma TV.

    Thanked by (1)bikegremlin

    It wisnae me! A big boy done it and ran away.
    NVMe2G for life! until death (the end is nigh)

  • rootroot OG
    edited April 17

    @somik said:
    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.

    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 :smirk:

    Here is an uptime of that Raspberry Pi Zero 1W:

    root@SmartHome:~# uptime
     03:05:44 up 82 days, 15:52,  1 user,  load average: 0.01, 0.03, 0.00
    

    How are you... online?

  • @bikegremlin said:
    Did anyone install something like LAMP on a low-end Raspberry PI?

    Yours is 4, so isn't a low-end one, actually.

    Does it work OK for PHP "websites" (MySQL won't be needed most probably)?

    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:
    Raspberry Pi 4 dedicated - collocation hosting

    Which "install" should I try?

    If lazy, contact Selectel support and ask what are the typical software installs they offer for Pi 4:
    https://selectel.ru/en/prices/

    @somik said:
    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.

    Modern microSD cards are getting less and less reliable, unfortunately.
    Besides the amount of data written and free space available, temperature is also important.

    Thanked by (1)bikegremlin
  • @DataRecovery said:
    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.

    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.

    How are you... online?

  • @root said:
    I intend to do something like that too, with an automatic upload of the data into some cloud

    IIRC, this is one of the popular options for that: https://www.home-assistant.io/installation/raspberrypi/

    Thanked by (1)root
  • bikegremlinbikegremlin ModeratorOGContent Writer

    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

    Thanked by (2)bikegremlin Ympker

    Squats are the new Push-ups

  • YmpkerYmpker OGContent Writer

    Even more lightweight but more limiting: I used to install Lighthttpd on my Rpi 3B+

    Thanked by (2)bikegremlin vyas
  • rootroot OG
    edited April 17

    @bikegremlin said:
    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 :) ).

    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.

    Thanked by (1)bikegremlin

    How are you... online?

  • @bikegremlin said:
    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.

    Dear Biciklo Gremlin, try HestaCP. It supports ARM cpu.

    Thanked by (1)bikegremlin
  • I believe I run it on the first gen RPi. No problem if your load is minimal.

    The all seeing eye sees everything...

  • havochavoc OGContent Writer

    @somik said:

    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.

    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).

  • @root said:

    @somik said:
    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.

    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 :smirk:

    Here is an uptime of that Raspberry Pi Zero 1W:

    root@SmartHome:~# uptime
     03:05:44 up 82 days, 15:52,  1 user,  load average: 0.01, 0.03, 0.00
    

    The best porn is 460p anyways!!!

    Thanked by (1)bikegremlin

    URL Shortener | YetiNode | Come join us on the MetalVPS IRC channel!!! | Don't be a jerk, let YetiNode do the work.

  • rootroot OG
    edited April 17

    @AuroraZero said:

    @root said:

    @somik said:
    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.

    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 :smirk:

    Here is an uptime of that Raspberry Pi Zero 1W:

    root@SmartHome:~# uptime
     03:05:44 up 82 days, 15:52,  1 user,  load average: 0.01, 0.03, 0.00
    

    The best porn is 460p anyways!!!

    The yeti is old-schooled. The yeti knows. 🍻

    Thanked by (2)vyas AuroraZero

    How are you... online?

Sign In or Register to comment.