While it’s easily cleared by a malicious person, this can easily extend the usefulness of your history file with the information of when you ran that command.
This works in bash v3 and up.
If you’d like to add the timestamping to all users on the machine, the file you’d want to edit is probably /etc/profile. If [...]
Posted on September 4th, 2008 by Phil Dufault
Filed under: Linux, Shell | 1 Comment »
I wanted to mention that I’ve been looking for something like for this a bit — a USB key that comes with a way to install multiple Linux distributions. While at work, we primarily use Gentoo, we still have a Ubuntu server or CentOS install to do occasionally, and it would be nice to have [...]
Posted on August 7th, 2008 by Phil Dufault
Filed under: CentOS, Linux, Ubuntu | 5 Comments »
There seems to be not a lot of information on Google about this, thus, I post.
At my work, the majority of our servers have hot-swappable drive bays — however, Linux doesn’t usually automatically notice the drive is gone. Worse, sometimes it doesn’t even notice new drives hooked up.
Now, SCSI and SAS both support hot-plugging [...]
Posted on August 4th, 2008 by Phil Dufault
Filed under: CentOS, Gentoo, Linux, Redhat, Ubuntu | 9 Comments »
To install libtidy in PHP5, it’s really quite easy.
Make sure your /tmp directory doesn’t have something like noexec set on it, otherwise this would be more difficult.
Here’s the install command:
pecl install http://pecl.php.net/get/tidy-1.2.tgz
Find where your main php.ini file is:
root@server [~]# php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
Add the module to your [...]
Posted on July 26th, 2008 by Phil Dufault
Filed under: CentOS, Linux, PHP, Redhat | 3 Comments »
I find it shocking how many people don’t know about this neat Linux key combination that let’s you execute various low level commands regardless of the system’s state (as long as it’s running and hasn’t panicked.)
From the Wikipedia page:
It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.
How [...]
Posted on July 19th, 2008 by Phil Dufault
Filed under: CentOS, Gentoo, Linux, Redhat, Ubuntu | 1 Comment »
This might sound strange, as people usually want to fix or prevent these from happening, I’m trying to test/ create a method of logging kernel panic messages to a remote logging server. All of the existing tutorials I found on the net were for Linux 2.4, or were incomplete.
My method involves creating a Linux [...]
Posted on July 17th, 2008 by Phil Dufault
Filed under: CentOS, Gentoo, Linux, Redhat, Ubuntu | No Comments »
Here’s my little guide for upgrading a CentOS server to a grsec-patched kernel. At the time of this writing, this was the latest stable grsec patch available.
Fetch the sources:
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.5.tar.bz2
wget http://grsec.linux-kernel.at/grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Extract:
tar xjf linux-2.6.24.5.tar.gz
gzip -d grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Patch the kernel:
patch -p0 < grsecurity-2.1.11-2.6.24.5-200804211829.patch
cd linux-2.6.24.5 && make clean && make mrproper
Copy the previous kernel config to use:
cp [...]
Posted on June 26th, 2008 by Phil Dufault
Filed under: CentOS, Linux, Redhat | 1 Comment »