Have you ever had the need to show the full username in ps
output? Here is how. Normally in Bash, the ps
output truncates an username to 7 characters and a +
sign, e.g IUSR_60+. In cases when you absolutely need the full username in ps, this can be pretty annoying. Here is how to display longer usernames in ps:
Bash function to generate a random alphanumeric string
Create a random string in Bash easily. You can use this Bash function in your .bashrc
file to generate a random string of alphanumeric characters. This comes in handy when you need to generate a long, secure password for example. Adjust to your needs.
Release hold queue email in Postfix – postsuper
How to flush Postfix’ mail queue from the command line and delete all mail from the queue? Easy, use the Postfix postsuper
command as explained in this post. The postsuper
command controls different types of queues in the Postfix mail system, like the deferred or hold queue. This post shows you some Postfix queue operations to maintain your mail servers.
Recursive scp and symlinks
Recursive scp without following symbolic links. TL;DR: when using recursive scp, symbolic links aren’t preserved and are copied as if they are normal directories. So you have to look for another solution to recursively transfer symlinks over ssh. Here is one: Tar over ssh!
Install Varnish Cache on CentOS 6.7
In this article I’ll show you how to install Varnish Cache on CentOS, version 6.7 in this case. Varnish is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Because Varnish Cache is really, really fast, web applications like WordPress, Drupal and Joomla can greatly benefit from Varnish Cache.
Install Elasticsearch on CentOS 6.7
How to install Elasticsearch on CentOS 6.7. Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time. In this article we’ll go over the steps to install Elasticsearch on CentOS 6.7.
Generate pseudo-random passwords with OpenSSL
OpenSSL comes in handy when you need to generate random passwords, for example for system accounts and services. In this short post I’ll give you a quick example on how to generate random passwords with OpenSSL in Linux (Bash), Windows and PHP…
Turn off swap
Not every Linux server I maintain needs to have a swap partition and to start swapping. For instance, the MySQL servers all have more than enough RAM on board to do their work. Yet, when a swap partition is enabled Linux starts swapping, which may degrade MySQL database performance…
Redirect HTTP to HTTPS
In this post I provide you various HTTP to HTTPS redirection methods, for Windows Server IIS and Linux Apache. Use these examples to your advantage to secure the traffic between your visitors and your website.
Monit monitoring on Ubuntu 14.04 VM on Hyper-V
In this post you’ll learn about setting up a Monit monitoring service for your websites and services. Monit is a free and open source service monitoring application which can perform various event-based actions. Monit can send email notifications, restart a service or application, or take other responsive actions. We set Monit up on a Ubuntu 14.04 VM, built on Hyper-V. And we use Monit to monitor several websites, and send out notifications on downtime.
How to restore a deleted Open-Xchange context?
How to restore, or recover, an accidentally deleted OX context. If you’ve accidentally deleted an Open-Xchange context (contextid), then that is bad… Here is how to recover a deleted OX context and filestore… Assuming you make backups of course.
Convert decimal to hex in Bash?
A quicky for my archives: convert decimal to hex in Bash, and convert hexadecimal to decimal, in Bash. In mathematics and computing, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0-9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a-f) to represent values ten to fifteen. If you want to convert hexadecimal values to decimal and decimal values to hexadecimal, here’s how. All on the bash prompt…
Sysadmins of the North goes global!
How to set up a global Geolocation DNS load balancing Varnish Cache Content Delivery Network with Bind9, geo-ip database, Varnish Cache and DigtalOcean. DIY High-Availability for your website!
How to delete all MAILER-DAEMON emails in Postfix queue
How to delete all MAILER-DAEMON emails from your Postfix queue, when it matches a sender or recipient email address condition. When a large scale spam run was sent through your mail servers, you need to clean up and remove those spam messages. Doing so guarantees normal, valid email messages being sent quickly, and the spam messages never leave your queue. In Postfix, there are various similar commands to delete messages from the Postfix mail queue. Based on the Message-ID and/or email address…