Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2024-12-12 16:07:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

Algaris wrote #338506:

Phasing is a process used by Ubuntu to gradually roll out updates to users. Instead of making updates available to all users immediately, they are rolled out in phases to a subset of users. This approach helps identify potential issues early on and ensures stability for the majority of users. If no significant issues are reported, the updates become available to all users over time.

Entitled ‘get off my lawn’ nerd moan incoming…

It’s stuff like this that really shows the difference between Ubuntu and e.g. Debian. I cannot imagine how many frustrated users out there were / are scratching their heads as to why such-and-such update wasn’t forthcoming when the Ubuntu packages site shows an updated version.

Anecdotally, Ubuntu (20.04) seems to have more frequent / regular updates than Debian (12). When I log into the few remaining Ubuntu servers I have in the fleet, there are almost always updates to apply. There’s a daily update check & install run in the small hours, and there’s still stuff to apply more often than not. I don’t object to installing updates – I like updates – but ffs let me have the updates if there are updates. I’m already on the free tier (5 seats; we use 2 of 5) for Ubuntu Pro and their ESM updates…here’s another frigging hoop to jump through to get the updates.

You’ve reminded me about another thing I was going to mention (file under ‘thin end of the wedge’). I wanted to install btop from packages on Debian & Ubuntu as a precursor to figuring out a source compile if I want the latest & greatest. Debian was absolutely painless:

