IBM System p5 服务器 HACMP 安装指南

 

. 系统需求

1.1 硬件需求

       IBM HACMP 支持所有 IBM System p5 服务器。

 

1.2 软件需求

 

1.2.1 AIX RSCT 版本要求

AIX 5L Version

RSCT Version

RSCT Filesets

AIX 5L Version 5.3 TL1

2.4.2

rsct.compat.basic.hacmp 2.4.2.0

rsct.compat.clients.hacmp 2.4.2.0

rsct.core.sec 2.4.2.1

rsct.core.rmc 2.4.2.1

AIX 5L Version 5.2 TL5

2.3.6

rsct.compat.basic.hacmp 2.3.6.0

rsct.compat.clients.hacmp 2.3.6.0

rsct.core.sec 2.3.6.1

rsct.core.rmc 2.3.6.1

 

1.2.2  AIX BOS 软件要求

AIX 5L BOS Component

AIX 5L V5.2 TL5 或更新版本

AIX 5L V5.3 TL1 或更新版本

bos.adt.lib

5.3.0.10

5.2.0.10

bos.adt.libm

5.3.0.10

5.2.0.13

bos.adt.syscalls

5.3.0.10

5.2.0.11

bos.net.tcp.client

5.3.0.10

5.2.0.14

bos.net.tcp.server

5.3.0.10

5.2.0.14

bos.rte.SRC

5.3.0.10

5.2.0.10

bos.rte.libc

5.3.0.10

5.2.0.14

bos.rte.libcfg

5.3.0.10

bos.rte.libcur

5.3.0.10

5.2.0.10

bos.rte.libptdreads

5.3.0.10

5.2.0.12

bos.rte.odm

5.3.0.10

5.2.0.11

bos.data (require for cluster.man.en_US.es)

5.3.0.10

5.2.0.10

bos.clvm.enh (require for CLVM)

bos.rte.lvm.rte (require for CLVM)

 

 

. 安装前的准备工作

       本安装指南所提及的 node1 node2 分别表示安装 HACMP 的两台 p5 服务器,本例中采用 IP 别名方式做心跳,oracle 应用做为上层应用。安装 HACMP 前需完成以下工作 :

 

2.1  配置集群网络

       HACMP 集群的 IP 地址分为三大类:Boot ip( 也叫 base ip)Service ip Heartbeat ip( 使用 IP 做心跳时需要 )。这三种 IP 最好都在不同网段。下面是本文中采用的 IP 分配,仅供参考:

 

集群网络配置

节点

IP 类别

IP 地址

IP 标签

网络接口

node1

Boot ip

192.168.25.23/16

ha1_bt1

en0

node1

Boot ip

10.0.25.23/16

ha1_bt2

en1

node2

Boot ip

192.168.25.24/16

ha2_bt1

en0

node2

Boot ip

10.0.25.24/16

ha2_bt2

en1

node1,node2

Service ip

10.1.25.1/16

ha_svc1

node1,node2

Hearbeat ip offset

10.2.25.1/16

ha1_bt1

 

       上例子中有 IP 标签的 IP 地址都需加入 /etc/hosts 文件。/etc/hosts 文件内容如下:

127.0.0.1      loopback localhost

192.168.25.23     ha1_bt1

192.168.25.24     ha2_bt1

10.0.25.23    ha1_bt2

10.0.25.24    ha2_bt2

10.1.25.1        ha_svc1

 

       因为 Hearbeat ip offset 是一个地址段,10.2.25.1/16 只是一个起始地址,所以不需要加入到 /etc/hosts 中。

为保证主机名解析正确无误,修改 AIX 解析顺序:

# echo “hosts = local, bind” >/etc/netsvc.conf

 

2.2  配置集群共享磁盘

       如果采用 EXP24 作为共享存储,需更改 SCSI ID;如果采用 DS4000 系列存储,可跳过此步。EXP24 作共享磁盘需更改服务器端的 SCSI 通道 ID,以免 SCSI ID 冲突。默认 SCSI ID 7,可将其中一台服务器的 SCSI ID 改为 6 或者 8SCSI ID 的值越大,优先级越高,SCSI ID 的范围是 1-15SCSI ID 的更改可在 SMS 菜单中进行,也可使用以下命令进行更改:

# chdev -a id=6 -l scsi2 -P

 

