linux命令进入db2 linux命令进入桌面( 三 )


5、ISCSI 共享存储配置
Iscsi server端配置(node01上执行):
修改/etc/ietd.conf,添加如下内容:
Target iqn.2014-03.node01.site:scsidisk01
Lun 0 Path=/dev/sda4,Type=fileio
注意:我的未分区硬盘为/dev/sda4,你的可能不一样的@_@~~~~
添加自启动
#chkconfig -a iscsitarget
检查是否成功
#chkconfig -l iscsitarget
结果:iscsitarget 0:off 1:off 2:off 3:on 4:off 5:on 6:off
重启iscsitarget服务
# /etc/init.d/iscsitarget restart
iscsi client端配置(node01、node02、node03执行,):
iscsitarget文件内容如下:
#! /bin/sh
### BEGIN INIT INFO
# Provides: iscsiclsetup
#node02与node03上如果未装iscsitarget需将下下行的$iscsitarget
# Required-Start: $network $syslog $iscsitarget $remote_fs smartd
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: ISCSI client setup
### END INIT INFO
case "$1" in start)
iscsiadm --mode discoverydb --type sendtargets --portal 192.168.18.201 --discover
iscsiadm --m node --targetname iqn.2014-03.node01.site:scsidisk01 --portal 192.168.18.201:3260 --login
;;
stop)
iscsiadm -m node -T iqn.2014-03.node01.site:scsidisk01 -p 192.168.18.201 --logout
;;
restart) ## Stop the service and regardless of whether it was ## running or not, start it again.
$0 stop
$0 start
;;
*)
Esac
保存后执行:#/etc/init.d/iscsiclient restart
验证iscsiclient是否启动成功:
#fdisk -l
检查有无/dev/sdb出现
6、配置Linux环境变量
/etc/profie.local添加内容
alias sl='tail -f /var/log/messages'
alias fc='fcslogrpt /var/log/messages'
export PATH=/root/bin:/usr/sbin/rsct/bin:/opt/ibm/db2/v10.5/bin:$PATH
export PATH=/usr/lpp/mmfs/bin:$PATH
export DB2USENONIB=TRUE
export DB2_CFS_GPFS_NO_REFRESH_DATA=https://www.04ip.com/post/true
然后执行# . /etc/profile.local , 完成后你就可以安装purescale了,我猜测应该是设置了变量DB2USENONIB , 使purescale不再要求你强制InfiniBand或万兆网卡,使我等穷人可以有机会玩这种高档、洋气、上档次的数据库 。。。
7、DB2 V10.5 的安装:
node01:~/server_t # ./db2_install
DBI1324W Support of the db2_install command is deprecated. For
more information, see the DB2 Information Center.
Default directory for installation of products - /opt/ibm/db2/V10.5
***********************************************************
Install into default directory (/opt/ibm/db2/V10.5) ? [yes/no]
yes
Specify one of the following keywords to install DB2 products.
SERVER
CONSV
EXP
CLIENT
RTCL
Enter "help" to redisplay product names.
Enter "quit" to exit.
***********************************************************
server
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
Yes
曾经出现的错误:
ERROR: An error occurred while compiling IBM General Parallel File System
(GPFS) Portability Layer (GPL) on host "node01". Return code "2". GPL
compilation log file location "/tmp/compileGPL.log.000". The GPFS file system
cannot be mounted properly until the GPL module is successfully compiled on
this host. For details, see the specified GPL compilation log. After fixing
the problems shown in the log file, re-run the DB2 installer. For information
regarding the GPFS GPL module compile, see DB2 Information Center.
Compiling GPL :.......Failure
ERROR: A major error occurred while installing "DB2 Server Edition " on this
computer.
解决方案:
查看错误日志:compileGPL.log.000 , 为以下内容:

推荐阅读