GBase8tHDR如何安装测试-创新互联
这篇文章给大家分享的是有关GBase 8t HDR如何安装测试的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
创新互联是专业的蒙城网站建设公司,蒙城接单;提供成都网站制作、做网站、外贸营销网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行蒙城网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!GBase 8t HDR 安装测试
前期计划:
1,安装Win7x64位系统
2,安装VMware-workstation-full-12.5.4
3,安装CentOS-6.4-x86_64-minimal,网络连接使用桥接模式
ip地址规划:
172.17.6.209 gbase01 gbase01
172.17.6.210 gbase02 gbase02
二,操作系统配置
关闭CentOS启动进度条,替换为详细信息
使用root用户修改 /boot/grub/grub.conf 文件。
找到kernel部分,将"rhgb"去掉,保存即可。其中"rhgb"表示"redhat graphics boot",就是图形进度条模式。
而"quiet"表示在启动过程中只显示重要启动信息,类似硬件自检之类的消息不会显示,可以有选择地选用。
解决SecureCRT连接linux超时后断开的问题
修改/etc/ssh/sshd_config配置文件 ClientAliveInterval 300(默认为0)
这个参数的是意思是每5分钟,服务器向客户端发一个消息,用于保持连接
service sshd reload 生效
配置内部yum服务器
[root@gbase01 ~]# cd /etc/yum.repos.d/
[root@gbase01 yum.repos.d]# mkdir bak
[root@gbase01 yum.repos.d]# mv * ./bak
echo '
[daning]
name=daning yum server
baseurl=ftp://172.16.0.242/Server/COS6.4X64
enabled=1
gpgcheck=0' >> /etc/yum.repos.d/daning.repo
操作系统用Mini安装,安装完毕后下载一些需要的包。
[root@gbase01 ~]# yum install traceroute man tcpdump dmidecode vsftpd libaio libgcc libstdc++ compat-libstdc++*-33 ncurses pam openmotif ksh libm.so.6 libncurses.so.5 file wget at sysstat ftp ntp telnet xinetd libXpm perl dbus xhost xauth wqy-zenhei-fonts gedit rsh rsh-server ssh telnet compat-libcap1 bc telnet-server rsync libpam.so.0 libstdc++.so.6 lsof -y
配置下列文件
/etc/selinux/config --关闭selinux
/etc/nsswitch.conf --禁用DNS
/etc/init/control-alt-delete.conf --禁用Control-Alt-Delete
/etc/sysconfig/network --修改主机名
/etc/inittab --修改默认启动级别,mini安装已不需要
1. 数据库用户准备
GBase 8t 使用操作系统用户作为数据库用户,数据库安装前需要创建 informix 组和
informix 用户。informix 用户为 GBase 8t 数据库的管理员用户。
groupadd informix
groupadd bargroup
useradd -g informix -d /home/gbase -p root123 informix
useradd -g bargroup -d /home/tapeback -p root123 tapeback
2. 调整内核参数及用户限制
以下所有相关操作需要 root 用户执行,并且重启动操作系统才能完全生效。
编辑/etc/sysctl.conf 文件,设置相关参数的系统默认值。如果该文件中已有相关参
数的设置,则确保参数值不小于如下对应值;如果还没有相关参数的设置,则按照如下格
式添加相应的参数设置行。
kernel.shmall = 4194304
kernel.shmmax = 4398046511104
kernel.shmmni = 4096
kernel.sem = 250 32000 100 4096
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
编辑/etc/security/limits.conf 文件,修改操作系统对用户资源的限制。在该文件
中添加如下行。
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
编辑/etc/pam.d/login 文件。在该文件中添加如下行(注意对应版本)。
session required /lib64/security/pam_limits.so
实际操作如下:
----------------------------------------------------------------------------------
调整内核参数
echo '
kernel.shmmni=4096
kernel.sem=500 32000 200 256
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000' >> /etc/sysctl.conf
修改/etc/profile文件,增加
echo '
export LANG=zh_CN.GB18030
export PATH=$PATH:/usr/sbin
export NOFUZZYCKPT=1
' >>/etc/profile
配置服务
service iptables stop
service ip6tables stop
service iscsi stop
service iscsid stop
chkconfig iptables off
chkconfig ip6tables off
chkconfig iscsi off
chkconfig iscsid off
chkconfig telnet on
chkconfig rsh on
chkconfig vsftpd on
chkconfig atd on
安装jre
[root@gbase01 installfiles]# chmod +x jre-6u29-linux-x64.bin
[root@gbase01 installfiles]# ./jre-6u29-linux-x64.bin
[root@gbase01 installfiles]# mkdir /usr/local/java
[root@gbase01 installfiles]# mv jre1.6.0_29/ /usr/local/java
[root@gbase01 installfiles]# cd /usr/local/java/
[root@gbase01 java]# ln -s jre1.6.0_29/ jre
[root@gbase01 java]# ln -s /usr/local/java/jre/bin/java /usr/bin/java
[root@gbase01 java]#
3. 文件系统目录准备(dump目录不创建,放默认/home/gbase/tmp下)
可将 informix 用户 HOME 目录作为 GBase 8t 数据库的安装目录(/home/gbase)。
GBase 8t 安装目录所在的文件系统大小最低为 800MB,建议保留足够大的空间(例如,
10GB 或者以上)。informix 用户需要对安装目录具有读写权限。
准备专门用来存放数据库 dump 文件的目录。创建 lv,并在 lv 上创建文件系统,挂载
的目录名为/home/gbase/dump,用于保存 GBase 8t 数据库断言文件和内存 dump 信息;该
文件系统大小应大于数据库使用的内存总大小。
根据实际情况配置/etc/services,/etc/hosts,/home/informix/.rhosts
echo '
#Informix Port
shop 8888/tcp
' >>/etc/services
echo '
172.17.6.209 gbase01
172.17.6.210 gbase02
' >>/etc/hosts
重启安装GBase
1, 安装数据库
新建立的gbase用户目录,安装的时候一直提示非空,先删除用户下的所有文件。
[root@gbase01 GBase]# ./ids_install
......
===============================================================================
Installation Location
---------------------
Choose location for software installation.
Default Install Folder: /opt/GBASE/gbase8t
->Chosen Install Folder: /home/gbase
ENTER AN ABSOLUTE PATH, TYPE 'default' TO RESTORE THE DEFAULT FOLDER,
OR PRESS
===============================================================================
Check Install Directory
-----------------------
User install directory is not empty, please chooose another one.
PRESS
安装完毕后把用户的隐藏文件拷贝到informix用户目录下
4. 准备 informix 用户环境变量文件
echo '
INFORMIXDIR=/home/gbase
INFORMIXSERVER=ontest01
DBDATE=Y4MD0
ONCONFIG=test01.cfg
export LANG=en_US.ISO8859-1
export INFORMIXDIR INFORMIXSERVER DBDATE ONCONFIG
export TERMINFO=/home/informix/etc/typetab
export TERMCAP=$INFORMIXDIR/etc/termcap
PATH=$PATH:$HOME/bin:$INFORMIXDIR/bin:.
NSR_DATA_VOLUME_POOL=DBMIData
NSR_LOG_VOLUME_POOL=DBMIData
export NSR_DATA_VOLUME_POOL NSR_LOG_VOLUME_POOL PATH
'>>/home/gbase/.bashrc
建立数据库文件:
[root@gbase01 gbase]# mkdir /informix.links
[root@gbase01 gbase]# cd /informix.links/
[root@gbase01 informix.links]# touch rootdbs
[root@gbase01 informix.links]# touch plogdbs
[root@gbase01 informix.links]# touch llogdbs
[root@gbase01 informix.links]# touch tempdbs
[root@gbase01 informix.links]# touch datadbs
[root@gbase01 informix.links]# chown informix:informix *
[root@gbase01 informix.links]# chmod 660 *
[root@gbase01 informix.links]#
cp /home/gbase/etc/onconfig.std /home/gbase/etc/test01.cfg
cp /home/gbase/etc/sm_versions.std /home/gbase/etc/sm_versions
cp /home/gbase/etc/sqlhosts.std /home/gbase/etc/sqlhosts
echo "1|1.0.1|nwbsa|1">> $INFORMIXDIR/etc/sm_versions
配置sqlhosts文件
sqlhosts文件由INFORMIXSQLHSOTS环境变量指定。sqlhosts文件的格式如下:
[informix@gbase01 etc]$ tail -n 2 sqlhosts
ontest01 onsoctcp gbase01 shop
ontest02 onsoctcp gbase02 shop
[informix@gbase01 etc]$
配置onconfig文件
4,初始化数据库
oninit -ivy
5,加空间
空间管理:onmonitor
onspaces -c -d plogdbs -p /informix.links/plogdbs -o 0 -s 1024000
onspaces -c -d llogdbs -p /informix.links/llogdbs -o 0 -s 1024000
onspaces -c -d tempdbs -t -p /informix.links/tempdbs -o 0 -s 1024000
onspaces -c -d datadbs -p /informix.links/datadbs -o 0 -s 1024000
使用onparams 更改物理日志位置和大小
onparams -p -s 1023000 -d plogdbs -y
逻辑日志文件位置及个数调整,先删除3个,再建立3个,接着移动一下检查点位置再删除3个。
onmode -l
onmode -l
onmode -l
onmode -c
onparams -d -l 1 -y
onparams -d -l 2 -y
onparams -d -l 3 -y
onparams -a -d llogdbs -s 10000
onparams -a -d llogdbs -s 10000
onparams -a -d llogdbs -s 10000
onmode -l
onmode -l
onmode -l
onmode -c
onparams -d -l 4 -y
onparams -d -l 5 -y
onparams -d -l 6 -y
最后要留下三个日志并且必须是从1开始的,否则在增加日志数时,number号会乱掉的:
address number flags uniqid begin size used %used
5b5d8f98 1 U---C-L 12 3:25053 5000 14 0.28
5b71df50 2 A------ 0 3:30053 5000 0 0.00
5b71dfb8 3 A------ 0 3:35053 5000 0 0.00
3 active, 3 total
做个全备。此时配置文件中要为:/dev/null
[informix@gbase01 ~]$ ontape -s -L 0
Your evaluation license will expire on 2017-06-15 00:00:00
Archive to tape device '/dev/null' is complete.
Program over.
[informix@gbase01 ~]$
关闭数据库,修改onconfig文件后启动数据库
DBSPACETEMP tempdbs
--TAPEDEV /dev/nst0
--LTAPEDEV /dev/nst0
三,HDR环境的建立
二,服务器配置文件信息
主机名和ip地址信息
/etc/hosts
172.17.6.209 gbase01
172.17.6.210 gbase02
配置数据信任关系
/home/informix/.rhosts
gbase01
gbase02
三,配置操作系统rsh服务
1、安装rsh-server软件包
2、删除krb5-workstation软件包
3、配置:
两个节点都要操作:
编辑/etc/xinetd.d/rsh和/etc/xinetd.d/rlogin文件,将disable=yes更改为disable=no,然后重启xinetd进程。
将rexec、rlogin、rsh加入到/etc/securetty里面:
[root@gbase02 ~]# tail -n 5 /etc/securetty
tty10
tty11
rexec
rsh
rlogin
[root@gbase02 ~]#
4、编辑/etc/hosts.equiv文件,加入以下内容:
[root@gbase02 ~]# cat /etc/hosts.equiv
gbase01
gbase02
[root@gbase02 ~]#
5、编辑informix用户的.rhosts文件,加入以下内容:
[informix@gbase02 ~]$ cat .rhosts
gbase01
gbase02
[informix@gbase02 ~]$
四,gbase02服务器安装数据库,配置如下文件
informix的实例名配置如下:
ontest01 onsoctcp gbase01 shop
ontest02 onsoctcp gbase02 shop
cp /home/gbase/etc/onconfig.std /home/gbase/etc/test02.cfg
cp /home/gbase/etc/sm_versions.std /home/gbase/etc/sm_versions
cp /home/gbase/etc/sqlhosts.std /home/gbase/etc/sqlhosts
三,HDR环境的建立
cfg配置HDR方面的配置参数如下:
DRAUTO 0
DRINTERVAL -1
为了实现通过管道备份恢复,配置TAPEDEV和LTAPEDEV的值STDIO
1,使用onmode -d 将gbase01的类型设置为主类型并指示相关联的辅助数据库服务器的名称(这个名称指的是从服务器的数据库的实例名)。
[informix@gbase01 ~]$ onmode -d primary ontest02
出现的日志信息为:
[informix@gbase01 ~]$ onstat -m
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- On-Line (Prim) -- Up 00:02:02 -- 826212 Kbytes
Message Log File: /home/gbase/test01.log
00:47:47 Dataskip is now OFF for all dbspaces
00:47:47 SCHAPI: Started dbScheduler thread.
00:47:47 Checkpoint Completed: duration was 0 seconds.
00:47:47 Mon Apr 10 - loguniq 11, logpos 0xc180c0, timestamp: 0x58830 Interval: 344
00:47:47 Maximum server connections 0
00:47:47 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 6, Llog used 1
00:47:47 On-Line Mode
00:47:47 Booting Language
00:47:47 Loading Module
00:47:47 Auto Registration is synced
00:47:47 SCHAPI: Started 2 dbWorker threads.
00:47:52 Defragmenter cleaner thread now running
00:47:52 Defragmenter cleaner thread cleaned:0 partitions
00:49:32 DR: Reservation of the last logical log for log backup turned on
00:49:32 DR: new type = primary, secondary server name = ontest02
00:49:32 DR: Trying to connect to secondary server = ontest02
00:49:32 DR: Cannot connect to secondary server
00:49:32 DR: Turned off on primary server
[informix@gbase01 ~]$
2,在gbase01上执行备份通过管道直接在gbase02上面执行物理恢复,执行完毕会自动退出
[informix@gbase01 informix]$ ontape -s -L 0 -F | rsh gbase02 "ontape -p"
3,通过下面的日志信息可以看到gbase02上面的物理恢复已经完成
[informix@gbase02 etc]$ onstat -m
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- Fast Recovery -- Up 00:02:26 -- 826212 Kbytes
Message Log File: /home/gbase/test02.log
00:51:46 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 0, Llog used 0
00:52:00 Chunk 3 '/informix.links/llogdbs' is sparse - inflating...
00:52:04 Checkpoint Completed: duration was 0 seconds.
00:52:04 Mon Apr 10 - loguniq 11, logpos 0xc79018, timestamp: 0x59706 Interval: 348
00:52:04 Maximum server connections 0
00:52:04 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 0, Llog used 0
00:52:21 Checkpoint Completed: duration was 0 seconds.
00:52:21 Mon Apr 10 - loguniq 11, logpos 0xc79018, timestamp: 0x5970e Interval: 349
00:52:21 Maximum server connections 0
00:52:21 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 0, Llog used 0
00:52:22 Physical Restore of rootdbs, plogdbs, llogdbs, datadbs Completed.
00:52:22 Checkpoint Completed: duration was 0 seconds.
00:52:22 Mon Apr 10 - loguniq 11, logpos 0xc79018, timestamp: 0x59722 Interval: 349
00:52:22 Maximum server connections 0
[informix@gbase02 etc]$
4,在gbase02上执行:
[informix@gbase02 informix]$ onmode -d secondary ontest01
系统提示:
00:52:22 Maximum server connections 0
00:53:39 DR: Reservation of the last logical log for log backup turned off
00:53:39 DR: new type = secondary, primary server name = ontest01
00:53:39 DR: Trying to connect to primary server = ontest01
00:53:41 DR: Secondary server connected
00:53:41 DR: Secondary server needs failure recovery
5,此时数据库继续执行逻辑恢复,日志信息:
00:53:42 DR: Failure recovery from disk in progress ...
00:53:42 Logical Recovery Started.
00:53:42 10 recovery worker threads will be started.
00:53:55 Start Logical Recovery - Start Log 11, End Log ?
00:53:55 Starting Log Position - 11 0xc79018
00:53:55 Clearing the physical and logical logs has started
00:54:43 Cleared 1969 MB of the physical and logical logs in 49 seconds
00:54:46 Started processing open transactions on secondary during startup
00:54:46 Finished processing open transactions on secondary during startup.
00:54:47 Logical Log 11 Complete, timestamp: 0x59753.
00:54:49 B-tree scanners disabled.
00:54:50 DR: HDR secondary server operational
00:54:50 Checkpoint Completed: duration was 0 seconds.
00:54:50 Mon Apr 10 - loguniq 12, logpos 0x5018, timestamp: 0x5976d Interval: 350
00:54:50 Maximum server connections 0
00:54:50 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 17, Llog used 0
而另外一台主服务器上面的日志信息为:
[informix@gbase01 ~]$ onstat -m
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- On-Line (Prim) -- Up 00:09:48 -- 826212 Kbytes
Message Log File: /home/gbase/test01.log
00:50:35 Maximum server connections 0
00:50:35 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 47, Llog used 97
00:50:35 Level 0 Archive started on rootdbs, plogdbs, llogdbs, datadbs
00:52:21 Archive on rootdbs, plogdbs, llogdbs, datadbs completed without being recorded.
00:53:41 DR: Primary server connected
00:53:41 DR: Secondary server needs failure recovery
00:54:45 Logical Log 11 Complete, timestamp: 0x59736.
00:54:46 DR: Sending log 11, size 5000 pages, 64.02 percent used
00:54:46 DR: Sending log 12 (current), size 5000 pages, 0.08 percent used
00:54:48 DR: Sending Logical Logs Completed
00:54:49 DR: Primary server operational
00:54:50 Checkpoint Completed: duration was 1 seconds.
00:54:50 Mon Apr 10 - loguniq 12, logpos 0x5018, timestamp: 0x59770 Interval: 346
00:54:50 Maximum server connections 1
00:54:50 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 12, Llog used 13
[informix@gbase01 ~]$
从上面可以看到数据库之间的执行步骤。
6,gbase02 执行完毕后,此时数据库的状态为:
[informix@gbase01 ~]$ onstat -
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- On-Line (Prim) -- Up 00:10:29 -- 826212 Kbytes
[informix@gbase01 ~]$
备份服务器的数据库状态为:
[informix@gbase02 ~]$ onstat -
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- Read-Only (Sec) -- Up 00:07:31 -- 826212 Kbytes
[informix@gbase02 ~]$
7,此步骤不需要操作了,informix 11.5需要操作(此时在gbase01上面执行的ontape -s -L 0 -F | rsh test02 "ontape -p " 命令还没有结束,在gbase02上面执行onmode -ky关闭数据库,然后重新启动,此时gbase01上面的任务完成退出。)
8, 关闭数据库,修改cfg配置文件的备份设备TAPEDEV和LTAPEDEV参数 ,启动后修改用onbar备份,主数据库用磁带备份,辅助数据库用文件备份。
9,先启动主数据库,再启动辅助数据库服务器。
[informix@gbase01 etc]$ onstat -m
Your evaluation license will expire on 2017-07-06 00:00:00
GBase 8t Database Server Version 12.10.FC4G1TL -- On-Line (Prim) -- Up 00:12:17 -- 826212 Kbytes
Message Log File: /home/gbase/test01.log
01:24:33 On-Line Mode
01:24:35 SCHAPI: Started dbScheduler thread.
01:24:35 Booting Language
01:24:35 Loading Module
01:24:35 Auto Registration is synced
01:24:35 SCHAPI: Started 2 dbWorker threads.
01:24:37 Defragmenter cleaner thread now running
01:24:37 Defragmenter cleaner thread cleaned:0 partitions
01:24:59 DR: Receive error
01:24:59 dr_gettype thread : asfcode = -25582: oserr = 0: errstr = : Network connection is broken.
01:24:59 DR_ERR set to -1
01:24:59 DR: Type exchange failed
01:29:32 Checkpoint Completed: duration was 0 seconds.
01:29:32 Mon Apr 10 - loguniq 13, logpos 0x69c018, timestamp: 0x6b072 Interval: 371
01:29:32 Maximum server connections 0
01:29:32 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 15, Llog used 28
[informix@gbase01 etc]$
更改cfg文件,修改DRINTERVAL 为 0,重新启动正常
感谢各位的阅读!关于“GBase 8t HDR如何安装测试”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
网页标题:GBase8tHDR如何安装测试-创新互联
分享地址:http://azwzsj.com/article/hhgsd.html