$ sudo apt update && sudo apt install -y btop
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [39 B]
Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [27 B]                                                                                                                                     
Hit:6 http://repo.percona.com/pmm2-client/apt bookworm InRelease                                                                                                                                       
Hit:7 http://repo.percona.com/prel/apt bookworm InRelease                                                                                                                                              
Hit:9 http://repo.percona.com/ps-84-lts/apt bookworm InRelease                                                                                                                  
Hit:8 http://security.debian.org bookworm-security InRelease                                                    
Hit:10 http://repo.percona.com/telemetry/apt bookworm InRelease                                                 
Hit:11 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease                                  
Hit:12 https://repos.insights.digitalocean.com/apt/do-agent main InRelease                
Hit:2 http://mirrors.digitalocean.com/debian bookworm InRelease     
Get:13 https://apt.syncthing.net syncthing InRelease [15.7 kB]
Hit:3 http://mirrors.digitalocean.com/debian bookworm-updates InRelease
Hit:4 http://mirrors.digitalocean.com/debian bookworm-backports InRelease
Fetched 15.7 kB in 1s (13.1 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  btop
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 465 kB of archives.
After this operation, 1416 kB of additional disk space will be used.
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [39 B]
Get:2 http://mirrors.digitalocean.com/debian bookworm/main amd64 btop amd64 1.2.13-1 [465 kB]
Fetched 465 kB in 0s (3456 kB/s)
Selecting previously unselected package btop.
(Reading database ... 123475 files and directories currently installed.)
Preparing to unpack .../btop_1.2.13-1_amd64.deb ...
Unpacking btop (1.2.13-1) ...
Setting up btop (1.2.13-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.11.2-2) ...

Ubuntu LTS (20.04, or ‘LTS minus 2’ but still supported):

$ sudo apt update && sudo apt install -y btop
Hit:1 http://repo.percona.com/pmm2-client/apt focal InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu focal InRelease                                                                                                                                           
Hit:3 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease                                                                                                                                   
Hit:4 http://repo.percona.com/prel/apt focal InRelease                                                                                                                                                 
Hit:5 http://repo.percona.com/ps-80/apt focal InRelease                                                                                                                                                
Hit:6 http://repo.percona.com/telemetry/apt focal InRelease                                                                                                                                            
Hit:7 http://repo.percona.com/tools/apt focal InRelease                                                                                                                                                
Hit:8 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease                                                                                                                          
Hit:9 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease                                                                                                                                 
Hit:10 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                      
Hit:11 https://repos.insights.digitalocean.com/apt/do-agent main InRelease                                                                                                                             
Get:12 https://esm.ubuntu.com/apps/ubuntu focal-apps-security InRelease [7565 B]                                                                                                       
Get:13 https://apt.syncthing.net syncthing InRelease [15.7 kB]
Get:14 https://esm.ubuntu.com/apps/ubuntu focal-apps-updates InRelease [7456 B]
Get:15 https://esm.ubuntu.com/infra/ubuntu focal-infra-security InRelease [7450 B]
Get:16 https://esm.ubuntu.com/infra/ubuntu focal-infra-updates InRelease [7449 B]
Fetched 45.6 kB in 4s (10.9 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done

No apt package "btop", but there is a snap with that name.
Try "snap install btop"

E: Unable to locate package btop

The phrase No apt package "[…]", but there is a snap with that name is the pull quote. There’s a push toward snap for…so much stuff on Ubuntu. I realise it has advantages, but for nerdists like me who like change control, visibility and not having heaps of mounted opaque bullshit scattered around the filesystem, it’s so tiring. I deliberately stuck with Ubuntu 20.04 to minimise the snap stuff littering my servers, but I’m losing the battle there, clearly.

This is the push I needed to write the project strategy doc for the next two years. I’ll share it on the forum when it’s done. I will be re-applying to our pals at DigitalOcean to ask for more server magic beans, so the timing is good.

Spoiler: 2x Ubuntu servers will be decommissioned next year in favour of Debian.

Offline

#17 2024-12-13 16:53:38

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 279
Website Mastodon

Re: Adventures in Linux Land

Not to brag here, but my website server is running a cutting-edge 3.10 kernel. The C compiler is fully ISO C90 compliant, too. I thus avoid these pesky update concerns.

Offline

#18 2024-12-14 19:15:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

skewray wrote #338515:

I thus avoid these pesky update concerns.

I love the nihilism in this, by the way.

Offline

#19 2024-12-16 14:42:02

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: Adventures in Linux Land

skewray wrote #338515:

Not to brag here, but my website server is running a cutting-edge 3.10 kernel. The C compiler is fully ISO C90 compliant, too. I thus avoid these pesky update concerns.

Now that is pretty impressive and way beyond my knowledge or comfort zone.

gaekwad wrote #338528:

I love the nihilism in this, by the way.

🤣

Offline

#20 2024-12-16 14:46:27

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: Adventures in Linux Land

So, the other day I learnt the difference between /var and /srv.

The /var directory contains variable data files that change frequently as the system operates. This includes files like logs, caches, and temporary files generated by running applications and system processes.

The /srv directory is intended to store data for services that are provided by the system. This is service-specific data that is served to clients or users, such as websites, FTP files, or any other network services.

Looks like I’ve been doing it wrong using /var/www/html. Instead I should have been using /srv/www/html. Not that it matters I guess, but I’m going to use /srv/www/html from now on.

Offline

#21 2024-12-16 14:54:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,419
Website GitHub

Re: Adventures in Linux Land

I use /var/www. Mainly out of habit. Maybe when I rebuild the server I’ll switch to /srv.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#22 2024-12-16 14:56:56

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

Algaris wrote #338547:

So, the other day I learnt the difference between /var and /srv.

Looks like I’ve been doing it wrong using /var/www/html. Instead I should have been using /srv/www/html. Not that it matters I guess, but I’m going to use /srv/www/html from now on.

For what it’s worth, I use /var/www/. But then I’m also the person who compiles external stuff to /opt/ instead of the typical /etc/.

Further bedtime reading: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Offline

#23 2024-12-16 16:07:30

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 327
Website GitHub GitLab Mastodon Twitter

Re: Adventures in Linux Land

I am curious, why do you keep WWW assets outside of publisher’s private /home directory (/usr/home in FreeBSD).

Offline

#24 2024-12-16 16:13:48

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

Vienuolis wrote #338551:

I am curious, why do you keep WWW assets outside of publisher’s private /home directory (/usr/home in FreeBSD).

In my case, I have multi-tenant servers (i.e., >1 system user) and the www assets aren’t assigned to a system user. The www assets are owned by the web server, with access given to the PHP-FPM pool user. This keeps the system user (e.g., alice) and web server user (e.g., www-data) air gapped.

I have noticed web admin system control panels (e.g., cPanel & WHM) tend to steer admins towards using /home for www stuff, but that scares me.

Offline

#25 2024-12-16 16:47:19

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 279
Website Mastodon

Re: Adventures in Linux Land

gaekwad wrote #338552:

I have noticed web admin system control panels (e.g., cPanel & WHM) tend to steer admins towards using /home for www stuff, but that scares me.

cPanel users don’t have superuser privs, so there isn’t much choice here. (Well, creating a user-accessible folder in /var would work but be weird. Consider /dev/urandom > /var/user/x.)

Last edited by skewray (2024-12-16 16:56:38)

Offline

#26 2024-12-16 19:35:37

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

skewray wrote #338553:

cPanel users don’t have superuser privs, so there isn’t much choice here.

That explains it. That extra level of opinionated middleware that a lot of administrators rely on as a safety net is such a fluffy mess sometimes – if I get called to fix something, I tend to use raw CLI commands, and the number of times I’ve had to unpick the changes that cPanel & WHM have made and take an unorthodox approach so I don’t break something is disturbingly high.

Offline

#27 2024-12-18 16:05:13

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: Adventures in Linux Land

Today I learn’t about zombie processes. I’m constantly amused by Linux terminology. I encountered one while doing an update and rebooting my Ubuntu server. It took me a while to figure out what was going on.

——

A zombie process is a process in a Unix or Linux operating system that has completed execution (terminated) but still has an entry in the process table. This occurs because the parent process has not yet read the exit status of the terminated child process, using a system call like wait() or waitpid().

Key Characteristics of Zombie Processes:

1. State: The zombie process is in the Z (zombie) state, visible in tools like ps under the “STAT” column.

2. Minimal Resources: Zombies do not use CPU or memory resources (other than the small process table entry).

3. Cause: They are created when a child process ends, and its parent has not handled the SIGCHLD signal or called wait() to clean up the child’s resources.

4. Temporary Nature: They usually disappear quickly once the parent process collects the child’s exit status.

Why Are They a Problem?

Resource Exhaustion: If many zombie processes accumulate, they can consume all available process table entries, preventing new processes from being created.

Indicative of Bugs: Persistent zombies often indicate a programming error in the parent process, such as failing to properly handle terminated child processes.

——

Textile Blockquotes are incredibly annoying to work with.

Last edited by Algaris (2025-03-13 16:04:14)

Offline

#28 2024-12-18 16:10:27

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 279
Website Mastodon

Re: Adventures in Linux Land

I’ve never seen a zombie movie where the reason given for the zombies is, “Zombies are created when a child dies, and their parents have not handled the death notice or waited to clean up the child’s belongings.”

Bizarre.

Offline

#29 2025-03-13 16:03:39

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: Adventures in Linux Land

I’m learning about manual partitioning when installing Linux and the benefits of separating out different elements into their own partitions.

I found this very handy tutorial to help me through the process.

Debian 10 Manual Partition for /boot, /swap, root, /home, /tmp, /srv, /var, /var/mail, /var/log

I’m using Debian 12 Bookworm but the principles seem to be the same as Debian 10 with only some minor differences.

How do other people partition their Linux installs? Any advice or pitfalls to be aware of?

Offline

#30 2025-03-13 16:11:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,700
GitHub

Re: Adventures in Linux Land

Algaris wrote #339277:

How do other people partition their Linux installs? Any advice or pitfalls to be aware of?

If I’m using a VPS, I let the vendor set the rules as it makes snapshot restore much more reliable (anecdata). If I’m building locally, I use the Debian graphical installer and leave as-is. If I’m setting up IoT stuff I tend to make it a bit more resilient and make /boot read only, which helps it recover when (if) the power goes out.

I’m currently fighting with Debian 12 on a Dell Optiplex with UEFI, cannot for the life of me get it to work after the install. I’m at the ‘getting very cross’ stage.

PS: don’t tell anyone just yet, but we had our DigitalOcean credit renewed for another year, which makes the next phase of (Debian; not Dell) server builds a lot more palatable.

Offline

Board footer

Powered by FluxBB