Some of my systems are logging this error:
su: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory
I already had the “locales” package installed, to create the file:
dpkg-reconfigure locales
Follow the prompts to choose your locale(s). Result:
cat /etc/default/locale
# File generated by update-locale LANG=en_US.UTF-8
Let’s say you run a front end system like a reverse proxy, load balancer or http accelerator (e.g. big-ip, squid, pound, varnish, apache, nginx, etc), which pass dynamic requests to back end application servers, then you’re likely to have to deal with your applications seeing client requests as coming from the IP(s) of your front end boxes.
This presents a slew of quality of life reducing issues, unless of course your back end system is Apache, in which case you can use mod_rpaf to make your life pleasant again.
Had to setup an FTP server at work (yuck), guides I found elsewhere didn’t do exactly what I was after, so it took some trial and error to achieve the setup I needed.
If you’re looking for a program and need to find a package that provides it, AND your package manager is APT (e.g. you’re running Debian or one of its many derivatives, like Ubuntu), you, Sir, got a couple of options.
One way is to search package contents online at debian.org, or you could use apt-file.
Setup a new backup server and getting the following error from Cron in /etc/cron.daily/logrotate:
error: error running shared postrotate script for /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log run-parts: /etc/cron.daily/logrotate exited with return code 1
With User Private Groups, umask of 002 or 007 makes more sense than the traditional umask of 022 when multiple users are working with shared files. Libpam-umask is handy for overriding the default umask setting.
Starting with Debian Lenny, libpam-umask is part of libpam-modules (which was auto installed on every Debian Lenny setup I’ve done so far), so just need to add the following to “/etc/pam.d/common-session”:
session optional pam_umask.so umask=002
For a server, I prefer to run the latest stable release of Debian, but once in a while I need a newer package than what’s available from the stable repository.
The solution is in the Apt How-To available from Debian. See section 3.8, title “How to keep a mixed system“.
Some time ago I was looking for tools to monitor network bandwidth usage by clients. Needed something to run on my super awesome Linux router/firewall (Vyatta) to see what everyone on the network is doing and on the Xen VM hosts to keep an eye on the virtual machines.
As always with Linux, there are lots of quality projects worth serious consideration, so the hardest part was to narrow the plethora of choices down to a manageable number to test.
I’m used to System V style commands used in Red Hat / Fedora and derivatives as well as SUSE, so I found Debian service management methods unintuitive at first.
Below are a couple of personal notes I made on the subject to help myself out, as I was getting used to the Debian way of things…