Howto's and FAQ's

Keyboard shortcuts for Bash

PDF

The BASH shell has some build-in commandline keyboard shortcuts. Some of them might not work if you are logged in through ssh, it depends on how the keys are mapped.

Tags:
 

High Available NFS using DRBD and Heartbeat

PDF
NFS is a widely used network filesystem protocol allowing the client to access files over the network as if they are locally stored. To avoid the NFS share to become a SPOF (Single Point Of Failure) you can create a high available NFS share using DRBD and Heartbeat.

First we install the necessary packages on two servers:
 

Securing SSH with IPTABLES

PDF
Securing ssh access to your server is important. Every second your system can be a target for dictionary attacks by someone who want to get into your system via ssh. Therefor you should always take precautions like some basic security options i.e. disabling ssh root access and limit ssh access to certain users.

If you take a look at /var/log/secure you might see a lot of Failed password for.... entries on your system:
 

The Magic SysRequest key

PDF

Although very rare Linux might get stuck as well and won't respond to keystrokes or other user input. In the worst case there is a kernel crash, sometimes with a kernel crash dump on the console, probably caused by an unstable driver or hardware problems.
If you are lucky the system stucks but you are able to login from a remote machine by ssh. You can kill the process kill -9 ... or reboot the system shutdown -r now. Most of the times a jam is caused by one or more processes consuming too many resources. Symptoms are extreme high CPU usage, high load, high memory usage, a high queue of waiting processes etc. If there are no resources left the kernel might still be running but the system doesn't respond to keystrokes, CTRL+ALT+DEL won't help and login from an other system with ssh is also impossible, as there are no resources left to start a new shell.

 

MySQL master master replication

PDF

MySQL master-master replication (or multi master replication) offers a high availability failover solution. Other then in a master-slave replication setup you can write to all member master servers. Every master server is also a slave at the same time. Although all master server can write I would suggest to use only one active master server for writes and the other master be a passive master for reads and become active if the other server fails. With some monitoring scripts the passive master can become active within a fraction of a second.

 

Create and use self-signed SSL Certificate with Apache

PDF
A self-signed SSL Certificate can be used for testing purposes or on websites where the visitors are people who know you and trust you. For situations where you ask for credit card or other payment information I strongly advice you to use a signed certificate (Make sure openssl is installed on your system, on a typically installation of CentOs it is installed by default) The first step is to generate the private key:
Tags:
 
Page 4 of 9

Search







You are here: Home Howtos and FAQs