Skip to main content

How to update your Ubuntu server efficiently

Maintaining your Ubuntu server is essential to ensure it operates smoothly, stays secure, and benefits from the latest features. Whether you're managing a server for personal projects or enterprise-level applications, regularly updating your system is a critical best practice. Here’s a straightforward guide to updating your Ubuntu server effectively and efficiently, with a focus on the benefits of chaining commands.

 

Best practices for business efficiency and security in managing user accounts in Ubuntu

In today’s digital landscape, effective management of user accounts is pivotal for maintaining both operational efficiency and security within an organisation. Ubuntu, a popular Linux distribution, offers robust tools and commands that enable administrators to oversee user accounts seamlessly.

Troubleshooting PHP 8.3 mbstring issues on Ubuntu with Nginx

Maintaining a Drupal site is usually smooth sailing once the environment is properly set up. However, even in a stable environment, updates to modules can sometimes reveal underlying configuration issues that weren't apparent before. This was the case when I updated a contrib module on a Drupal 10.3 site, which suddenly started throwing errors related to the mbstring PHP extension.

 

Upgrading Nginx on Ubuntu to due vulnerabilities CVE-2024-32002, CVE-2024-32004 and CVE-2024-32465

The current Nginx version running is 1.18.0.  It seems like the Nginx version from the default Ubuntu repositories is still 1.18.0, which might not have the latest security patches. To resolve this, you can add the official Nginx repository to get the latest stable version.

 

1. Backup your current Nginx configuration

It's a good practice to back up your current Nginx configuration before making any changes:

Overcoming startup challenges with Apache Solr on Ubuntu 24.04

Recently, after upgrading to Ubuntu 24.04, we encountered a significant challenge with our Apache Solr service—it refused to restart. This post documents the steps I took to diagnose and resolve the issues, providing a clear guide for anyone facing similar troubles.

 

Initial troubleshooting

The journey began with a simple command to check the status of our Solr service:

How to empty a file on your server

Managing files on a server often includes tasks like clearing logs or resetting configuration files. If you need to empty a file without deleting it, there are several quick and efficient methods to achieve this.

Recently, during a review of log files, I noticed an unusually large file: access_ssl_log.processed, which was a substantial 8.77 GB. After reviewing and backing up the data, I needed to empty the file to free up space and maintain server performance.

Checking if a file exists using command line queries in Ubuntu with Nginx

On a server directory with over 100,000 PDF files, I needed to verify the existence of specific documents. Whether there are a few hundred or whatever the number of files, this article explores the practical use of command-line tools to quickly ascertain whether a file is present. In the area of server management or application development, especially on systems like Ubuntu equipped with Nginx, it's crucial to perform routine checks to ensure that all necessary files are in place.

Create a copy of files that go to the tmp directory

To review the content of files being generated in the /tmp directory on an Ubuntu server before Microsoft Defender removes them, you can use several approaches.  Following is the approach we took.

 

Real-Time Monitoring

You can set up a script to monitor the /tmp directory and log the contents of new files. Use inotifywait to watch for new files and then copy them to another directory for review.

Install inotify-tools:

Subscribe to Ubuntu