|
 |
栏目导栏 |
|
| |
|
|
|
|
 |
资料搜索 |
|
| |
|
|
|
|
 |
热门文章 |
|
| |
|
|
|
|
 |
最新文章 |
|
| |
|
|
|
| |
| |
|
|
|
[ 作者: Linux联盟收集 加入时间:2006-07-18 18:49:00 来自:Linux联盟收集
] | |
|
早些时候的一篇文档,贴出来,看对大家是否有借鉴意义。 b8nLinux联盟 SUN小型机的安装文档 b8nLinux联盟 b8nLinux联盟 一、 SUN Solaris7平台上ORACLE 8.1.6安装过程: b8nLinux联盟 b8nLinux联盟 &#61548; 要求:Solaris7需要全部安装。 b8nLinux联盟 b8nLinux联盟 安装补丁:(补丁下载参考路径 sunsolve.sun.com___patches___Recommended and Securrity Solaris Patch Clusers___7___download HTTP) b8nLinux联盟 b8nLinux联盟 &#61548; 需要调整的UNIX核心参数:用vi命令编辑 /etc下的system文件。 b8nLinux联盟 vi /etc/system b8nLinux联盟 set shmsys:shminfo_shmmax=536870912 b8nLinux联盟 set shmsys:shminfo_shmmin=1 b8nLinux联盟 set shmsys:shminfo_shmmni=100 b8nLinux联盟 set shmsys:shminfo_shmseg=10 b8nLinux联盟 b8nLinux联盟 set semsys:seminfo_semmni=100 b8nLinux联盟 set semsys:seminfo_semmsl=200 b8nLinux联盟 set semsys:seminfo_semmni=100 b8nLinux联盟 set semsys:seminfo_semmns=400 b8nLinux联盟 set semsys:seminfo_semopm=100 b8nLinux联盟 set semsys:seminfo_semvmx=32767 b8nLinux联盟 第一部分为共享内存的相关参数设置,第二部分为进程设置,更改核心参数后,系统要重新启动。 b8nLinux联盟 b8nLinux联盟 &#61548; 利用Solaris的工具,建立dba、oinstall组和oracle用户,oracle从属于oinstall主组和dba次要组。 b8nLinux联盟 Oracle的口令可设为”oracle”, 指定生成路径/export/home/oracle b8nLinux联盟 b8nLinux联盟 &#61548; 调整oracle用户的.profile文件,在oracle用户下: b8nLinux联盟 su – oracle b8nLinux联盟 vi .profile b8nLinux联盟 b8nLinux联盟 ORACLE_BASE=/export/home/oracle/app/oracle b8nLinux联盟 ORACLE_HOME=$ORACLE_BASE/product/8.1.6 b8nLinux联盟 ORACLE_SID=ora8 b8nLinux联盟 NLS_LANG=American_america.zhs16cgb231280 b8nLinux联盟 ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data b8nLinux联盟 LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib b8nLinux联盟 CLASSPATH=$ORACLE_HOME/product/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/jre b8nLinux联盟 PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/local/bin b8nLinux联盟 DISPLAY=127.0.0.1:0.0 b8nLinux联盟 Umask 022 b8nLinux联盟 export ORACLE_BASE ORACLE_HOME ORACLE_SID NLS_LANG ORA_NLS33 b8nLinux联盟 export LD_LIBRARY_PATH CLASSPATH PATH DISPLAY b8nLinux联盟 b8nLinux联盟 其中,PATH中的/usr/local/bin,为lbin参数值,在执行安装后配置中的root.sh设定。 b8nLinux联盟 b8nLinux联盟 &#61548; 以ORACLE身份执行如下命令,在CD上找到如下路径,/cdrom/cdrom0/,运行runinstaller: b8nLinux联盟 ./runInstaller b8nLinux联盟 然后按照系统提示,逐步执行,安装oracle。 b8nLinux联盟 安装结束后,以root身份执行$ORACLE_HOME/root.sh。 b8nLinux联盟 注:安装过程中,建议使用典型创建数据库。 b8nLinux联盟 b8nLinux联盟 &#61548; 创建数据库 b8nLinux联盟 1. # xhost localhost b8nLinux联盟 2.转入oracle用户#su - oracle b8nLinux联盟 3.再回到oracle用户,执行dbassist命令,建库过程开始,按提示进行即可(oracle安装在/export/home/oracle目录下)。 b8nLinux联盟 b8nLinux联盟 &#61548; 启动数据库 b8nLinux联盟 1.安装完毕,以oracle用户登录。 b8nLinux联盟 2.输入命令svrmgrl,屏幕出现提示符 SVRMGR>; b8nLinux联盟 3.在提示符 SVRMGR>;下输入connect internal即SVRMGR>;connect internal b8nLinux联盟 4.在提示符 SVRMGR>;下输入startup 即SVRMGR>;startup ,得到文件数量1400多个。 b8nLinux联盟 5.输入SQL语句验证:select * from tab ;(也可以书写其他SQL语句) b8nLinux联盟 6. 欲退出SVRMGR>;命令行,请输入 SVRMGR>;; b8nLinux联盟 7. 退出oracle 时,输入命令quit 或shutdown. b8nLinux联盟 b8nLinux联盟 &#61548; 起动数据库的图形界面: b8nLinux联盟 1. 起动系统后,运行xhost b8nLinux联盟 # xhost localhost b8nLinux联盟 2. 以oracle用户身份登录: b8nLinux联盟 # su – oracle b8nLinux联盟 3. 起动监听:起动命令在oracle目录下的/bin中可以找到。 b8nLinux联盟 4. 起动图形管理界面: b8nLinux联盟 $ eomapp dbastudio b8nLinux联盟 用户名和口令可分别用:internal 和 oracle。 b8nLinux联盟 b8nLinux联盟 &#61548; 关闭系统时,一定要确认oracle数据库已经被关闭(shutdown)。 b8nLinux联盟 b8nLinux联盟 &#61548; 数据库不能启动的解决办法: b8nLinux联盟 b8nLinux联盟 1.配置listener: 进入下边的路径 “$ORACLE_HOME/network/admin/”,找到listener.ora文件,用vi将该文件打开: b8nLinux联盟 vi listener.oar b8nLinux联盟 找到 (ADDRESS=(Prootocol=TCP)(Host=server name)(PORT=(512))一句,server name 是服务器的名字,将其改成本机的IP,如: b8nLinux联盟 Host=10.100.100.1 b8nLinux联盟 b8nLinux联盟 2、修改oratab: 进入如下路径 “/var/opt/oracle”,找到oratab,用vi将该文件打开: b8nLinux联盟 vi oratab b8nLinux联盟 数据库建立成功,但不能启动,可试将文件中的N(no)改成Y(yes)。 b8nLinux联盟 b8nLinux联盟 3、修改 dbstart: 进入如下路径 “$ORACLE_HOME/bin”,找到 dbstart,用vi将该文件打开: b8nLinux联盟 vi dbstart b8nLinux联盟 写入如下脚本: b8nLinux联盟 svrmgrl<<EOF b8nLinux联盟 connet internal b8nLinux联盟 startup b8nLinux联盟 b8nLinux联盟 二、安装WEB SERVER b8nLinux联盟 b8nLinux联盟 1. 将CD盘放入光驱,找到entprise.tar和comm461.tar两个文件。(在CD盘路径 /cdrom/iws4lent/solaris中) b8nLinux联盟 b8nLinux联盟 2. 把这两个tar文件cp到系统中,如:可以自建一个文件夹/comm。 b8nLinux联盟 b8nLinux联盟 3. 安装gzip、可在网上下载到这个工具、如果是压缩文件,解压缩后,将解开的文件拷贝到/usr/sbin下。 b8nLinux联盟 b8nLinux联盟 4. 用tar解包comm461.tar。解开后,进入生成的 /comm./commu* 路径, b8nLinux联盟 运行 ./ns-install 安装comm416.tar。 b8nLinux联盟 b8nLinux联盟 5. 用tar解包entprise.tar。解开后,在当前路径下会生成一些包括setup在内的文件,运行 ./setup 在提示下,进行安装。 b8nLinux联盟 b8nLinux联盟 6. 安装完成后,按照提示,执行…/server4(为安装中的默认路径)下的”startconsole” b8nLinux联盟 ./startconsole b8nLinux联盟 b8nLinux联盟 7. 运行netscape:cd /opt/netscape(默认的安装路径),进入netscape b8nLinux联盟 ./netscape b8nLinux联盟 b8nLinux联盟 8. 开启web服务。 b8nLinux联盟 键入: 机器名:端口, 如:dbserver:8888(8888为安装过程中的默认端口) b8nLinux联盟 b8nLinux联盟 三、 HA的安装: b8nLinux联盟 b8nLinux联盟 1、The license key for ha+ for solaris: b8nLinux联盟 1) host ID 80ed7184 is: E9CE E2C7 GCMF B8L6 M1P7 H2KG b8nLinux联盟 2) host ID 80e63b8f is: E9CE E2C7 D6PE X9XG I7H9 XGD2 b8nLinux联盟 b8nLinux联盟 2、 b8nLinux联盟 b8nLinux联盟 心跳IP的分配:dbserver: hme2:192.168.1.1 hme3:192.168.2.1 b8nLinux联盟 websrver: hme2:192.168.1.2 hme3:192.168.2.2 b8nLinux联盟 b8nLinux联盟 3、各网口IP的分配方法: b8nLinux联盟 b8nLinux联盟 在 /etc 下,有hosts和hostname.hme0~hostname.hme3几个文件,在机器起动时,系统会根据这几个文件,配置各个网口。 b8nLinux联盟 b8nLinux联盟 首先,对上面几个文件备份,然后对之进行修改,去掉hostname.hme0和hostname.hme1,然后编辑hostname.hme2和 hostname.hme3。 b8nLinux联盟 对于hostname.hme0和 hostname.hme1的备份和屏避,可采用如下方法: b8nLinux联盟 mv hostname.hme0 hostname.hme0.old b8nLinux联盟 mv hostname.hme1 hostname.hme1.old b8nLinux联盟 对于dbserver: b8nLinux联盟 在hostname.hme2中加入:192.168.1.1 b8nLinux联盟 在hostname.hme3中加入:192.168.2.1 b8nLinux联盟 对于webserver: b8nLinux联盟 在hostname.hme2中加入:192.168.1.2 b8nLinux联盟 在hostname.hme3中加入:192.168.2.2 b8nLinux联盟 而后在hosts文件中加入相应的行。 b8nLinux联盟 b8nLinux联盟 4、 安装、配置HA: b8nLinux联盟 1)使用pkgadd安装 b8nLinux联盟 pkgadd -d . b8nLinux联盟 按默认条件安装,HA软件会安装在目录 /etc/opt 下。 b8nLinux联盟 b8nLinux联盟 ***修改配置文件machine.cof,在路径 /etc/opt/QUALHA/etc下, b8nLinux联盟 b8nLinux联盟 (1)、根据本机的hostid,写下本机的machine key(见1) b8nLinux联盟 b8nLinux联盟 (2)、写下本机的两个心跳端口:hme2、hme3。 b8nLinux联盟 b8nLinux联盟 (3)、如果在机器dbserver上,则写下: b8nLinux联盟 group name : oracle server b8nLinux联盟 group id : 61.167.36.51 b8nLinux联盟 server name : oracle b8nLinux联盟 group priority : 1 b8nLinux联盟 …………… : 1 b8nLinux联盟 在机器webserver上,则写下: b8nLinux联盟 …… b8nLinux联盟 group id:61.167.36.52 b8nLinux联盟 group name :www server b8nLinux联盟 group priority:5 b8nLinux联盟 group.ok_to server.on_startup:0 b8nLinux联盟 …… b8nLinux联盟 修改结束后,使用如下命令检验 machina key,如果修改的不正确,将有错误提示。 b8nLinux联盟 #qhap checkkey b8nLinux联盟 b8nLinux联盟 2)、安装模块, b8nLinux联盟 #./Install.sh b8nLinux联盟 安装过程中选择第三项oracle和第七项web server两个模块进行安装。 b8nLinux联盟 安装结束后,将在etc/opt/QUALHA/examples/services下增加一些内容。 b8nLinux联盟 b8nLinux联盟 3)、加服务组:在路径 etc /opt/QUALHA/sg 下,执行>; b8nLinux联盟 qhap addsg 61.167.36.51 (加服务组:在dbserver上) b8nLinux联盟 qhap addsg 61.167.36.52 (加服务组:在webserver上) b8nLinux联盟 执行结束后,会在当前路径下产生一个目录 /61.167.36.51(或/61.167.36.52),进入该目录,修改配置文件: b8nLinux联盟 b8nLinux联盟 (1) 修改文件if.tab: b8nLinux联盟 # vi if.tab b8nLinux联盟 配置网卡: b8nLinux联盟 加入 hme0 61.167.36.51 b8nLinux联盟 hme1 61.167.36.52 b8nLinux联盟 存盘退出。 b8nLinux联盟 b8nLinux联盟 (2) 修改文件 fs.tab: b8nLinux联盟 在路径 /etc/opt/sg/QUALHAsg/61.167.36.51里, b8nLinux联盟 #vi fs.tab (在webserver上所指向的mount点不一样,是另三块盘) b8nLinux联盟 首先将原来的mount点屏避掉, b8nLinux联盟 在 /dev/vx/dsk/dbserver/vol01前加上”#”号(在机器dbserver上) b8nLinux联盟 在 /deb/vx/dsk/webserver/vol02前加上”#”号(在机器webserver上) b8nLinux联盟 编写该文件,使之指到mount点 b8nLinux联盟 /dev/vx/dsk/dbserver/vol01/dev/vx/rdsk/dbserver/vol01/dbserver b8nLinux联盟 (c1t69d0&& c1t80d0&& c1t83d0) b8nLinux联盟 webserver指向的为c1t65d0 、c1t66d0和 c1t68d0三块盘。 b8nLinux联盟 b8nLinux联盟 (3) 修改文件 vxvm.dg.tab b8nLinux联盟 加入本机的hostname,如果是机器dbserver,则加入一行”dbserver”,在机器webserver上要加入webserver。 b8nLinux联盟 b8nLinux联盟 4)、安装http模块后,需要修改*.51下的http.d中的文件(安装数据库模块,也需要做相应的修改),用于控制应用程序的起动和停止。 b8nLinux联盟 Vi start (加入webserver的启动文件的路径) b8nLinux联盟 加入一行: /usr/netscape/server4/https-dbserver/start b8nLinux联盟 vi stop (加入webserver的关闭文件的路径) b8nLinux联盟 加入一行: /usr/netscape/server4/https-dbserver/stop b8nLinux联盟 b8nLinux联盟 1、Qhap addsvc –g 61.167.36.51 oracle/http******* b8nLinux联盟 2、Vxdisk list (查看磁盘列表)。 b8nLinux联盟 b8nLinux联盟 Vxdg list (对卷操作的命令) b8nLinux联盟 Vxdg deport b8nLinux联盟 Vxdg import b8nLinux联盟 3、如出现问题,HA不能正常工作,可将/etc 下的两个文件hostname.hme0和hostname.hme1恢复,使系统能以原有的方式起动。 b8nLinux联盟 4、配DNS,在路径 /etc 下的resolv.cnof文件,在此文件中配置。 b8nLinux联盟 5、使用如下命令行查看当前HA的运行状态, b8nLinux联盟 #qhap cui b8nLinux联盟 6、安装完毕后,在 etc/rc3.g、etc/rc2.g、etc/rc0.g下会有一些角本,用于控制HA的起动和停止。 b8nLinux联盟 7、format:可用于查看当前磁盘的情况。 b8nLinux联盟 8、编辑根下的 .profile文件: b8nLinux联盟 vi .prfile b8nLinux联盟 PATH=$PATH:/opt/VRTSvmsa/bin: b8nLinux联盟 Export PATH b8nLinux联盟 这样,就可以在根目录下直接键入vmsa $ 用以执行路径/opt/VRTSvmsa/bin:下的程序 vmsa b8nLinux联盟 9、启动HA的图形界面: b8nLinux联盟 进入路径/etc/opt/QUALHA/bin,执行 ca ,就可以进入图形界面。 b8nLinux联盟 # ./ca b8nLinux联盟 10、检查HA的日志文件: b8nLinux联盟 # qhap log b8nLinux联盟 11、在有备份的情况下,重装HA,只需将ha.tar解在 etc/opt目录下即可。 b8nLinux联盟 Ha.tar是备份HA所做的解压包。 b8nLinux联盟 12、停止HA,将etc/rc3.d中的文件S***hapd前面的大”S”改为小s即可,也可以直接使用 “ qhap stop “。 原文链接:http://bbs.chinaunix.net/viewthread.php?tid=30539b8nLinux联盟 转载请注明作者名及原文出处
Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论 |
|
|
|
|
|