Howto's and FAQ's

Change the timezone of OpenVZ Containers

PDF

The system reads the timezone data from /etc/localtime, which is a symbolic link to a timezone file in the directory /usr/share/zoneinfo/ To Change the timezone of the container you should remove the symbolic link and create a new link to you preferred timezone in my case Europe/Amsterdam:

 

List all cron jobs for all users

PDF

To show the list of cronjobs you run crontab -l, which only shows the cronjobs of the current user. To list all cronjobs for all users you can write a little bash script and run it as superuser:

#!/bin/bash
#List all cron jobs for all users
for user in `cat /etc/passwd | cut -d":" -f1`;
do
crontab -l -u $user;
done

Tags:
 

Mount samba share inside an OpenVZ container

PDF
How to mount a samba share inside an OpenVZ container? cifs/smbfs is not virtualized therefor the mount command won't work and you can't just mount a samba share inside a container:
mount -t cifs [sambashare] [mountpoint]
this will result in a failure:
mount error: cifs filesystem not supported by the system
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
 

How to find out what process is keeping the filesystem busy

PDF
If you ever run in the situation where you try to unmount a file-system but the umount command tells you the 'device is busy' the fuser command might be helpful. fuser provides information about the process keeping the file-system busy by returning you the process-id's. Piping the process-id's to the ps command you can determine more information about each process.
 

Optimize website speed with mod_expire and mod_deflate

PDF

This tutorial explain how to speed up your Apache webserver with mod_deflate and mod_expire.
mod_expire controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

Like mod_gzip, mod_deflate allows you to compress files before they are served to the client, saving your server traffic.

Tags:
 

yum error: "error: no dbpath has been set"

PDF

Sometimes it happen that yum generates the error "error: no dbpath has been set" within your VPS. One thing that might solve the problem is to (re)create the special character devices /dev/random and /dev/urandom which provide an interface to the kernel's random number generator. File /dev/random has major device number 1 and minor device number 8. File /dev/urandom has major device number 1 and minor device number 9.

 
Page 2 of 9

Search







You are here: Home Howtos and FAQs