




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
DB2 教程Linux 下 DB2 的安装DB2(7.1)在AIX上的安装DB2 7.1EE的安装步骤一, 安装前的准备工作1, 内存要求:db2要求的内存取决于服务器进程和客户端并发连接数,最小256MB。2, 硬盘空间free要大于300M(/usr),db2是安装在/usr/lpp/db2_07_01下;3, 基本上不需要打什么补丁,但注意尽量打全,因为有可能会用到除tcpip之外的协议,如IPX / SPX,NetBIOS;4, 建db2的用户(3个,分别为Instance user(db2inst1),UDF user(db2fenc1),admin user(db2admin)),3个用户分别属于db2iadm1.db2fadm1.db2asgrp这3个组。这步可以跳过,在db2安装过程中系统会自动建;二, 安装DB21, 以root用户登录;2,插入光盘;3,建mount点,mkdir /cdrom;4,mount光盘,mount rv cdrfs /dev/cd0 /cdrom注:弟4步可以用下面步骤代替smitty manfs选 cdrom File System选 Add a cdrom File Systems.Device Name处(用F4选cd0)Mount point处 (键入/cdrom)这样建立了一个文件系统,以后mount光盘只要用mount /cdrom就可以了。5,./db2setup开始安装db2可以用./db2setup d 这样会产生一个安装的log文件,/tmp/db2setup.trc6,选DB2 UDB Enterprise Edition7,选Create a DB2 Instance建instance会建用户,组,注意密码默认是ibmdb28,Create the Administration Server建db2管理员用户,组,密码同上9,安装结束三, 确认安装1, 以db2inst1登录;2, db2sampl,建sample数据库;3, db2start,启动数据库;4, db2 connect to sample,连接成功5, 删掉sample数据库,db2 drop databaseDB2 UDB 7.1 Enterprise Extended Edition Install on Red Hat Linux 7.1The purpose of this document is to provide a step-by-step installation of DB2 UniversalDatabase 7.1 Enterprise Extended Edition (DB2 EEE) on Red Hat Linux 7.1. It does not coverall the possible installation methods or running environments. All steps should be performed asroot unless otherwise noted.Overview of Installation Steps:1. Install Red Hat 7.1 on servers2. Configure networking hardware3. Setup NFS filesystem4. Create users and groups5. Enable rsh6. Install and setup DB27. Configure multiple nodes8. Configure the Administration Server9. Configure the Kernel10. Create a database(Step 1) Install Red Hat 7.1Typical installs of Red Hat 7.1 do not include all the necessary packages to install and run DB2EEE. When installing Red Hat 7.1 choose the option not to install a firewall. The followingservices also need to be installed:? X - if you wish to run the DB2 Java Control Center? Xinetd - required for DB2 Communication? rsh - required for DB2 EEE only (ssh will not work)? pdksh - required for install? Nfs-utils - required for NFS mount(Step 2) Configure networking hardwareDB2 EEE systems require communication between partitions. The demands for inter-nodecommunication vary based upon implementation. It is recommended that inter-nodecommunication be isolated to a network dedicated for this purpose. The following example setupsplits network activity between a public network and a private network for DB2 EEE by utilizingtwo network cards in each machine.Machine: DB2lab9Hostname: DB2lab9NIC 1 - IP address (public): 3- Subnet : NIC 2 - IP address (private): - Subnet: Machine: DB2lab10Hostname: DB2lab10NIC 1 - IP address (public): 4- Subnet: NIC 2 - IP address (private): 0- Subnet: (Step 3) Setup NFS file systemThe scalability of DB2 EEE is a result of maximizing the parallelism of hardware resources.There are a small number of configuration control files that all partitions in a DB2 system share.These files are made available by a NFS mounted file system. The steps for creating and testingthe NFS mount are:1. Create a directory /db2home on all the machines that will be in the cluster2. On the first machine in the cluster (the instance owner) prepare and mount the exported filesystemA. Create the /etc/exports file on DB2lab9B. Add the following entry /db2home db2lab*.local.domain(rw)C. On DB2lab9 restart the NFS service./etc/init.d/nfs restartD. Verify the export is working correctlyshowmount -exports3. On all other machines in the cluster mount the file systemA. Add the following entry to /etc/fstab DB2lab9:/db2home /db2home nfs rw 0 0B. Mount the exported file system on all the machines in the clustermount /db2homeC. Verify the mount by issuing the mount command with no options(Step 4) Create users and groupsThe DB2 setup program can create the necessary users and groups. The following are steps tocreate the required groups and users manually to ensure consistency across all machines.1. Create the necessary groups on all machinesgroupadd -g 550 db2iadmgroupadd -g 551 db2fadmgroupadd -g 552 db2as2. Create the necessary users on all machinesuseradd -u 550 -g 550 -d /db2home/db2inst1 db2inst1useradd -u 551 -g 551 -d /db2home/db2fenc1 db2fenc1useradd -u 552 -g 552 -d /db2home/db2as db2as3. Set passwords for users on all machinespasswd db2inst1passwd db2fenc1passwd db2asThe user db2inst1 will be the instance owner and administrator for DB2 EEE. Stored procedureswill run under the db2fenc1 ID.(Step 5) Setup rshDB2 EEE uses rsh to perform remote execution on machines in the cluster. There are twomethods for enabling rsh. The first method is to provide a security file .rhosts file in the instanceowners home directory. The second method is to provide a security file /etc/hosts.equiv for everymachine in the cluster. In either case the file/s list the users allowed to issue remote commandsand the machines where the remote commands may originate. User root is disabled from usingrsh in Red Hat Linux 7.1.Method One:1. Create the /db2home/db2inst1/.rhosts.equiv file2. Add the following entries to the .rhosts.equiv file:DB2lab9 db2inst1DB2lab10 db2inst13. Restart xinetd service on all machines/etc/init.d/xinetd restart4. Verify the rsh service is workingA. Login as user db2inst1B. Issue a remote command on each machine for example:rsh DB2lab10 ls /usrMethod Two:1. On every machine in the cluster create the /etc/hosts.equiv file2. Add the following entries to the hosts.equiv files:DB2lab9 db2inst1DB2lab10 db2inst13. Restart xinetd service on all machines/etc/init.d/xinetd restart4. Verify the rsh service is workingA. Login as user db2inst1B. Issue a remote command on each machine for example:rsh DB2lab10 ls /usr(Step 6) Install and Setup DB2 EEEThe install steps may depend on how you obtained DB2. If you downloaded the code you willneed to extract the files from the tar file before proceeding. If you obtained DB2 EEE on CD thiswill not be necessary. There are two scripts important to the setup and installation of DB2,db2_install and db2setup. The first, db2_install, will only install the DB2 libraries and can not beused to setup DB2 EEE or create db2 instances. The db2setup utility can be used for bothprocesses. This example will use both utilities to complete the installation. Complete thefollowing steps on each machine.1. Extract the DB2 RPMs (only required for downloaded TAR files)tar -xf db2eee linuxeee.english.tar2. Extract any fix pack appropriate for your version leveltar -xf FP3_U475391.tar3. Install the code on each serverdb2_install/FP3_U475391/installpatchDB2 will be installed into the following path /usr/IBMdb2/V7.1/. The db2setup scriptrequires libncurses.so.4 to be viewed properly. This library is not installed during thedefault install of Red Hat 7.1. The alternative to installing these libraries is to create asymbolic link to libncurses.so.5 with the following command. However, you will need topay close attention when running db2setup. The screen may display characters that do notexist.ln -sf /usr/lib/libncurses.so.5 /usr/lib/libncurses.so.44. Begin the setup of DB2 on the first machine (db2lab9)/usr/IBMdb2/V7.1/install/db2setup5. Choose the option to create a DB2 instance (this will only be completed on one node)6. Provide the proper user and group information as created in step 4 and continue the setupdb2inst1 will be used for the DB2 Instancedb2fenc1 will be used for the Fenced User7. Verify the setup by stopping and starting the db2 instance (db2inst1)As user db2inst1 issue the db2start and db2stop(Step 7) Configure multiple nodesAfter you have configured and setup DB2 EEE you will need to create new partitions. The/db2home/db2inst1/sqllib/db2nodes.cfg specifies what partitions exist in the DB2 EEE system.To add partitions:1. Add an entry into the db2nodes.cfg for the new partition1 db2lab10 02. Update the services file for listening ports both for external communication and for FCMcommunication between nodes. You can copy the entries from the end of the /etc/servicesfile or simply copy the file from the instance owning machine.3. To use a specific network for FCM communication edit the/db2home/db2inst1/sqllib/db2nodes.cfg and specify what network FCM should flow over.0 db2lab9 0 1 db2lab10 0 04. Verify communication by stopping and starting the instance, db2start and db2stop(Step 8) Configure the Administration ServerThe Administration Server is used for administration of instances.1. Begin the setup of the Administration Server by executing the db2setup command/usr/IBMdb2/V7.1/install/db2setup2. Choose the option to create an instance3. Select the option to create the Administration Server4. Provide the proper user and group information as created in step 4 and continue the setupdb2as will be used for the Administration Server(Step 9) Configure the KernelTo increase performance and the number of simultaneous connections to DB2 EEE change ipckernel parameters.1. Configure the msgmni parametersysctl - w kernel.msgmni=1282. Configure the parameter to be applied at boot timeAppend the following line to /etc/sysctl.conf:kernel.msgmni=128(Step 10) Create a DatabaseBy default the create database command will create the initial database objects in the instanceowners home directory. This is not the desired location as the instance owners home directoryresides on the NFS mounted file system. To change this specify a location when using the createdatabase command. T
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025江西吉安市赣州橙芷酒店有限公司井冈山分公司招聘员工17人笔试参考题库附带答案详解
- 2025年中铁六局集团有限公司社会化公开招聘笔试参考题库附带答案详解
- 农业毕业论文
- 2025年智能城市光纤网络铺设与维护服务合同
- 2025年高端人才引进与产业协同发展合作协议
- 2025年度社区康复特色治疗服务外包合同
- 2025年度离婚财产分割变更及赡养费调整执行协议
- 2025年度跨境电子商务合作数据保密及知识产权保护协议
- 2025年城市公园绿化养护及环境美化服务合同
- 2025年高端别墅区景观设计、植被栽植及养护执行协议
- 吊装安全警示教育培训
- 变电站介绍课件
- 医务人员职业道德规范学习体会
- 建设工程现场安全文明施工措施费支付使用合同5篇
- 欧莱雅物流管理模式
- 2025年新疆生产建设兵团国有企业招聘笔试参考题库含答案解析
- 电商采购供货协议范本
- 《冲击波疗法》课件
- 冠心病护理模板(2025年独家版)
- 知识产权贯标体管理体系整体文件一二三级文件 手册程序制度文件
- 飞书项目管理
评论
0/150
提交评论