Author Topic: Which Linux server distro? (rolling distro, LTS, or regular)  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6680
  • Country: ro
Which Linux server distro? (rolling distro, LTS, or regular)
« on: September 20, 2020, 03:56:04 pm »
Which Linux server would you recommend in order to host a very small personal blog (less than 100 hits a day), possible with an attached forum for the blogged articles?

Preferably to keep it under the desk, no renting cloud machines hosting or virtual private servers.  The hardware must be small (because the electricity cost is about $1.5/year for each watt), so the two options for hardware will be either a Raspberry Pi (about 10W/64bit/4x1.5GHz/8GB) or an old HP laptop (about 35W/32bits/1x1.73GHz/2GB).

So far familiar with Debian and Red Hat.  Looking for a rolling distro, maybe, so I won't have to install yearly, or so.  Not sure if I should rule out distros based on the Rolling/Long Time Support/Stable flavors?

It will run headless, administered by SSH only.  I'm familiar with networking and Linux, but I'n neither a sysadmin nor a netadmin by profession, so I'll prefer something that just works, without breaking at updates, and preferably without much compiling, fiddling and such.

Main job of the server will be to host a webserver (Nginx?), a MySQL (or MariaDB) and a WordPress blog + SMF2.1 forum on top.

- Which hardware would you recommend, Raspberry Pi 4 vs. old 32 bits HP Laptop, or maybe something else?
- Which Linux distro would you go with for a headless server and minimal fuss?
« Last Edit: September 20, 2020, 03:58:11 pm by RoGeorge »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4455
  • Country: nz
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #1 on: September 20, 2020, 06:42:12 pm »
Have you measured the actual power use from those machines?

I don't know how old your laptop is or what power it will use but I have a NUC with i7-8650U 32 GB RAM 512 GB SSD that draws 6W at idle (which your machine will be 99.99% of the time).

I just measured my 4 GB Pi 4 and it's 3.9 W at idle.

[Edit: oops .. that's not idle. One core is busy running "unattended-upgrade". It's been a while since I used it. I'll have to wait a bit for that to finish and check again]

Both of those are measured at the wall, so include power supply losses.

So by your power price figures that's $3 a year difference. Not much in it to worry about.

As for distribution ... I keep it simple and use Ubuntu on everything, where available (that's what is on my Pi 4), and Debian elsewhere.

Code: [Select]
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 4.19.80-v8-james #16 SMP PREEMPT Thu Oct 31 02:46:08 MDT 2019 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

Here's another SBC I have that is also quad core 1.5 GHz also uses around 5W:

Code: [Select]
bruce@HiFiveU:~/programs$ uname -a
Linux HiFiveU 4.15.0-00049-g79a9752848da #3 SMP Thu Mar 7 21:56:58 UTC 2019 riscv64 GNU/Linux
bruce@HiFiveU:~/programs$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
Codename:       sid
[code]
« Last Edit: September 20, 2020, 06:57:01 pm by brucehoult »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4455
  • Country: nz
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #2 on: September 20, 2020, 11:25:47 pm »
Ok, now it's finished updating (and I've woken up) the Pi 4 is using 2.95 W.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6680
  • Country: ro
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #3 on: September 21, 2020, 09:13:49 pm »
Have you measured the actual power use from those machines?

I don't know how old your laptop is or what power it will use but I have a NUC with i7-8650U 32 GB RAM 512 GB SSD that draws 6W at idle (which your machine will be 99.99% of the time).

Yes, measured with an old energy meter left from when the meters were replaced with digital ones.  Anchored on 2 random wood boards instead of a wall, still measures correctly even if it looks barbaric.   ;D

1071444-0

I've start measuring the power because, at first, I've tried a former motherboard/proc/RAM/HDD/GPU left from a former desktop upgrade.  After installing and running for a couple of hours, the room went hotter than usual.  It was an AMD Athlon64 3000+ with 1.256GB RAM, an 120GB IDE 7200 and a Radeon HD3850 AGP GPU that were drawing no less than 160W in idle running!!

Most of those were for the video card, but even after removing the video card, it was still drawing about 60W.  Given the price of electricity alone, it will totally make sense to buy a RPi.

Then tried the old HP laptop, which was needing only half of those 60W, so not sure if to slowly spend money in time with electricity, or to put some money upfront for a new RPi.

Those 5-6W measured are quite surprising, are you sure the meter is measuring correctly at low power?  Asking because the standby of a power supply alone is expected to use about 5W or so.

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4455
  • Country: nz
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #4 on: September 22, 2020, 02:54:26 am »
I don't know how I'd check the accuracy of my power meter without trying it against another one, but then how would I know that one was correct?

Kill-a-Watt have a pretty good reputation, I think?

I haven't been able to quickly find official idle power specifications for Intel NUCs, but Apple does publish these numbers for Mac Mini and models since 2014 use 6W at idle.

https://support.apple.com/en-us/HT201897
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6680
  • Country: ro
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #5 on: September 22, 2020, 12:42:16 pm »
Such low power is quite impressive, good to know, thanks.  I guess that power supply I was measuring must be really bad.

For now a RPi 4 w 8GB of RAM and an 128GB uSD card seem like the most reasonable choice.

Thought the SMF forum is reasonable usable even with a RPi B/700MHz/256MB.  Before buying yet another board, maybe I should try to install everything on that 1.73GHz/32bits/2GB/30W laptop and see how responsive will be.  It feels wasteful to buy more hardware while a laptop is just sitting there doing nothing.

Offline madires

  • Super Contributor
  • ***
  • Posts: 8129
  • Country: de
  • A qualified hobbyist ;)
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #6 on: September 22, 2020, 01:40:14 pm »
The problem with old PCs and notebooks is that they are power-hungry. So better go for something modern. Anyhow, a RasPi should be fine for running a small blog, and it's a low-power device. Next point is about hits/day. If you calculate with about 100 real hits a day then add another 1000 for crawlers and bots scanning your webpage for known vulnerabilities. The internet isn't a friendly place. And regarding linux distris I'd recommend Debian or Devuan (w/o systemd).
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 914
  • Country: fr
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #7 on: September 22, 2020, 02:39:28 pm »
ubuntu is ok for lot of stuff, it just works out of the box, we lazy people love that
centos is ok for some devs also.
you like stability, debian or freebsd for sec stuff like firewalls
regards,pierre
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #8 on: September 22, 2020, 02:57:05 pm »
go with the LTS versions, as at least then you only will be upgrading every 3 to 4 years, and the software is reasonably well maintained, and security patches are rolled out quite fast. Rolling release you will probably get the same, but not quite as stable, but no regular updates that will stop and start services, though LTS is easy to automatically schedule updates for the middle of the night, apply and restart the unit without attention.