其中 scsi2 是服务器与 EXP24 连接的 SCSI 通道。

 

       node1 上在创建共享磁盘卷组。使用 smitty _mkovg 创建一个 Original VG VOLUME GROUP name 处输入卷组的名称,并在 PHYSICAL VOLUME names 处选择共享磁盘中的 pv,将 Activate volume group AUTOMATICALLY at system restart 选项由 yes 改为 no

 

Add an Original Volume Group

 

[Entry Fields]

VOLUME GROUP name [datavg]

Physical partition SIZE in megabytes +

* PHYSICAL VOLUME names [hdisk3] +

FORCE the creation of volume group? no +

Activate volume group AUTOMATICALLY no +

at system restart?

Volume group MAJOR NUMBER [] +#

Create VG Concurrent Capable? no +

 

注意:

1)需要将卷组设置为系统开机时不自动激活,即将“Activate volume group AUTOMATICALLY at system restart?”的值设为 NO

2)如果采用磁盘心跳,需将磁盘心跳所在的磁盘的卷组设为 concurrent 模式的 VG

 

     node1 的共享磁盘卷组上创建逻辑卷及文件系统。根据应用的要求创建相应大小的逻辑卷及文件系统。

node1 上使用以下命令反激活卷组。

# varyoffvg

 

2.3  添加 tty 设备 ( 串口心跳 )

       node1 node2 上安装串口扩展卡,并用串口线将两个节点相连。

       添加串口设备,将波特率设为 9600。使用 smitty maktty 命令添加串口设备,首先选择 rs232 作为终端类型,然后选择相应的异步适配器,最后回车出现以下界面。

Add a TTY

 

[TOP] [Entry Fields]

TTY type tty

TTY interface rs232

Description Asynchronous Terminal

Parent adapter sa0

* PORT number [0] +

Enable LOGIN disable +

BAUD rate [9600] +

PARITY [none] +

BITS per character [8] +

Number of STOP BITS [1] +

TIME before advancing to next port setting [0] +#

TERMINAL type [dumb]

FLOW CONTROL to be used [xon] +

[MORE...29]

 

       PORT number 处选择端口号,在 BAUD rate 处选择波特率为 9600,应保证两节点之间的串口端口的波特率相同。

 

测试串口是否工作正常。在 node1 节点上进行以下操作:

node1# cat /etc/hosts >/dev/tty0

 

node2 节点上进行以下操作:

node2# cat < /dev/tty0

 

如果在 node2 上看到文字输入,表示串口工作正常

 

2.4 建立应用启动和停止脚本

       分别在两个节点在创建应用启动和停止脚本,并让这两个脚本有执行权限。两个节点的脚本的路径必须一致。

# touch /usr/sbin/start_oracle /usr/sbin/stop_oracle

# chmod +x /usr/sbin/start_oracle /usr/sbin/stop_oracle

 

. 安装步骤

 

3.1 安装 HACMP 软件及相应的补丁。

       本安装指南讲述 HACMP/ES 的安装过程,如果需要使用 HACMP/XD,请参考 IBM 相关资料进行正确安装。将 HACMP V5.4 光盘放入光驱后,请安装以下软件包:

HACMP 软件列表

HACMP Fileset

Description

cluster.es

HACMP/ES Basic software

cluster.es.cfs

HACMP/ES Cluster File System Support

Cluster.es.cspoc

HACMP/ES CSPOC

Cluster.es.plugins

HACMP/ES plug-in software

Cluster.license

HACMP Electronic License

cluster.man.en_US.es

HACMP/ES english man pages

 

3.2 建立集群:通过以下路径进入添加集群界面,然后输入集群名称。

smitty hacmp->Extended Configuration->Extended Topology Configuration ->Configure an HACMP Cluster->Add/Change/Show an HACMP Cluster

 

Add/Change/Show an HACMP Cluster

 

[Entry Fields]

* Cluster Name [ha_cluster]

 

3.3 添加节点:通过以下路径进入添加集群节点界面,输入节点名和此节点的通信接口 ( 这里使用上面提到的 Boot ip)

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Nodes->Add a Node to the HACMP Cluster

 

3.3.1 添加节点 1

 

Add a Node to the HACMP Cluster

 [Entry Fields]

* Node Name [node1]

Communication Path to Node [ha1_bt1]

 

