本文详细记录了DB2 purescale 10.5在VMware Workstation 上的安装过程,如果大家看了本人的博文后,实践过程中有什么问题,欢迎加本人微信84077708,我将尽我所能为大家解惑。
VMware Tools 安装好了以后,就可以实现物理机与虚拟机之间自由交换数据了,下面开始配置Suse linux 11SP3 操作系统:
1、配置/etc/hosts
2、配置DNS主备服务器
3、修改内核参数
4、修改资源限制
5、配置NTP服务器
一、配置/etc/hosts (node01 , node02修改成一样)
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.142.101 node01.purescale.ibm.local node01
192.168.142.102 node02.purescale.ibm.local node02
二、配置主DNS服务器(node01)
配置DNS服务器,需要安装bind-9.6ESVR7P4-0.10.1.x86_64.rpm。安装好bind软件包以后,先用root用户执行以下命令,使named服务开机自动启动。
node01:~ # chkconfig -a named
named 0:off 1:off 2:off 3:on 4:off 5:on 6:off
开启named服务的时候,会同时在/etc/目录下生成named.conf文件,该文件的内容如下:
options {
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
listen-on port 53 { any; };
listen-on-v6 { any; };
allow-query { any; };
notify no;
}
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "purescale.ibm.local" IN {
type master;
file "purescale.ibm.local";
allow-transfer{192.168.142.102; };
};
zone "142.168.192.in-addr.arpa" IN {
type master;
file "142.168.192.in-addr.arpa";
allow-transfer{192.168.142.102; };
};
# Include the meta include file generated by createNamedConfInclude. This
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named
include "/etc/named.conf.include";
除了/etc/named.conf配置文件以外,还有正向解析配置文件和反向解析配置文件。这两个文件存放在/var/lib/named目录下。文件名分别为purescale.ibm.local和142.168.192.in-addr.arpa
/var/lib/named/purescale.ibm.local正向解析文件的内容如下:
$TTL 86400
@ IN SOA mydns root.mydns (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns
IN NS ns2
ns IN A 192.168.142.101
ns2 IN A 192.168.142.102
node01 IN A 192.168.142.101
node02 IN A 192.168.142.102
/var/lib/named/142.168.192.in-addr.arpa反向解析文件的内容如下:
$ORIGIN 142.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA ns.purescale.ibm.local. root.purescale.ibm.local. ( 2
3H
1H
1W
1H )
@ IN NS ns.purescale.ibm.local.
@ IN NS ns2.purescale.ibm.local.
101 IN PTR node01.purescale.ibm.local.
102 IN PTR node02.purescale.ibm.local.
101 IN PTR ns.purescale.ibm.local.
102 IN PTR ns2.purescale.ibm.local.
配置好这三个文件以后,还需要检查一下语法有没有问题:
node01:/var/lib/named # named-checkconf
node01:/var/lib/named # named-checkzone purescale.ibm.local purescale.ibm.local
zone purescale.ibm.local/IN: loaded serial 42
OK
node01:/var/lib/named #service named restart
Shutting down name server BIND done
Starting name server BIND done
如果输出如上面,则表示配置正确,否则配置就有问题。
编辑/etc/resolv.conf文件
添加如下内容:
search purescale.ibm.local
nameserver 192.168.142.101
nameserver 192.168.142.102
验证主DNS有没有问题:
node01:/var/lib/named # nslookup node01
Server: 192.168.142.101
Address: 192.168.142.101#53
Name: node01.purescale.ibm.local
Address: 192.168.142.101
node01:/var/lib/named # nslookup node02
Server: 192.168.142.101
Address: 192.168.142.101#53
Name: node02.purescale.ibm.local
Address: 192.168.142.102
node01:/var/lib/named # nslookup 192.168.142.101
Server: 192.168.142.101
Address: 192.168.142.101#53
101.142.168.192.in-addr.arpa name = node01.purescale.ibm.local.
101.142.168.192.in-addr.arpa name = ns.purescale.ibm.local.
node01:/var/lib/named # nslookup 192.168.142.102
Server: 192.168.142.101
Address: 192.168.142.101#53
102.142.168.192.in-addr.arpa name = ns2.purescale.ibm.local.
102.142.168.192.in-addr.arpa name = node02.purescale.ibm.local.
到此,主DNS就配置完成了。
三、配置备用DNS (node02)
备用DNS与主DNS的配置基本相同,只是/etc/named.conf文件中有些不同,要配置备用DNS,也需要安装bind-9.6ESVR7P4-0.10.1.x86_64.rpm软件包,然后使用root用户执行以下命令:
node02:~ # chkconfig -a named
named 0:off 1:off 2:off 3:on 4:off 5:on 6:off
执行以上命令以后,在node02的/etc/目录下就生成了一个新的named.conf配置文件
修改该文件的内容如下:
options {
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
listen-on port 53 { any; };
listen-on-v6 { any; };
allow-query { any; };
notify no;
}
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "purescale.ibm.local" IN {
type slave;
file "slave/purescale.ibm.local";
masters{192.168.142.101; };
};
zone "142.168.192.in-addr.arpa" IN {
type slave;
file "slave/142.168.192.in-addr.arpa";
masters{192.168.142.101; };
};
# Include the meta include file generated by createNamedConfInclude. This
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named
include "/etc/named.conf.include";
/etc/named.conf文件配置好后,就剩下正向解析文件和反向解析文件了,备用DNS服务器的正向解析文件和反向解析文件存放在node02上的/var/lib/named/slave/目录下,文件内容与主DNS服务器的文件内容一模一样,只需要将主DNS服务器的/var/lib/named目录下的purescale.ibm.local文件和 142.168.192.in-addr.arpa文件使用scp命令复制到node02虚拟机的/var/lib/named/slave/目录下即可。
node01:/var/lib/named #scp purescale.ibm.local root@node02:/var/lib/named/slave/
node01:/var/lib/named #scp 142.168.192.in-addr.arpa root@node02:/var/lib/named/slave/
编辑/etc/resolv.conf文件
添加如下内容:
search purescale.ibm.local
nameserver 192.168.142.101
nameserver 192.168.142.102
到此,备用DNS服务器的配置也完成了。
配置是否正确的验证方法与主DNS服务器的验证方法一样,在此就不重复了。
四、修改内核参数(node01 , node02都要修改)
内核参数文件为/etc/sysctl.conf
在文件尾部添加以下内容:(以内存3.5GB为例进行配置)
kernel.shmmni=1024
kernel.shmmax=3758096384
kernel.shmall=1048576
kernel.sem=250 256000 32 1024
kernel.msgmni=1024
kernel.msgmax=65536
kernel.msgmnb=65536
fs.aio-max-nr = 1048576
fs.file-max = 6815744
五、修改资源限制文件(node01 , node02都要修改)
资源限制文件为/etc/security/limits.conf
在文件尾部添加以下内容:
* soft nofile 65536
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536
* soft stack 65536
* hard stack 65536
* hard memlock 134217728
* soft memlock 134217728
六、配置NTP服务器(node01)
NTP服务器的配置文件为/etc/ntp.conf,内容如下:
tinker panic 0
restrict default kod nomodify notrap
restrict 127.0.0.1
# -- CLIENT NETWORK -------
restrict 192.168.142.0 mask 255.255.0.0 nomodify notrap
# --- OUR TIMESERVERS -----
server 192.168.142.1
server 127.127.1.0
# Undisciplined Local Clock.
# fudge 127.127.1.0 stratum 9
driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
broadcastdelay 0.008
logfile /var/log/ntp # alternate log file
keys /etc/ntp.keys # path for keys file
trustedkey 1 # define trusted keys
requestkey 1 # key (7) for accessing server variables
其中红色部分的server 192.168.142.1为物理机器(网关)的IP地址,至于如何在WIN7操作系统上配置NTP服务器,请问度娘。
配置ntp服务为开机自动启动。
node01:~ # chkconfig -a ntp
ntp 0:off 1:off 2:off 3:on 4:off 5:on 6:off
七、配置ntp客户端(node02)
NTP客户端为node02虚拟机,配置文件也为/etc/ntp.conf,内容如下:
tinker panic 0
restrict default kod nomodify notrap
restrict 127.0.0.1
# -- CLIENT NETWORK -------
# --- OUR TIMESERVERS -----
server 192.168.142.101 iburst
server 127.127.1.0
# Undisciplined Local Clock.
# fudge 127.127.1.0 stratum 9
driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
broadcastdelay 0.008
logfile /var/log/ntp # alternate log file
keys /etc/ntp.keys # path for keys file
trustedkey 1 # define trusted keys
requestkey 1 # key (7) for accessing server variables
到此,DNS主备服务器和NTP服务器以及客户端都已经配置好了。
除了以上配置以外,还有SSH用户免密登陆、ISCSI服务器及ISCSI客户端没有配置,关于这部分内容,请参见《Vmware Workstation + Suse Linux 11 SP3 + db2 purescale V10.5 (五)》 。
本文出自 “涛哥的回忆” 博客,谢绝转载!
Vmware Workstation + Suse Linux 11 SP3 + db2 purescale V10.5 (四)
原文地址:http://562512305.blog.51cto.com/6496478/1935143