P550和DS5020安装
一,硬件概述
1,硬件设备拓扑图
2,客户基本需求
1)IBMP550两台,操作系统版本为AIX5308-10,HA版本是5.4
2)DS5020一台,RAID5+热备模式,分区如下
Lun1=200G
Lun2=200G
Lun3=200G
Lun4=200G
其他空间备用,没有划分LUN。
二,AIX操作系统安装
1,系统加电
连接电源后等待服务器自检,当液晶板下方电源绿色指示灯闪亮时为自检通过。按下白色电源开关,电源指示灯长亮,加载完光驱后,把操作系统第一张光盘插入光驱。当听到机器有蜂鸣声且出现选择启动项画面时,按下键盘上的“5”键,注意敲击键盘是时机要在两声蜂鸣声之间否则无效。如操作成功,则系统从安装介质上引导。
显示器显示如下信息,要求用户选择主控台
☆☆☆☆Please define the system console☆☆☆☆
Type F1 and press to use this terminal as the system console.
Type een 1 druk op enter om deze terminal als de systememconsole
Skrive tallet 1 og trykk paa enter for aa bruke denne terminalatrion
Pour definir ce terminal comme console systeme
键入 2,语言环境 屏幕上将不断显示一些信息,几分钟后出现画面,要求用户选择安装语言环境 1 Type 1 and press enter to have english during install 2 Type 2 en druk op enter om tijdens het installern het Nederlands te krijgen 3 Entrez 3 pour effectuer 1 installation en francais 4. Fr Installation in deutscher sprache 4 eingeben und die eingabetaste drcken. …… Choice[ 1 ]: 键入”[ 1 ]”后回车,选择语言环境为English 3,此后屏幕出现 Welcome to Base Operating System Installation and Maintenance Type the number of your choice and press enter. Choice is indicated by>>> >>>1 Start install now with default settings 2 Change/show installation settings and install 3 Start Maintenance Mode for system Recovery 88 Help? 99 Previous Menu >>> Choice ( ): 这是系统安装和维护的主菜单。我们需要改变一些设置选项再进行基本操作系统的安装; 4,改变安装设置 Change Method of Installation Type the number of your choice and press Enter 1 New and Complete Overwrite Overwrites EVERYTHING on the disk selected for installation Warning: Only use this method if the disk is totally empty Or there is nothing on the disk you want to preserve 2 Preservation Install Preserve SOME of the existing data on the disk selected for Installation Warning: This method overwrites the user(/user), variable(/var), temporary(/tmp), and root (/) file systems. Other product (application) files and configuration data will be destroyed. 3 Migration Install Upgrades and Base Operating System to current release Other product (application) files and configuration data will be spared. 88 Help? 99 Previous Menu >>>Choice [ 2 ]:1 如图所示:键入[ 1 ]将安装方式改为New and complete overwrite 5,在上面菜单中,键入”[ 2 ]”,屏幕出现”Install and Setting”画面: Installation and a Settings Either type 0 and press enter to install with current settings, or type the number of the setting you want to change and press enter 1 system setting: Method of installation …………… Preserve install Disk where you want to install…… hdisk0 2 Primary Language Environment setting (AFTER Install): Cultural Convention………. English(United States) Language………………….. English(United States) Keyboard………………….. English(United States) Keyboard Type …………… Default 3 Install Trusted Computing Base… No >>>0 Install AIX with the current settings listed above 88 Help? 99 Previous Menu >>>Choice [ ]: 这是系统安装的默认设置,用户应根据需要进行修改。 与此同时,在屏幕的右下角会出现如下的警告信息: WARNING:Base Operating System installation will destroy Or impair recovery of ALL data on the destination disk hdisk0 以上是提醒用户安装系统的后果将破坏用户原有的硬盘上的数据。 因为我们是第一次安装所以应选择:完全覆盖安装(New and complete overwrite), 所以键入[ 1 ]:(进入菜单更改安装方式) 6,选择安装AIX的目的硬盘 Change Disks Where You Want to Install Type one or more numbers for the disk(s) to be used for installation and press Enter. To cancel a choice, type the corresponding number and press Enter. At least one bootable disk must be selected. The current choice is indicated by>>>. Size VG Name Location Code (GB) Status Bootable 1 hdisk0 00-01-00-0.0 73.4 rootvg yes 2 hdisk1 00-01-00-1.0 73.4 no >>> 0 Continue with choices indicated above 66 Disks not known to Base Operating System Installation 88 Help? 99 Previous Menu >>> Choice[ 0 ]:1 键入[ 1 ],安装到hdisk0 Change Disks Where You Want to Install Type one or more numbers for the disk(s) to be used for installation and press Enter. To cancel a choice, type the corresponding number and press Enter. At least one bootable disk must be selected. The current choice is indicated by>>> Size VG Name Location Code (GB) Status Bootable >>> 1 hdisk0 00-01-00-0.0 73.4 rootvg yes 2 hdisk1 00-01-00-1.0 73.4 no >>> 0 Continue with choices indicated above 66 Disks not known to Base Operating System Installation 88 Help? 99 Previous Menu >>> Choice [ 0 ]: 此时会在hdisk0前出现 “>>>”符号 来表明系统将安装至该硬盘。 选好后选择:[ 0 ]返回上级菜单。 7,选择后显示如下 Installation Settings Either type 0 or press Enter to install with current setting, or type the number of the setting you want to change and press Enter System Settings Method of installation………….. New and Complete Overwrite Disk where you want to Install …. Hdisk0 Primary Language Environment Settings (AFTER install) Cultural Convention………. English(United States) Language………………….. English(United States) Keyboard………………….. English(United States) Install Trusted Computing Base ….. no Install with the settings listed above Help? Choice [ 1 ]:0 如需要对语言键盘进行修改则按“2”回车,进入修改语言菜单;如需让系统支持位等设置则按“3”回车,进行系统支持设置 8,开始安装 设置完毕选择0 安装即开始,屏幕将显示安装的进行情况。此时,只需耐心等待。BOS安装过程中会提示更换光盘,直至安装完毕。 Installing Base Operating System Please wait Approximate Elapsed time %task completed (in minutes) 1 系统安装完成后,会自动重新启动 三,AIX操作系统配置 1,安装AIX系统及应用软件所需补丁包,使用命令:smitty installp进行安装,所需补 丁包如下: bos.adt bos.dlc bos.net bos.cifs_fs bos.clvm bos.data bos.perf.gtools bos.compat X11.compat rsct.basic rsct.compat.basic rsct.compat.clients rsct.opt.storagerm 2,镜像rootvg,并调整系统文件大小 hdisk0和hdisk1为主机本地硬盘,对其镜像,操作如下: extendevg rootvg hdisk1 mirrorvg rootvg hdisk0 hdisk1,此处大概需要等待10分钟左右。 bosboot -a -d /dev/hdisk1 在hdisk1上添加启动文件 bootlist -m normal hdisk0 hdisk1设置启动顺序。 更改文件系统大小: chfs -a size=20G / chfs -a size=20G /usr chfs -a size=10G /var chfs -a size=4G /tmp chfs -a size=2G /var/adm/ras/platform chfs -a size=10G /opt chfs -a size=1G /home chps - s 126 hd6 调整page space空间大小为内存大小,其中126 为pp个数,此处每个pp大小为256M。可使用lsvg rootvg 查看。 3,修改主机名,调整用户 smitty hostname 设置两台P570主机名分别为yderp1(下),yderp2(上) smitty password:密码均为:root 修改hosts文件: vi /etc/hosts 192.168.10.11 yderp1_boot1 yderp1 192.168.20.11 ydepr1_boot2 yderp1 192.168.10.12 yderp2_boot1 yderp2 192.168.20.12 yderp2_boot2 yderp2 172.19.80.79 serv 172.19.80.80 prev1 172.19.80.81 prev2 调整用户: vi /etc/security/limits default: fsize = -1 core = -1 cpu = -1 data = -1 rss = 65536 stack = -1 nofiles = 2000修改完成重新启动系统。 4,配置网卡IP地址,测试连通性 smitty tcpip 选择Minimum Configuration & Startup 选择en0 HOSTNAME [yderp1] Internet ADDRESS [192.168.10.11] Network MASK [255.255.255.0] 按同样的放法,分别配置其他网卡,注意修改主机名。配置完成利用ping命令测 试网络连通性。 5,调整系统时间,进行yderp2和yderp2的时间同步 可使用命令:smitty date对时间进行修改,chtz BEIST -8修改系统时 区。 进行yderp1和yderp2的时间同步 在yderp1上编辑文件 vi /etc/ntp.conf server 127.127.1.0 prefer driftfile /etc/ntp.drift tracefile /etc/net.trace 在ydepr2上编辑文件 vi /etc/ntp.conf server 192.168.10.11 prefer driftfile /etc/ntp.drift tracefile /etc/ntp.trace 在yderp1上启动ntp服务:smitty xntpd 回车,选择both,回车。 等待260s,在yderp1上使用lssrc -ls xntpd 查看状态 查看第五行显示 SYS stratum 4 则在yderp2上运行命令ntpdate 192.168.10.11,进行时间同步。 smitty xntpd,选择both启动yderp2的ntp服务。 6,配置串口心跳,并测试 smitty 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连接一号机和二号机的COM0,作为HACMP的心跳线 在yderp1上执行:cat < /dev/tty0 在yderp2上执行:cat /etc/hosts > /dev/tty0 在yderp1上如果能显示出etc/hosts文件内容,说明心跳线配置正确。 7,在两node上创建HACMP启动脚本 mkdir /ha cd ha touch yderp1start.sh touch yderp1stop.sh chmod 775 yderp1st* 四,HACMP的安装配置 1,安装HA软件 使用命令smitty installp 回车 INPUT device / directory for software [/hacmp5.4]此处填写HA软件所在的目录。 ACCEPT new license agreements? [yes] 然后回车,按F4进入HA软件列表,使用方向键上下移动,并按F7选择需要安装的软件包(除cluster.hativoli、cluster.haview外其他都要安装),然后回车进行安装。同样,在主机trade2上进行HA的安装。 安装完成务必要重启系统 2,修改netmon.cf和rhosts文件 vi /usr/es/sbin/cluster/netmon.cf ydepr1 yderp2 yderp1_boot1 yderp1_boot2 yderp2_boot1 yderp2_boot2 serv prev1 prev2 vi /usr/es/sbin/cluster/etc/rhosts内容同netmon.cf一致,并且,两node都要配置更改。 3,查看并配置共享资源 Lspv hdisk0 rootvg active hdisk1 rootvg active hdisk2 rootvg active hdisk3 rootvg active hdisk4 rootvg active hdisk5 rootvg active 使用命令chdev –l hdiskx –a pv=yes对硬盘进行串号识别。 创建VG smitty vg 选择Add a Volume Group 选择Add an Original Volunme Group 输入需要创建的VG的名字,PP SIZE大小,需要的硬盘,并设为开机不启动,此处设为datavg pp size=512M,使用的硬盘为hdisk2-5。 4,开始配置HACMP 1)定义cluster 使用命令smitty hacmp进入HACMP配置菜单,并依次选择 Extend Configuration-> Extend Topology Configuration-> Configure an HACMP Cluster 2)定义节点 smitty hacmp Extend Configuration-> Extend Topology Configuration-> Configure HACMP Node-> Add a node to the HACMP Cluster 3)定义网络 定义IP网络 -> smitty hacmp -> 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网络 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)定义网络接口 定义IP网络接口 yderp1_boot1接口定义 smitty hacmp 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) [输入字段] * IP Label/Address [yderp1_boot1] + * Network Type ether * Network Name net_ether_01 * Node Name [yderp1] + * Network Interface [] 利用同样的方法定义其他的IP网络接口即: yderp1_boot2 yderp2_boot1 yderp2_boot2 定义非IP网络接口 定义yderp1tty 接口 -> smitty hacmp -> 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 [yderp1tty] * Network Type rs232 * Network Name net_rs232_01 * Device Path [/dev/tty0] * Node Name [yderp1] 按同样的方法定义yderp2的TTY。 5)定义Prev地址 ->smitty hacmp ->Extended Configuration ->Extended Topology Configuration ->Configure HACMP Persistent Node IP Label/Addresses ->Add a Persistent Node IP Label/Address Node Name trade1 Networkname net_ether_02 Node IP Label/Address trade1_pre 用同样的方法创建trade2的Prev地址。 6)定义Server IP smitty hacmp -> smitty hacmp ->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 [serv1] + * Network Name [net_ether_01] + 7)定义应用服务器 定义oraapp应用服务器 -> smitty hacmp ->Initialization and Standard Configuration ->Configure Resources to Make Highly Available ->Configure Application Servers ->Add an Application Server Add Application Server [输入字段] * Server Name [oraapp] * Start Script [/ha/yderp1start.sh] * Stop Script [/ha/yderp1stop.sh] 8)定义共享资源组 定义资源组 -> smitty hacmp -> Initialization and Standard Configuration -> Configure HACMP Resource Groups -> Add a Resource Group Resource Group Name [dataapp] Participating Nodes(Default Paiority) [yderp1 yderp2] 其他默认。 Change/Show Resources for a Resource Group (standard) 选择dataapp Service IP Lables/Addresses [serv] Application Servers [oraapp] Volume Groups [datavg] 其他默认,至此HACMP配置完毕。同步: smitty hacmp ->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] + 启动:smitty clstart,停止:smitty clstop. 五,Oracle的安装 1,创建Oracle安装目录文件系统,和数据库文件系统。 smitty lv,选择如图: 回车进入如下界面,按F4选择rootvg 之后会进入LV的配置界面,如图: 使用命令smitty jfs2选择如图: 进入如下界面,选择相应的LV NAME,创建挂载点,如图: 利用同样的方法,创建oracle数据库的文件系统。在Mount AUTOMATICALLY at system restart?这项,应设置成no。 挂载文件系统:mount /oracle mount /datalv 2,创建oracle用户和组。 所有机器的组、用户ID号要保持一致。 创建oinstall,dba,hagsuser组,创建oracle用户。 /bin/mkgroup oinstall /bin/mkgroup dba /bin/mkgroup hagsuser Smitty security ->选择添加用户->用户名oralce, Primary GROUP选oinstall, Group SET选dba,hagsuser 使用 passwd oracle改密码。 3,编辑.profile文件: vi /home/oracle/.profile,添加如下内容: export ORACLE_BASE= /oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db1 export ORACLE_SID=orcl export NLS_LANG=american_america.zhs16gbk export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss" export ORA_NLS33=$ORACLE_HOME/common/nls/admin/data export PATH=$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:/usr/local/bin:/usr/bin/X11:/usr/lbin:/usr/java14/jre/bin:/usr/java14/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:$ORACLE_HOME/lib32:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_HOME/product/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/JRE export LIBPATH=$ORACLE_HOME/lib export ORACLE_TERM=xterm umask 022 4,设置显示窗口 export DISPLAY=192.168.10.63:0.0 xhost + yderp1 5,使用命令gunzip –zvf 10gr2_aix5l_database.cpio.gz cpio -idcmv < 10gr2_aix5l_database.cpio 对安装包进行解压。 使用oracle用户,运行unzip 后的那个database目录下的runInstaller,oracle安装目录指定到/oracle/product/10.2.1,选择Install database Software only,在安装过程中可以根据提示运行脚本,安装完毕。 6,配置netca 使用oracle用户运行命令:netca,然后根据提示建立监听。 7,使用oracle用户运行dbca 选择custom database,输入数据库全局名,例如orcl(要同环境变量里设置的一样)内存比例可设置成60%。如果需要备份,要选择(enable archiving)。 至此ORACLE安装完毕。 Oracle修改Oracle的进程数[processes]及会话数[sessions] Oracle修改Oracle的进程数[processes]及会话数[sessions] 2008年01月30日 星期三 10:38 1.通过SQLPlus修改 Oracle的sessions和processes的关系是 sessions=1.1*processes + 5 使用sys,以sysdba权限登录: SQL> show parameter processes; NAME TYPE VALUE ------------------------------------ ----------- --------------------------------------- aq_tm_processes integer 1 db_writer_processes integer 1 job_queue_processes integer 10 log_archive_max_processes integer 1 processes integer 150 SQL> alter system set processes=400 scope = spfile; 系统已更改。 SQL> show parameter sessions; NAME TYPE VALUE ------------------------------------ ----------- ----------------------------------------- aq_tm_processes integer 1 db_writer_processes integer 1 job_queue_processes integer 10 log_archive_max_processes integer 1 processes integer 150 SQL> create pfile from spfile; 文件已创建。 重启数据库,OK! 【注:sessions是个派生值,由processes的值决定,公式sessions=1.1*process + 5】 2.通过修改oracle配置文件进行修改 修改SPFILEORCL.ORA文件中的processes的值。8.1.5中是init.ora文件,在9i中修改init.ora文件是无效的,这个文件由于是一个二进制的文件,不能直接使用notepad此类的编辑器打开。 否则会报错误ORA-27101 Shared memory realm does not exist。使用UltraEdit或者EditPlus之类的可以编辑二进制文件的编辑器打开此文件(直接编辑二进制文件),然后在Windows服务中重新启动Oracle服务器即可。 3.通过Oracle Enterprise Manager Console在图形化管理器中修改 a.以系统管理员的身份登入 b.进入数据库的例程-配置-一般信息-所有初始化参数 c.修改processes的值 d.Sessions的值由公式sessions=1.1*process + 5派生得到下载本文