以相同方法添加第二个节点。如果有多个节点,以此类推。

 

3.3.2  添加节点 2

Add a Node to the HACMP Cluster

 

 [Entry Fields]

* Node Name [node2]

Communication Path to Node [ha2_bt1]

 

3.4 在两节点上收集 HACMP 相关信息 ( 可选 ):通过以下路径进行集群信息收集。

smitty hacmp->Extended Configuration->Discover HACMP-related Information from Configured Nodes

 

Extended Configuration

Discover HACMP-related Information from Configured Nodes

 Extended Topology Configuration

 Extended Resource Configuration

 Extended Cluster Service Settings

 Extended Event Configuration

 Extended Performance Tuning Parameters Configuration

 Security and Users Configuration

 Snapshot Configuration

 Export Definition File for Online Planning Worksheets

 

 Extended Verification and Synchronization

 HACMP Cluster Test Tool

 

3.5 添加网络:

       HACMP 的网络分为 Discovered network Pre-defined network 两种,如果之前有收集 HACMP 的相关信息,可选 Discovered network;否则,选择 Pre-defined network。此处可以根据此集群采用的心跳方式选择相应的网络,包括 ether networkdiskhb network rs232 network。本例中我们采用 IP 别名方式做心跳。

 

smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Networks->Add a Network to the HACMP Cluster


       我们采用 IP 网络做为心跳网络,在“IP Address Offset for Heartbeating over IP Aliases”处填写心跳起始地址。本例中每个节点有两个网口并且采用 IP 别名方式做心跳,所以心跳 IP 地址会采用 10.2.25.1,10.2.25.2,10.3.25.1,10.3.25.2 这四个 IP 地址。

 

Add an IP-Based Network to the HACMP Cluster

 

[Entry Fields]

* Network Name [net_ether_01]

* Network Type ether

* Netmask [255.255.0.0] +

* Enable IP Address Takeover via IP Aliases [Yes] +

IP Address Offset for Heartbeating over IP Aliases [10.2.25.1]

 

3.6 添加通信接口:
smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Communication Interfaces/Devices->Add Communication Interfaces/Devices->Add Discovered Communication Interface and Devices->Communication Interfaces->ALL

 

Select Point-to-Point Pair of Discovered Communication Devices to Add

 

Move cursor to desired item and press F7.

ONE OR MORE items can be selected.

Press Enter AFTER making all selections.

 

[MORE…4]

 en0 ha1_bt1 192.168.25.23

 # net_ether_01 / node1

 en1 ha1_bt2 10.0.25.23

 # net_ether_01 / node2

 en0 ha2_bt1 192.168.25.24

 en1 ha2_bt2 10.0.25.24

[BOTTOM]

选择四个网口 (boot ip) 做为通信接口,然后回车。

 

3.7 添加通信设备(用于串口心跳和磁盘心跳)

       如果采用 IP 网络做心跳可跳过此步骤:此步骤的样例是采用磁盘心跳的方式,如果采用串口心跳的话,选择串口设备即可。
smitty hacmp->Extended Configuration->Extended Topology Configuration->Configure HACMP Communication Interfaces/Devices->Add Communication Interfaces/Devices->Add Discovered Communication Interface and Devices->Communication Devices

 

Select Point-to-Point Pair of Discovered Communication Devices to Add

 

Move cursor to desired item and press F7.

ONE OR MORE items can be selected.

Press Enter AFTER making all selections.

 

 # Node Device Pvid

node2 hdisk3 000d3adaf6804f40

node1 hdisk3 000d3adaf6804f40

node1 tmscsi0

node2 tmscsi0

node1 tmscsi1

 

选择 node1 node2 上的 hdisk3,然后回车即可。

 

3.8 添加应用服务器:在 Server Name 处输入应用的名称,在 Start Script Stop Script 处输入应用的启动和停止脚本的路径。


smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resources Configuration->Configure HACMP Applications Servers->Configure HACMP Application Servers->Add an Application Server

 

Add Application Server

 

 [Entry Fields]

* Server Name [oracle]