Just gone from Mint 17 to Mint 20, and literally it was like changing the tablecloth, cutlery, crockery all at once, but keeping the food in the plate as is.  New OS, now on a SSD, and the browser barely noticed it, my podcast software noticed it could now do SSL2 and higher, and caught up fast. Fixed a scanning issue, now no longer have to pull out an older distro to scan, and then had to fix the Canon D660U, as it snapped the belt. But used the HP scanjet 3400C instead, but the Canon has a built in film scanner, so fix it it was, than goodness for an online service manual showing how to open it.

I still use an even older LTS on a laptop, because it has some software that I use every so often, but I need to keep the version of Virtualbox there stable for it, so it never connects via anything other than USB, so is very stable in operation. Yes, I hate upgrading, only do so after end of support, and it works, as the computer is a tool, an ends to a mean, not the system I want to work on, just with. Oh yes, I use a 32in colour TV set as monitor, it works well for me, not 4k, not 2k, but works well at a distance, and i no longer can focus to see flyspec anyway.
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 914
  • Country: fr
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #9 on: September 22, 2020, 03:02:30 pm »
regarding the hw, the pi should be the cheapest solution I guess, smallet power footprint also.just ssh into it and you're fine
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1765
  • Country: se
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #10 on: September 24, 2020, 10:53:55 am »
For the distro, I would go with an LTS e.g. Ubuntu Server 2004.1 LTS.

"I am not a sysadmin", fine, Ubuntu is easy.
But think of security, if you are opening this to the world.

As for the HW, I can confirm the power consumption of a NUC: one I have is IIRC about 5W in Idle (i5-4250U based), and orders of magnitude more powerful than any Pi.
I have used it as a Hyper-V host and Windows Server VM for years, with months of uptime.

Edit: 4250U, not 8250U
« Last Edit: September 24, 2020, 02:09:20 pm by newbrain »
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8129
  • Country: de
  • A qualified hobbyist ;)
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #11 on: September 24, 2020, 11:10:46 am »
There's also LTS for Debian: https://wiki.debian.org/LTS
 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #12 on: October 04, 2020, 04:14:35 am »
I run Ubuntu LTS on all of my Linux boxes, servers and workstations included.  I update them at my convenience.

If I am going to do anything public can access, I will not put that on my network and expose that to outside.  I'd rather pay monthly fee and have it hosted.  If you look at your firewall logs, you'll see your IP is accessed dozens of times a second.  That's how many automated hacking attacks there are.  They are just looking for an easy hole to exploit.  I don't want to give them a better chance by poking a hole on my firewalls. 
 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #13 on: October 05, 2020, 11:30:38 am »
Which Linux server would you recommend in order to host a very small personal blog (less than 100 hits a day), possible with an attached forum for the blogged articles?

