网上看到的一个朋友写的不错收藏着.
Posted yaoyangding
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了网上看到的一个朋友写的不错收藏着.相关的知识,希望对你有一定的参考价值。
网上看到的一个朋友写的不错收藏着.
环境:两台P630:P630_1,P630_2
磁盘陈列:7133-D40
共享卷组:oravg
磁盘陈列:7133-D40
共享卷组:oravg
1、 在两台计算机上设置IP地址
(1) 在p630_1机上:
A. 配置第一块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
(1) 在p630_1机上:
A. 配置第一块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
select en2
* HOSTNAME [p630_1]
* Internet ADDRESS (dotted decimal) [10.10.9.1]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en1
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
* Internet ADDRESS (dotted decimal) [10.10.9.1]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en1
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
B. 配置第二块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
select en1
* HOSTNAME [p630_1]
* Internet ADDRESS (dotted decimal) [10.10.10.1]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en3
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
* Internet ADDRESS (dotted decimal) [10.10.10.1]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en3
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
(2) 在p630_2机上:
A. 配置第一块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
A. 配置第一块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
select en2
* HOSTNAME [p630_2]
* Internet ADDRESS (dotted decimal) [10.10.9.2]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en1
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
* Internet ADDRESS (dotted decimal) [10.10.9.2]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en1
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
B. 配置第二块boot网卡
->#smitty
->Communications Applications and Services
->TCP/IP
->Minimum Configuration & Startup
select en1
* HOSTNAME [p630_2]
* Internet ADDRESS (dotted decimal) [10.10.10.2]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en3
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
* Internet ADDRESS (dotted decimal) [10.10.10.2]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en3
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default GATEWAY Address []
2、 修改/etc/hosts文件,内容如下:
127.0.0.1 loopback localhost p630_1
10.10.9.1 boot_11 p630_1
10.10.10.1 boot_12 p630_1
192.168.1.1 service1
10.10.9.2 boot_21 p630_2
10.10.10.2 boot_22 p630_2
192.168.1.2 service2
3、 在p630_1上建立共享卷组
建立oravg共享卷组
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Add a Volume Group
127.0.0.1 loopback localhost p630_1
10.10.9.1 boot_11 p630_1
10.10.10.1 boot_12 p630_1
192.168.1.1 service1
10.10.9.2 boot_21 p630_2
10.10.10.2 boot_22 p630_2
192.168.1.2 service2
3、 在p630_1上建立共享卷组
建立oravg共享卷组
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Add a Volume Group
VOLUME GROUP name [oravg]
Physical partition SIZE in megabytes [128]
* PHYSICAL VOLUME names [hdisk2]
Activate volume group AUTOMATICALLY [no]
at system restart?
Volume Group MAJOR NUMBER []
Create VG concurrent Capable? [yes]
Auto-varyon in Concurrent Mode? [no]
Physical partition SIZE in megabytes [128]
* PHYSICAL VOLUME names [hdisk2]
Activate volume group AUTOMATICALLY [no]
at system restart?
Volume Group MAJOR NUMBER []
Create VG concurrent Capable? [yes]
Auto-varyon in Concurrent Mode? [no]
4、 在p630_2上import共享卷组
(1) import oravg共享卷组
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Import a Volume Group
(1) import oravg共享卷组
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Import a Volume Group
VOLUME GROUP name [oravg]
* PHYSICAL VOLUME name [hdisk2]
Volume Group MAJOR NUMBER []
Make this VG Concurrent Capable no
Make default varyon of VG Concurrent? no
* PHYSICAL VOLUME name [hdisk2]
Volume Group MAJOR NUMBER []
Make this VG Concurrent Capable no
Make default varyon of VG Concurrent? no
(2) 修改oravg共享卷组属性
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Set Characteristics of a Volume Group
->Change a Volume Group
->#smitty
->System Storage Management (Phisical & Logical Storage)
->Logical Volume Manager
->Volume Groups
->Set Characteristics of a Volume Group
->Change a Volume Group
select * VOLUME GROUP name [oravg]
VOLUME GROUP name [oravg]
* ACTIVATE volume group AUTOMATICALLY [no]
at system restart?
* A QUORUM of disks required to keep the volume [yes]
group on-line?
Convert this VG to Concurrent Capable? [no]
* Autovaryon VG in Concurrent Mode? [no]
* ACTIVATE volume group AUTOMATICALLY [no]
at system restart?
* A QUORUM of disks required to keep the volume [yes]
group on-line?
Convert this VG to Concurrent Capable? [no]
* Autovaryon VG in Concurrent Mode? [no]
5、 在p630_1 和p630_2上配置非TCP/IP网络
->#smitty
->Devices
->TTY
->Add a TTY
->#smitty
->Devices
->TTY
->Add a TTY
select tty rs232 Asynchronous Terminal
TTY type [tty]
TTY interface [rs232]
Description [Terminal asynchrone]
Parent adapter [sa3]
* PORT number [0]
BAUD rate [9600]
PARITY [none]
BITS per characte [8]
Number of STOP BITS [1]
TERMINAL type [dumb]
STATE to be configured at boot time [available]
...
...
Enable LOGIN [disable]
用Serial to Serial Cable连接一号机和二号机的COM3,作为HACMP的心跳线
测试心跳线:
1) 在p630_1机上执行: cat < /dev/tty0
2) 在p630_2上执行: cat /etc/hosts > /dev/tty0
3) 在p630_1上若显示出p630_2的/etc/hosts文件内容,说明心跳线配置正确
TTY interface [rs232]
Description [Terminal asynchrone]
Parent adapter [sa3]
* PORT number [0]
BAUD rate [9600]
PARITY [none]
BITS per characte [8]
Number of STOP BITS [1]
TERMINAL type [dumb]
STATE to be configured at boot time [available]
...
...
Enable LOGIN [disable]
用Serial to Serial Cable连接一号机和二号机的COM3,作为HACMP的心跳线
测试心跳线:
1) 在p630_1机上执行: cat < /dev/tty0
2) 在p630_2上执行: cat /etc/hosts > /dev/tty0
3) 在p630_1上若显示出p630_2的/etc/hosts文件内容,说明心跳线配置正确
6、 建立应用服务器启动脚本
在/etc/hascript下分别建立dbstart.sh, dbstop.sh, 然后修改文件属性为755:
#chomd 755 *
在/etc/hascript下分别建立dbstart.sh, dbstop.sh, 然后修改文件属性为755:
#chomd 755 *
7、 HACMP的设置
(1)定义CLUSTER
->Initialization and Standard Configuration
->Add Nodes to an HACMP Cluster
Add/Change/Show an HACMP Cluster
(1)定义CLUSTER
->Initialization and Standard Configuration
->Add Nodes to an HACMP Cluster
Add/Change/Show an HACMP Cluster
[输入字段]
* Cluster Name [wly]
* Cluster Name [wly]
NOTE: HACMP must be RESTARTED
on all nodes in order for change to take effect
on all nodes in order for change to take effect
(2)定义p630_1节点
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Nodes
-> Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Nodes
-> Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster
[输入字段]
* Node Name [p630_1]
Communication Path to Node [] +
(2)定义p630_2节点
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Nodes
-> Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster
* Node Name [p630_1]
Communication Path to Node [] +
(2)定义p630_2节点
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Nodes
-> Add a Node to the HACMP Cluster
Add a Node to the HACMP Cluster
[输入字段]
* Node Name [p630_1]
Communication Path to Node [] +
* Node Name [p630_1]
Communication Path to Node [] +
(3) 定义网络
A. 定义IP网络
-> Extended Configuration
->Extended Topology Configuration
->Configure HACMP Networks
-> Add a Network to the HACMP Cluster
Add an IP-Based Network to the HACMP Cluster
A. 定义IP网络
-> Extended Configuration
->Extended Topology Configuration
->Configure HACMP Networks
-> Add a Network to the HACMP Cluster
Add an IP-Based Network to the HACMP Cluster
[输入字段]
* Network Name [net_ether_01]
* Network Type ether
* Netmask [255.255.255.0] +
* Enable IP Address Takeover via IP Aliases [Yes] +
IP Address Offset for Heartbeating over IP Aliases []
B. 定义非IP网络
-> Extended Configuration
->Extended Topology Configuration
->Configure HACMP Networks
-> Add a Network to the HACMP Cluster
选择# Pre-defined Serial Device Types 中的rs232
Add a Serial Network to the HACMP Cluster
[输入字段]
* Network Name [net_rs232_01]
* Network Type rs232
* Network Name [net_ether_01]
* Network Type ether
* Netmask [255.255.255.0] +
* Enable IP Address Takeover via IP Aliases [Yes] +
IP Address Offset for Heartbeating over IP Aliases []
B. 定义非IP网络
-> Extended Configuration
->Extended Topology Configuration
->Configure HACMP Networks
-> Add a Network to the HACMP Cluster
选择# Pre-defined Serial Device Types 中的rs232
Add a Serial Network to the HACMP Cluster
[输入字段]
* Network Name [net_rs232_01]
* Network Type rs232
(4) 定义网络接口
A. 定义IP网络接口
定义Boot_11接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
A. 定义IP网络接口
定义Boot_11接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
[输入字段]
* IP Label/Address [boot_11] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_1] +
Network Interface []
* IP Label/Address [boot_11] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_1] +
Network Interface []
定义Boot_12接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
[输入字段]
* IP Label/Address [boot_12] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_1] +
Network Interface []
* IP Label/Address [boot_12] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_1] +
Network Interface []
定义boot_21接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
[输入字段]
* IP Label/Address [boot_21] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_2] +
Network Interface []
* IP Label/Address [boot_21] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_2] +
Network Interface []
定义boot_22接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
选择net_ether_01 (0.0.0.0/0)
Add a Communication Interface
[输入字段]
* IP Label/Address [boot_22] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_2] +
Network Interface []
* IP Label/Address [boot_22] +
* Network Type ether
* Network Name net_ether_01
* Node Name [p630_2] +
Network Interface []
B. 定义非IP网络接口
定义p630_1tty接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232_01
Add a Communication Device
[输入字段]
* Device Name [p630_1tty]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty0]
* Node Name [p630_1]
定义p630_1tty接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232_01
Add a Communication Device
[输入字段]
* Device Name [p630_1tty]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty0]
* Node Name [p630_1]
定义p630_2tty接口:
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232_01
Add a Communication Device
[输入字段]
* Device Name [p630_2tty]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty0]
* Node Name [p630_2]
-> Extended Configuration
-> Extended Topology Configuration
->Configure HACMP Communication Interfaces/Devices
-> Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Device
选择 net_rs232_01
Add a Communication Device
[输入字段]
* Device Name [p630_2tty]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty0]
* Node Name [p630_2]
(5) 定义应用服务器
定义wlyapp应用服务器:
->Initialization and Standard Configuration
->Configure Application Servers
->Add an Application Server
Add Application Server
定义wlyapp应用服务器:
->Initialization and Standard Configuration
->Configure Application Servers
->Add an Application Server
Add Application Server
[输入字段]
* Server Name [wlyapp]
* Start Script [/etc/hascript/dbstart.sh]
* Stop Script [/etc/hascript/dbstop.sh]
* Server Name [wlyapp]
* Start Script [/etc/hascript/dbstart.sh]
* Stop Script [/etc/hascript/dbstop.sh]
(6) 定义共享资源组
定义wlyres资源组
->Initialization and Standard Configuration
->Configure HACMP Resource Group
->Add a Resource Group
选择Cascading
Add a Resource Group with a Cascading Management Policy (standard)
定义wlyres资源组
->Initialization and Standard Configuration
->Configure HACMP Resource Group
->Add a Resource Group
选择Cascading
Add a Resource Group with a Cascading Management Policy (standard)
[输入字段]
* Resource Group Name [wlyres]
*Participating Node Names (Default Node Priority) [p630_1 p630_2] +
* Resource Group Name [wlyres]
*Participating Node Names (Default Node Priority) [p630_1 p630_2] +
(7) 修改资源组属性
修改wlyres资源组属性:
->Initialization and Standard Configuration
->Configure HACMP Resource Group
-> Change/Show Resources for a Cascading Resource Group(standard)
Change/Show Resources for a Cascading Resource Group
修改wlyres资源组属性:
->Initialization and Standard Configuration
->Configure HACMP Resource Group
-> Change/Show Resources for a Cascading Resource Group(standard)
Change/Show Resources for a Cascading Resource Group
[输入字段]
Resource Group Name wlyres
Participating Node Names (Default Node Priority) p630_2 p630_1
* Service IP Labels/Addresses [] +
Volume Groups [oravg] +
Filesystems (empty is ALL for VGs specified) [] +
Application Servers [wlyapp] +
Resource Group Name wlyres
Participating Node Names (Default Node Priority) p630_2 p630_1
* Service IP Labels/Addresses [] +
Volume Groups [oravg] +
Filesystems (empty is ALL for VGs specified) [] +
Application Servers [wlyapp] +
(8) 定义Service IP
定义p630_1的service IP地址:
->Initialization and Standard Configuration
->Configure Resources to Make Highly Available
->Configure Service IP Labeles/Addresses
->Add a service IP Labeles/Addresses
Add a Service IP Label/Address (standard)
定义p630_1的service IP地址:
->Initialization and Standard Configuration
->Configure Resources to Make Highly Available
->Configure Service IP Labeles/Addresses
->Add a service IP Labeles/Addresses
Add a Service IP Label/Address (standard)
[输入字段]
* IP Label/Address [service1] +
* Network Name [net_ether_01] +
* IP Label/Address [service1] +
* Network Name [net_ether_01] +
8、 同步HACMP配置
->Initialization and Standard Configuration
-> Verify and Synchronize HACMP Comfiguration
Verify and Synchronize HACMP Comfiguration
->Initialization and Standard Configuration
-> Verify and Synchronize HACMP Comfiguration
Verify and Synchronize HACMP Comfiguration
[输入字段]
* Verify, Synchronize or Both [Both] +
Force synchronization if verification fails? [No] +
* Verify changes only? [No] +
* Logging [Standard] +
* Verify, Synchronize or Both [Both] +
Force synchronization if verification fails? [No] +
* Verify changes only? [No] +
* Logging [Standard] +
9、 HACMP服务的启动和停止
启动:
#smitty clstart
Start Cluster Services
[输入字段]
* Start now, on system restart or both now +
Start Cluster Services on these nodes [p630_1] +
BROADCAST message at startup? true +
Startup Cluster Lock Services? false +
Startup Cluster Information Daemon? false +
Reacquire resources after forced down ? false +
启动:
#smitty clstart
Start Cluster Services
[输入字段]
* Start now, on system restart or both now +
Start Cluster Services on these nodes [p630_1] +
BROADCAST message at startup? true +
Startup Cluster Lock Services? false +
Startup Cluster Information Daemon? false +
Reacquire resources after forced down ? false +
停止:
#smitty clstop
Stop Cluster Services
[输入字段]
* Stop now, on system restart or both now +
Stop Cluster Services on these nodes [p630_1] +
BROADCAST cluster shutdown? true +
* Shutdown mode graceful+
以上是关于网上看到的一个朋友写的不错收藏着.的主要内容,如果未能解决你的问题,请参考以下文章
最近一些朋友问我,临近快毕业了专业不对口,想转行看到IT行业就业前景不错,但是编程语言众多不了解,不知道哪门语言能够快速入门掌握,短期能让我找到工作