* Start Script [/usr/sbin/start_oracl>

* Stop Script [/usr/sbin/stop_oracle]

Application Monitor Name(s) +

 

此应用服务的启动和停止脚本就是之前在做准备工作时创建的那两个脚本。

3.9  添加服务 IP
smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resources Configuration->Configure HACMP Service IP Labels/Addresses->Add a Service IP Label/Address->Configurable on Multiple Nodes

Add a Service IP Label/Address configurable on Multiple Nodes (extended)

 

 [Entry Fields]

* IP Label/Address ha_svc1 +

* Network Name net_ether_01

Alternate Hardware Address to accompany IP Label/A []

ddress

       首先选择此服务 IP 在哪个网络上,我们这里选择 net_ether_01 后,将会出现以上界面。在 IP Label/Address 处选择相应的服务 IP Label

3.10  添加资源组:
smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resource Group Configuration->Add a Resource Group

Add a Resource Group (extended)

 

 [Entry Fields]

* Resource Group Name [oracle_resg]

* Participating Nodes (Default Node Priority) [node1 node2] +

 

Startup Policy Online On Home Node O>+

Fallover Policy Fallover To Next Prio>+

Fallback Policy Fallback To Higher Pr>+

 

       Resource Group Name 处输入资源组的名称,在 Participating Nodes (Default Node Priority) 处选择参与的节点。

 

3.11  更改资源组属性:

将服务 IP、应用服务器和卷组都加入到此资源组中
smitty hacmp->Extended Configuration->Extended Resource Configuration->HACMP Extended Resource Group Configuration->Change/Show Resources and Attributes for a Resource Group

 

Change/Show All Resources and Attributes for a Resource Group

 

[TOP] [Entry Fields]

Resource Group Name oracle_resg

Participating Nodes (Default Node Priority) node1 node2

 

Startup Policy Online On Home Node O>

Fallover Policy Fallover To Next Prio>

Fallback Policy Fallback To Higher Pr>

Fallback Timer Policy (empty is immediate) [] +

 

Service IP Labels/Addresses [ha_svc1] +

Application Servers [oracle] +

 

Volume Groups [datavg ] +

Use forced varyon of volume groups, if necessary false +

[MORE...20]

 

       选择刚刚创建的资源组后,将会出现以上界面。在 Service IP Labels/Addresses 处选择刚创建的服务 IP,在 Application Servers 处选择刚创建的应用服务,在 Volume Groups 处选择共享 VG

 

3.12 验证配置并与集群中的其它节点进行同步:

       必须保证同步的结果是正确,如果有错误出现,请按照错误提示进行相应调试.

smitty hacmp->Extended Configuration->Extended Verification and Synchronization

 

HACMP Verification and Synchronization

 

 [Entry Fields]

* Verify, Synchronize or Both [Both] +

* Automatically correct errors found during [No] +

verification?

 

* Force synchronization if verification fails? [No] +

* Verify changes only? [No] +

* Logging [Standard] +

 

按照默认值即可,无须更改。

3.13  测试 HACMP 是否正常工作(可选):
smitty hacmp->Extended Configuration->HACMP Cluster Test Tool->Execute Automated Test Procedure

 

Execute Automated Test Procedure (extended)

 

[Entry Fields]

Verbose Logging [Yes] +

Cycle Log File [Yes] +

Abort On Error [No] +

 

按照默认值即可,无须更改。

 

3.14  启动 HACMP

       启动 HACMP 可以选择是在两个节点同时启动 HACMP 服务或只有某一节点上启动 HACMP 服务。可将“Startup Cluster Information Daemon”的值设为 true,这样在启动 HACMP 服务的同时会启动集群信息进程。
smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Start Cluster Services

 

Start Cluster Services

 

 [Entry Fields]

* Start now, on system restart or both now +

Start Cluster Services on these nodes [node1, node2] +

* Manage Resource Groups Automatically +

BROADCAST message at startup? true +

Startup Cluster Information Daemon? true +

Ignore verification errors? false +

Automatically correct errors found during Interactively +

cluster start?

       Start Cluster Services on these nodes 处选择要在哪些节点上启动 HACMP Cluster

 

3.15  查看 HACMP 状态:
smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Show Cluster Services

 

Manage HACMP Services

 

Move cursor to desired item and press Enter.

 

 Start Cluster Services

 Stop Cluster Services

 Show Cluster Services

选择 Show Cluster Services,然后回车查看 HACMP 当前状态

 

3.16 停止 HACMP
smitty hacmp->System Management (C-SPOC)->Manage HACMP Services->Stop Cluster Services

 

Stop Cluster Services

 

[Entry Fields]

* Stop now, on system restart or both now +

Stop Cluster Services on these nodes [node1,node2] +

BROADCAST cluster shutdown? true +

* Select an Action on Resource Groups Bring Resource Groups>+

 

Stop Cluster Services on these nodes 处选择要停止 HACMP 服务的节点。

 

 

. 安装后的任务以及常见问题

4.1 安装后的任务

1)修改 PATH 环境变量:将 /usr/es/sbin/cluster /usr/es/sbin/cluster/utilities 加入 PATH 环境变量中,这样可以在命令行中使用 HACMP 自带的工具。

