A while ago I thought it would be a good idea to make a backup of my Linux server by just dumping the complete disk to a file. In retrospect, it would have been much easier had I just dumped the individual filesystems.
When I finally got around to using this backup, long after the 10GB disk had perished I realized that to use the loopback device to mount a filesystem it actually needs a filesystem to mount. What I had was a disk image, including partition table and individual partitions. To further complicate matters the data partition was also not the first partition inside this image.
For reference, I created this image using the Unix ‘dd’ tool:
Today I’ll be showing you how to monitor MySQL with Munin on a DirectAdmin platform. I’ve tested this setup for a customer on a CentOS box. It should be fairly easy to adapt this to Debian. You probably won’t even need to change credentials at all on a Debian box given the fact that it has an /etc/mysql/debian.cnf file by default. Although I’m not sure DirectAdmin puts it to good use. Any Debian/DirectAdmin users out there? Feel free to comment.
Let’s start off by checking the proper MySQL login credentials on our CentOS/RHEL box:
From time to time I work on remote servers and some times it would be very useful to be able to mount the remote file system on my local machine. Recently I found sshfs, which is a filesystem client based on the SSH File Transfer Protocol and since most *nix like servers; Linux, FreeBSD, NetBSD, OpenBSD servers with OpenSSH installed already support this protocol it is very easy to set up – Read: on the server side there’s nothing to do, setup or configure. On the client side mounting the filesystem is as easy as logging into the server with SSH.
Win4lin, KVM, QEMU, Virtualbox and Xen are all widely used technologies, used in virtual servers. Fairly often a virtual server run from within a loop filesystem and generally start with a fairly small file (1GB is big for a normal file, but not when it is pretending to be an entire filesystem!)
I set out to accomplish a (seemingly) simple task: Install CentOS 5.4 with KVM Virtualization on a system and then create a CentOS 5.4 KVM VM with virtio Net and Disk drivers.
It turns out that there is more to this task than meets the eye. So, here’s my step by step procedure.
Step 1: Install Centos (Redhat 5.4) with KVM Virtualization on a Intel VT or AMD Pacifica enabled server (I used a Intel Core 2 Duo E6420/2GB/120GB SATA system)
rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
cd /etc/yum.repos.d
wget http://dev.centos.org/centos/5/CentOS-Testing.repo
yum --disablerepo=* --enablerepo=c5-testing update php
There are many guys asking me how to install OpenVPN on CentOS 5.2/5.4. I have a server with that system (minimal installation) exactly and I cannot find an all correct guide for this setup step. So I decide to write this post.
You cannot count on the post to explain what OpenVPN is. But if you just wanna a simple guide for installation, you’ve got it.
Preparation:
1 A server running with CentOS 5.2/5.4. I don’t know which services you’ve installed, so I have to install all necessary components by bash command. You can skip that command if you know that is installed.
2 A KVM, an SSH client or another way to connect to your server.
3 You must know how to use tool vi to edit file.
Setup guide:
wget www.whatismyip.com/automation/n09230945.asp -O - -o /dev/null
Getting PAM Authentication to work
Client side:
# Prompt for username/password at startup time auth-user-pass
Server side:
# This enables username/password checks. plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so system-auth
Note that this is a change; the old setting of
# This used to enable username/password checks -- it no longer works! plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so login
...no longer seems to work.
Note that this means you have to start your openvpn client with an interface which permits you to be prompted for the username and password combination; the only one I know about is the openvpn command line client itself. Notably the SLED one for SLED 10.0 didn't work.