Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and test GBase 8t HDR

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to install and test the GBase 8t HDR. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

GBase 8t HDR installation test

Up-front plan:

1. Install Win7x64-bit system

2, install VMware-workstation-full-12.5.4

3. Install CentOS-6.4-x86_64-minimal and use bridging mode for network connection

Ip address Planning:

172.17.6.209 gbase01 gbase01

172.17.6.210 gbase02 gbase02

Second, operating system configuration

Close the CentOS startup progress bar and replace it with details

Modify the / boot/grub/grub.conf file using the root user.

Find the kernel section, remove the "rhgb" and save it. Where "rhgb" means "redhat graphics boot", which is the graphic progress bar mode.

"quiet" means that only important startup information is displayed during startup, and messages such as hardware self-test are not displayed and can be selected selectively.

Resolve the problem of disconnection after SecureCRT connection linux timed out

Modify / etc/ssh/sshd_config configuration file ClientAliveInterval 300 (default is 0)

This parameter means that every 5 minutes, the server sends a message to the client to maintain the connection

Service sshd reload takes effect

Configure an internal yum server

[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

The operating system is installed with Mini. Download some required packages after installation.

[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

Configure the following files

/ etc/selinux/config-- close selinux

/ etc/nsswitch.conf-- disable DNS

/ etc/init/control-alt-delete.conf-- disable Control-Alt-Delete

/ etc/sysconfig/network-- modify the hostname

/ etc/inittab-- modify the default startup level, mini installation is no longer required

1. Database user preparation

GBase 8t uses the operating system user as the database user. Before installing the database, you need to create informix groups and

Informix user. The informix user is the administrator user of the GBase 8t database.

Groupadd informix

Groupadd bargroup

Useradd-g informix-d / home/gbase-p root123 informix

Useradd-g bargroup-d / home/tapeback-p root123 tapeback

two。 Adjust kernel parameters and user restrictions

All of the following related actions need to be performed by the root user, and the reboot of the operating system will take full effect.

Edit the / etc/sysctl.conf file to set the system default values for the relevant parameters. If there are already relevant parameters in the file

If the number is set, make sure that the parameter value is not less than the corresponding value below; if there is no setting of the relevant parameters, follow the box below

To add the corresponding parameter setting row.

Kernel.shmall = 4194304

Kernel.shmmax = 4398046511104

Kernel.shmmni = 4096

Kernel.sem = 250 32000 4096

Fs.file-max = 65536

Net.ipv4.ip_local_port_range = 1024 65000

Edit the / etc/security/limits.conf file to modify the operating system's restrictions on user resources. In the file

Add as follows in the.

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

Edit the / etc/pam.d/login file. Add the following line to the file (note the corresponding version).

Session required / lib64/security/pam_limits.so

The actual operation is as follows:

Adjust kernel parameters

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

Modify / etc/profile file to add

Echo'

Export LANG=zh_CN.GB18030

Export PATH=$PATH:/usr/sbin

Export NOFUZZYCKPT=1

'> > / etc/profile

Configuration service

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

Install 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. File system directory preparation (dump directory is not created, put it under the default / home/gbase/tmp)

You can use the informix user HOME directory as the installation directory for the GBase 8t database (/ home/gbase).

The minimum file system size of the GBase 8t installation directory is 800MB, and it is recommended that you leave enough space (for example,

10GB or above). Informix users need to have read and write access to the installation directory.

Prepare a directory dedicated to storing database dump files. Create a lv, create a file system on lv, and mount

Directory named / home/gbase/dump, which is used to hold the GBase 8t database assertion file and memory dump information; the

The file system size should be greater than the total amount of memory used by the database.

Configure / etc/services,/etc/hosts,/home/informix/.rhosts according to the actual situation

Echo'

# Informix Port

Shop 8888/tcp

'> > / etc/services

Echo'

172.17.6.209 gbase01

172.17.6.210 gbase02

'> > / etc/hosts

Restart installation of GBase

1. Install the database

The newly established gbase user directory is always prompted to be non-empty during installation, so delete all files under the user first.

[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 TO ACCEPT THE CHOSEN FOLDER:

=

Check Install Directory

User install directory is not empty, please chooose another one.

PRESS TO ACCEPT THE FOLLOWING (OK):

Copy the user's hidden files to the informix user directory after installation

4. Prepare the informix user environment variable file

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

Create a database file:

[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

Configure the sqlhosts file

The sqlhosts file is specified by the INFORMIXSQLHSOTS environment variable. The format of the sqlhosts file is as follows:

[informix@gbase01 etc] $tail-n 2 sqlhosts

Ontest01 onsoctcp gbase01 shop

Ontest02 onsoctcp gbase02 shop

[informix@gbase01 etc] $

Configure the onconfig file

4. Initialize the database

Oninit-ivy

5, add space

Space management: 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

Use onparams to change the location and size of physical logs

Onparams-p-s 1023000-d plogdbs-y

Adjust the location and number of logical log files, first delete 3, then establish 3, and then move the checkpoint location and delete 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

Finally, leave three logs and must start with 1, otherwise when increasing the number of logs, the number number will be confused:

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 030 053 5000 0 0.00

5b71dfb8 3 A-0 315 053 5000 0 0.00

3 active, 3 total

Do it all. At this point, the configuration file should be: / 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 ~] $

Close the database and start the database after modifying the onconfig file

DBSPACETEMP tempdbs

-- TAPEDEV / dev/nst0

-- LTAPEDEV / dev/nst0

Third, the establishment of HDR environment

Second, server profile information

Hostname and ip address information

/ etc/hosts

172.17.6.209 gbase01

172.17.6.210 gbase02

Configure data trust relationship

/ home/informix/.rhosts

Gbase01

Gbase02

Third, configure the operating system rsh service

1. Install rsh-server software package

2. Delete krb5-workstation software package

3. Configuration:

Both nodes need to be operated:

Edit the / etc/xinetd.d/rsh and / etc/xinetd.d/rlogin files, change disable=yes to disable=no, and then restart the xinetd process.

Add rexec, rlogin, rsh to / etc/securetty:

[root@gbase02] # tail-n 5 / etc/securetty

Tty10

Tty11

Rexec

Rsh

Rlogin

[root@gbase02 ~] #

4. Edit the / etc/hosts.equiv file and add the following:

[root@gbase02 ~] # cat / etc/hosts.equiv

Gbase01

Gbase02

[root@gbase02 ~] #

5. Edit the .rhosts file of the informix user and add the following:

[informix@gbase02 ~] $cat .rhosts

Gbase01

Gbase02

[informix@gbase02 ~] $

Fourth, the gbase02 server installs the database and configures the following files

The instance name of informix is configured as follows:

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

Third, the establishment of HDR environment

The configuration parameters for cfg configuration HDR are as follows:

DRAUTO 0

DRINTERVAL-1

To restore through pipeline backup, configure the value STDIO of TAPEDEV and LTAPEDEV

1. Use onmode-d to set the type of gbase01 to the primary type and indicate the name of the associated secondary database server (this name refers to the instance name of the database from the slave server).

[informix@gbase01] $onmode-d primary ontest02

The log message that appears is:

[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 from module

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. Perform a backup on the gbase01 and perform a physical restore directly on the gbase02 through the pipeline. After execution, the backup will exit automatically.

[informix@gbase01 informix] $ontape-s-L 0-F | rsh gbase02 "ontape-p"

3. From the log information below, you can see that the physical recovery on gbase02 has been completed.

[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, execute on gbase02:

[informix@gbase02 informix] $onmode-d secondary ontest01

The system prompts:

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. At this point, the database continues to perform logical recovery, with log information:

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

The log information on the other primary server is:

[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 ~] $

You can see the execution steps between databases from above.

6After the execution of gbase02, the status of the database is as follows:

[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 ~] $

The database status of the backup server is:

[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, this step does not need operation, informix 11.5 requires operation (at this time, the ontape-s-L 0-F | rsh test02 "ontape-p" command executed on gbase01 is not finished, execute onmode-ky on gbase02 to shut down the database, and then restart, and then the task on gbase01 is completed and exited.)

8. Close the database, modify the backup device TAPEDEV and LTAPEDEV parameters of the cfg configuration file, backup with onbar after startup, backup with tape for the main database, and backup with files for the auxiliary database.

9, start the primary database first, and then start the secondary database server.

[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 from module

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] $

Change cfg file, modify DRINTERVAL to 0, restart normally

Thank you for reading! This is the end of this article on "how to install and test GBase 8t HDR". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report