2)使用以下命令追踪 HACMP 实时运行状态:

# tail –f /tmp/hacmp.out

3)常用命令:clstatclinfoclRGinfocldisp

      

4.2 常见问题

1)如果采用磁盘心跳需将共享磁盘所在的卷组设为 concurrent 模式。

2)当集群中的一个节点重新加入集群时,所有的资源和服务不会自动切换,需在恢复的节点上手动启动 HACMP

 

 

 

From

http://www.ibm.com/developerworks/cn/edu/au-dw-au-hacmpinst-i.html

 

 

 

 

 

------------------------------------------------------------------------------

Blog http://blog.csdn.net/tianlesoftware

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977()

DBA3 群:62697850   DBA 超级群:63306533;    

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

转载于:https://www.cnblogs.com/tianlesoftware/archive/2011/01/19/3609840.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/380756.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

学java要学vue吗_学vue之前必看

Vue学习1.1 vue.js是什么&#xff1f;​ Vue是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是&#xff0c;Vue 被设计为可以自底向上逐层应用。Vue 的核心库只关注视图层&#xff0c;不仅易于上手&#xff0c;还便于与第三方库或既有项目整合。另一方面&#xff0c…

python 全局_全局关键字,带Python示例

python 全局Python全局关键字 (Python global keyword) global is a keyword (case-sensitive) in python, it is used to declare a global variable inside a function (from a non-global scope). global是python中的一个关键字(区分大小写)&#xff0c;用于在函数内部声明…

php中函数的默认值,参数的顺序

形式参数可以在定义时候给参数赋一个默认值&#xff0c;默认值不能是一个变量&#xff0c;可以是常量&#xff0c;当调用函数时&#xff0c;如果没有参数&#xff0c;函数就会按照默认值处理&#xff0c;如果传递了参数&#xff0c;就按照传递的参数处理 <?phpheader(cont…

.NET Enterprise Services Performance

http://msdn.microsoft.com/library/default.asp?url/library/en-us/dncomser/html/entsvcperf.asp?frametrue Summary: See the performance of native COM and .NET Enterprise Services components when applied to different activation and calling patterns. Get guide…

10款精选的用于构建良好易用性网站的jQuery插件

这篇随笔收集了10款非常给力的jquery 插件&#xff0c;帮助你构建易用性良好的网站&#xff0c;希望对你有用&#xff01; Embedded help system 看过该插件demo后&#xff0c;感叹道&#xff0c;真是太棒了&#xff01; 点demo里的How to下面的几个链接看看效果:) Embedded …

常见的Java审计代码函数关键字_转载:Java代码审计汇总系列(一)——SQL注入

原文链接&#xff1a;https://cloud.tencent.com/developer/article/1534109一、代码审计相比黑盒渗透的漏洞挖掘方式&#xff0c;代码审计具有更高的可靠性和针对性&#xff0c;更多的是依靠对代码、架构的理解&#xff1b;使用的审计工具一般选择Eclipse或IDEA&#xff1b;审…

python中bool函数_bool()函数以及Python中的示例

python中bool函数Python bool()函数 (Python bool() function) bool() function is used to convert a given value to the Boolean value (True or False) as per the standard truth testing procedures. It accepts a value (like an integer, list, maps, etc) and convert…

php中函数参数个数问题

形参大于实参 <?phpheader(content-type:text/html;charsetutf-8);function fun($name,$sex,$age){echo 名字是.$name,<br>;echo 性别是.$sex,<br>;echo 年龄是.$age,<br>;}fun(DL_one,21); ?>可以看出&#xff0c;能执行但报错 实参个数大于形参个…