I would stick with the two largest Enterprise Linux vendors - Red Hat and SUSE. Either with their direct Enterprise Linux offerings (RHEL/SLE) or (if the budget isn't there) stick with their free derivates CentOS and openSUSE Leap.

Many mentioned Ubuntu LTS but it's not in the same ballpark (only a small core set of packages is actually "LTS", and Canonical still sticks experimental stuff like ZFS support in what at the end of the day should be a stable distro).

In my experience, sticking with the enterprise stuff usually pays off.

Quote
Preferably to keep it under the desk, no renting cloud machines hosting or virtual private servers.  The hardware must be small (because the electricity cost is about $1.5/year for each watt), so the two options for hardware will be either a Raspberry Pi (about 10W/64bit/4x1.5GHz/8GB) or an old HP laptop (about 35W/32bits/1x1.73GHz/2GB).

Neither is a good option if reliability has any relevance for you.

I'd have a look at the HPE MicroServers, either the new MicroServer Gen10 or if you're short on cash then get a 2nd hand MicroServer Gen8. Both also offer iLO, HPE's remote management processor which allows for remote management of the hardware and offers a built-in KVM option.

Quote
So far familiar with Debian and Red Hat.  Looking for a rolling distro, maybe, so I won't have to install yearly, or so.  Not sure if I should rule out distros based on the Rolling/Long Time Support/Stable flavors?

If you want stability (which is usually important for a server that hosts something) then stay away from any form of rolling release.

Since you're familiar with RHEL then I'd go this route (RHEL or CentOS).

Quote
It will run headless, administered by SSH only.  I'm familiar with networking and Linux, but I'n neither a sysadmin nor a netadmin by profession, so I'll prefer something that just works, without breaking at updates, and preferably without much compiling, fiddling and such.

In this case I would seriously recommend you look at SUSE, either SLE or openSUSE Leap (stay away from Tumbleweed, though, as it's rolling release). SUSE Linux comes with YaST, an unique administration GUI which can be used in graphics and text mode and which allows you to make most administration tasks through a simple interface.

YaST works fine on a SSH text console.

I don't know any other Linux distro which offers something similar.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6830
  • Country: fi
    • My home page and email address
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #14 on: October 06, 2020, 06:08:53 pm »
(Admin hat on)

If you want the machine to work reliably without monitoring it 24/7, an important "trick" is to reconfigure the web server to use completely different trees than the distro defaults use.

The idea is that automatic updates and package installs work normally, but they do not actually change the behaviour of your web service.  To change the behaviour of your web service, you need to copy the relevant details from the distro configuration to the actual configuration; the same for the actual document root.  Also, instead of everything you might someday find useful being enabled, you only enable the services that are required right now.  This minimizes the attack surface, as well as reduces the impact and complexity of installing new packages.  (In particular, you don't need to check if a given package has an insecure web service component that is automatically enabled – see e.g. SageMath, many Java packages that include a Tomcat installation, etc.)

If using Apache, I recommend a minimal configuration for the default server, and doing the actual configuration in virtual host configurations using a dedicated user and group accounts.  (No, the virtual host does NOT run as that user and group.  You never want that; the server itself should NEVER EVER be able to overwrite its own configuration files, even less its binaries or script files.  Yes, this means you can no longer click on the web page to tell the web service to update itself, but it also makes it easy to detect and auto-remove script drops.)

The only thing when configuring an Apache virtual host you need to do as root/via sudo is to reload or stop/restart/start the entire web service.  (And that you can do with a trivial scriptlet pair, and sudo config that allows running the second one as root without password.)  This reduces the impact of admin errors (except for server downtime; configuration changes should be done via reload and not via restart or stop-start cycle, because only reload allows the existing configuration to continue if the modified configuration contains errors.)

I use Unix group permissions to manage maintainer access.  There are several "tricks" here too, from marking directories setgid (which causes all files to inherit the group from the directory, and not the user), to using newgrp to change the currently active group.  This way, users can modify the content as themselves.  In your case, considering there is likely just one admin user ever, this may not be too relevant.

I used to have a page about this, but other than being used as the Apache config on a few dozen public servers at my Uni, there wasn't that much interest in it, so it lapsed.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3819
  • Country: nl
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #15 on: October 31, 2020, 06:22:14 am »
I'd think you're probably best of with whatever Linux distro you're comfortable with, unless you think it's fun to learn package management and configuration for another Linux flavour. (Almost?) any Linux distro will have the packages you need for a web server.

If needed you can simply add another EUD50 linux computer to make redundancy, and the secondary takes over if the primary fails.

With two of them, you can also set them up to make daily or even hourly backups.
This way you can also "test" updates on the secondary computer.
Just make sure that "automatic" updates are rolled out on both systems at the same time.
 

Offline Trader

  • Frequent Contributor
  • **
  • !
  • Posts: 393
  • Country: us
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23093
  • Country: gb
Re: Which Linux server distro? (rolling distro, LTS, or regular)
« Reply #17 on: October 31, 2020, 10:27:47 am »
I use a Lenovo M600 box for Linux utility tasks like that. It’s small, silent and doesn’t take much energy. You can get them on eBay for about 100 GBP.

I suggest not bothering with a rolling distro for servers. Make it cheap to dispose of the OS and start again using ansible or something instead. You need a careful balance between security and reliability in such environments.  Thus I’d recommend CentOS.

Good points from Nominal Animal about group isolation etc. I usually add the users allowed to write the web content into www-data group and set up the virtual hosts in /srv/http/vhost/htdocs. I tend to use nginx rather than Apache.

But you could just say fuck it, throw all this away and pay digitalocean.com $5 a month to run this stuff on their cloud. Probably the best option.
« Last Edit: October 31, 2020, 10:29:49 am by bd139 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf