Nodes preparation

OS

Upgrade from Lenny to Squeeze

1. Modify /etc/apt/sources.list:

deb http://ftp.hk.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib

2. Upgrade:

apt-get update
apt-get install apt dpkg aptitude
aptitude full-upgrade

Prepare for OpenVZ

Install OpenVZ kernel:

apt-get install linux-image-2.6-openvz-686

Add these to /etc/sysctl.conf:

net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0

# Enables source route verification
net.ipv4.conf.all.rp_filter = 1

# Enables the magic-sysrq key
kernel.sysrq = 1

# We do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

Hostname

Use simple hostname:

node1:~# cat /etc/hostname
node1

node1:~# cat /etc/hosts
127.0.0.1       localhost
192.168.0.101   node1.example.com       node1
192.168.0.102   node2.example.com       node2

Mount point for OpenVZ use filesystem

Create mount point /vz for the filesystem that hold all VEs.

mkdir /vz

Packages

Setup NTP

apt-get -y install ntp

Check sync status:

ntpq -p

Setup SSH

To make running scp and ssh between node1 and node2 easy without typing passwords.

1. Login as root and do these at both nodes:

ssh-keygen -t rsa

Output:

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
5d:3d:ff:f6:14:e2:3d:d8:44:9e:30:33:7f:ef:53:29 root@node2
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|             .   |
|            .=o. |
|         . .  Oo.|
|        S .  . *+|
|            .E*.*|
|             o.+*|
|               =o|
|                +|
+-----------------+

2. Add content of node1 file /root/.ssh/id_rsa.pub to node2 file /root/.ssh/authorized_keys, and vice versa.

# At node1
scp /root/.ssh/id_rsa.pub node2:/root/.ssh/authorized_keys

scp node2:/root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
ha/prepare_the_nodes.txt · Last modified: 2010-09-03 11:01 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0