忘记交手机费,招商银行的自助缴费不错!

最近一直太忙,结果手机费忘记交了,前天一拨电话,"对不起,您的手机已欠费",不过,只是限制呼出,还能接(全球通这点还是挺人性化的,不过是否值50大洋的月租?) 今天上网用一卡通缴费,点完确定,系统提示缴费成功,手机立即就可以拨出去了.效率还是很高的,省了我不少麻烦. …

java criteria exist_Java Criteria.addExists方法代碼示例

import org.apache.ojb.broker.query.Criteria; //導入方法依賴的package包/類/*** see org.kuali.kfs.module.bc.document.dataaccess.BudgetConstructionLockDao#getOrphanedPositionLocks(java.lang.String)*/public List getOrphanedPositionLocks(String lockUnivId) {Cri…

python实例31[解析buildlog]

简单地解析VisualStudio的buildlog&#xff1a;&#xff08;有的时候log文件太长&#xff0c;但是我们只是关心warning和error&#xff0c; 通过该程序可以直接得到所有的warning和error的行&#xff09; importrewarninglist []warninglist.append("warning C\d{4}"…

php的静态变量static在函数内部

静态变量放在函数内 <?phpheader(content-type:text/html;charsetutf-8);function fun(){static $num1;$num;echo $num,<br>;}fun();fun(); ?>静态变量放在函数内&#xff0c;作用域没变&#xff0c;生命周期变了&#xff0c;页面执行完毕才销毁&#xff0c;静态…

java json帮助类_java 写一个JSON解析的工具类

上面是一个标准的json的响应内容截图&#xff0c;第一个红圈”per_page”是一个json对象&#xff0c;我们可以根据”per_page”来找到对应值是3&#xff0c;而第二个红圈“data”是一个JSON数组&#xff0c;而不是对象&#xff0c;不能直接去拿到里面值&#xff0c;需要遍历数组…

关键字驱动测试示例_带有示例的False关键字

关键字驱动测试示例Python False关键字 (Python False keyword) False is a keyword (case-sensitive) in python, it is a Boolean value (a value of class type bool). False is the result of a comparison operation. False是python中的关键字(区分大小写)&#xff0c;它是…

DC (域控制器)上 DNS 不查询非掌管 Domain(域) 的解决办法 --(转)

如何移除根 DNS 区域 运行 Windows Server 2003 的 DNS 服务器在它的名称解析过程中遵循特定的步骤。DNS 服务器首先查询它的高速缓存&#xff0c;然后检查它的区域记录&#xff0c;接下来将请求发送到转发器&#xff0c; 最后使用根服务器尝试解析。 默认情况下&#xff0c;Mi…

数据库主键的使用心得

1.数据库设置数据格式的作用其实是为了规范数据的存储 同时数值型也会便于后期统计&#xff0c; 如果每个字段都是varchar来存储就失去了他本身的意义了。 2.设置主键是为了让记录不重复&#xff0c;如监测站点&#xff0c;监测时间这样的联合主键有利于重复的记录进不去&#…

php函数的预加载

php代码的执行过程&#xff1a;词法分析-------语法分析------------编译-----------加载编译的代码--------执行 函数的预加载就是在加载编译的代码过程中&#xff0c;会把函数的代码加载到内存中去&#xff0c;搜易我们在执行代码的时候&#xff0c;函数已经在内存中了 <…

python none_None关键字,带Python示例

python nonePython None关键字 (Python None keyword) Note: None is not a keyword – we are just considering & writing it as a keyword which is a replacement of null (in C/C). 注意&#xff1a; None不是关键字–我们只是考虑并将其编写为关键字&#xff0c;以替…

永久勘误:微软等面试100题系列,答案V0.4版[第41-60题答案]

永久勘误&#xff1a;微软面试100系列答案V0.4版[第41-60题答案] 作者&#xff1a;July、何海涛等网友 ---------------------------几点声明: I、 此微软面试100题系列永久更新&#xff0c;答案永久勘误&#xff0c;永久优化。随时&#xff0c;永远&#xff0c;欢迎&#xff…

php中的__FUNCTION__

__FUNCTION__:魔术常量&#xff0c;获取函数名 <?phpheader(content-type:text/html;charsetutf-8);function fun(){echo __FUNCTION__;}fun(); ?>