Making A Pi Server

By mandclu, Wed, 09/30/2020 - 07:54

The idea: set up an inexpensive Raspberry Pi as a web server, for personal projects.

  • Originally planned to use a Pi 3+ B (because of cost) but got a deal on a Pi 4 B kit for only a little more, so decided to go with the newer model, for the faster processor. The kit came with the Pi itself, a case, power supply with switch, memory card, heat sinks, fan, cables, and more
  • Decided to go with CentOS server as the operating system, as this seemed most in line with the intended use. Went with the standard elements of a Drupal-intended stack: Apache, PHP, MariaDB, etc.
  • Since ordering, found some test results that indicate the Micro SD card speed can make a huge difference. Made an impulse buy to get a bigger, faster card, but may save that to try an build out a performance-optimized version of the server: running nginx, with an 8 GB Pi 4, potentially pare down some of the fun extras on the current server, etc
  • Other potential future directions: using PoE to power future Pi servers, having a Pi for Solr, possibly Node.js for headless apps, Varnish or nginx as a reverse proxy, possibly Ansible and/or Kubernetes for abstraction
  • CentOS definitely takes some getting used to: things are in different places, certain log directories aren't present by default, and get deleted on restart, so you have to override configuration files to ensure they get created, so your applications will run as expected

Other random notes:

  • Originally bought a Labists kit because it seemed cheaper than buying all the parts individually. That said, I can't say I was blown away by the quality of the case. On the contrary, the fan got really loud after a couple of weeks, sounding like a screaming animal. Labists were kind enough to send me a replacement fan, and while so far it seems more robust than the original fan, it's also noticeably louder, even in quiet mode. I ended up ordering a new case that feels more solid, has a larger fan and is totally silent. Recommended. Also, while the kit was worth buying once, unless you need all the cables, I wouldn't go that route again. Many cases come with most of what the kit has (minus the Pi, obviously) so in future I'll probably just get a Pi board and then a case

Comments

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.