重庆思庄技术分享——runInstaller 失败,并显示“perl/bin/perl: 不允许操作”

runInstaller 失败,并显示“perl/bin/perl: 不允许操作”

症状
19c 数据库安装失败,出现错误: $./runInstaller $./runInstaller

: 第 67 行: $ORACLE_HOME/perl/bin/perl:

不允许

操作 原因
由于操作系统强化,为安装用户或 Perl 解释器设置的掩码值不正确,无法执行 perl 程序。

解决方案
1) 将安装用户的默认文件模式创建掩码 (umask) 设置为 022。

2) 在 Unix 系统管理员的协助下,在操作系统级别禁用操作系统强化。

重新执行:

./runInstaller
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
软件环境的一般要求 RHEL 5.x系统、RHEL 6.x系统 图形桌面环境 + 开发工具 + 中文Java支持 —— 在RHEL 6.x中安装时,ksh需改用5.x的软件包 准备工作: yum install yum* yum groupinstall “X 窗口系统” “桌面” “桌面平台” “中文支持” “开发工具” [root@dbserver ~]# yum -y install java-* [root@dbserver ~]# cd /usr/lib/jvm/jre-1.6.0/lib [root@dbserver lib]# mv fontconfig.bfc fontconfig.bfc.origin [root@dbserver lib]# cp fontconfig.RedHat.6.bfc fontconfig.bfc [root@dbserver ~]# rpm -e ksh 因为默认没有装 [root@dbserver ~]# rpm -ivh .../ksh-5.2.14-36.el5.i386.rpm 用户环境要求 创建组账号oinstall、dba,用户账号oracle 创建Oracle基本目录 为用户oracle设置环境变量,并允许使用X终端 [root@dbserver ~]# groupadd oinstall //安装组 [root@dbserver ~]# groupadd dba //管理组 [root@dbserver ~]# useradd -g oinstall -G dba oracle [root@dbserver ~]# passwd oracle   [root@dbserver ~]# mkdir /opt/oracle [root@dbserver ~]# chown -R oracle:oinstall /opt/oracle/ [root@dbserver ~]# chmod -R 775 /opt/oracle/ [root@dbserver ~]# vi /home/oralce/.bash_profile …… umask 022 export ORACLE_BASE=/opt/oracle export ORACLE_SID=orcl export DISPLAY=:0.0 export LANG=zh_CN.UTF-8 export ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_2 [root@dbserver ~]# xhost + //须在图形环境执行 access control disabled, clients can connect from any host 内核及会话要求 修改内存调度参数、端口范围、I/O请求…… 增大用户oracle的进程数、文件数限制 [root@dbserver ~]# vi /etc/sysctl.conf …… fs.aio-max-nr = 1048576 限制并发未完成的请求,应该设置避免I/O子系统故障 fs.file-max = 6815744 文件句柄设置代表linux系统中可以打开的文件的数量。 kernel.shmmni = 4096 共享内存的总页数 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 [root@dbserver ~]# sysctl –p kernel.sem: 以kernel.sem = 250 32000 100 128为例:        250是参数semmsl的值,表示一个信号量集合中能够包含的信号量最大数目。        32000是参数semmns的值,表示系统内可允许的信号量最大数目。        100是参数semopm的值,表示单个semopm()调用在一个信号量集合上可以执行操作数量。        128是参数semmni的值,表示系统信号量集合总数 net.core.rmem_default: 表示套接字接收缓冲区大小的缺省值。 net.core.rmem_max: 表示套接字接收缓冲区大小的最大值。 net.core.wmem_default: 表示套接字发送缓冲区大小的缺省值。 net.core.wmem_max: 表示套接字发送缓冲区大小的最大值 [root@dbserver ~]# vi /etc/pam.d/login …… session required pam_limits.so [root@dbserver ~]# vi /etc/security/limits.conf …… oracle soft nproc 8192 oracle hard nproc 16384 oracle soft nofile 32768 oracle hard nofile 65536 运行runInstaller安装程序 将下载的两个zip包解压到同一位置 进入database目录,由用户oracle执行安装 通过 -jreLoc 参数指定中文Java环境的路径 [root@dbserver ~]# su - oracle [oracle@dbserver ~]$ cd /var/ftp/pub/database/ [oracle@dbserver database]$ ./runInstaller -jreLoc /usr/lib/jvm/jre-1.6.0 正在启动 Oracle Universal Installer... 检查临时空间: 必须大于 80 MB。 实际为 64829 MB 通过 检查交换空间: 必须大于 150 MB。 实际为 2047 MB 通过 检查监视器: 监视器配置至少必须显示 256 种颜色。 实际为 16777216 通过 准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2011-10-12_08-07-32PM. 请稍候... SHAPE \* MERGEFORMAT 典型的安装设置 单实例数据库、企业版、管理口令 基本目录:/opt/oracle/ 软件位置:/opt/oracle/product/11.2.0/dbhome_1/ 数据库位置:/opt/oracle/oradata/ 产品清单:/opt/oracle/oraInventory/ SHAPE \* MERGEFORMAT SHAPE \* MERGEFORMAT 验证安装结果 从命令行使用sqlplus工具访问数据库 从浏览器访问 https://dbserver:1158/em/ 用户名sys、管理口令、连接身份SYSDBA [root@dbserver ~]# cd /opt/oracle/product/11.2.0/dbhome_1/bin/ [root@dbserver bin]# ./sqlplus sys AS SYSDBA …… Enter password: //输入管理密码 Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SHOW USER; //查看当前用户 USER is "SYS“ SQL> HELP INDEX; //查看指令列表 …… COMPUTE LIST SET XQUERY CONNECT PASSWORD SHOW SHAPE \* MERGEFORMAT 优化执行环境 全局配置/etc/profile,添加基目录、执行路径…… 修改/etc/oratab,使orcl实例随数据库软件启动 [root@dbserver ~]# vi /etc/profile …… export ORACLE_BASE=/opt/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_OWNER=oracle export ORACLE_SID=orcl export ORACLE_TERM=xterm export PATH=\$PATH:\$ORACLE_HOME/bin [root@dbserver ~]# vi /etc/oratab orcl:/opt/oracle/product/11.2.0/dbhome_1:Y Oracle的服务组件 监听器lsnrctl:提供数据库访问,默认端口1521 启动器dbstart、dushut:启动、停止数据库实例 控制器emctl:开启、关闭OEM平台,默认端口1158 [oracle@dbserver ~]$ lsnrctl status [oracle@dbserver ~]$ emctl stop dbconsole [oracle@dbserver ~]$ dbshut $ORACLE_HOME [oracle@dbserver ~]$ dbstart $ORACLE_HOME [oracle@dbserver ~]$ emctl stop dbconsole 使用系统服务脚本 编写/etc/init.d/oracle控制脚本 使用chkconfig工具添加为系统服务 使用service工具来启动、停止、重启oracle服务 SHAPE \* MERGEFORMAT 逻辑备份与恢复 配置Oracle备份目录 创建本地目录(如 /opt/mydbbackup),并调整属性 在SQL>环境中指定备份位置,并授权备份用户 [root@dbserver ~]# mkdir /opt/mydbbackup [root@dbserver ~]# chown oracle:oinstall /opt/mydbbackup/ [root@dbserver ~]# sqlplus sys AS SYSDBA Enter password: SQL> CREATE DIRECTORY dmpdir AS '/opt/mydbbackup'; Directory created. SQL> GRANT read,write ON DIRECTORY dmpdir TO sysman; Grant succeeded. SQL> GRANT all ON DIRECTORY dmpdir TO system; Grant succeeded. 逻辑备份与恢复 执行逻辑备份 使用expdp工具导出数据库 [root@dbserver ~]# expdp lisi/123456 DIRECTORY=dmpdir DUMPFILE=lisi-20111014.dmp #导出用户lisi的数据库 ……. [root@dbserver ~]# expdp system/123456 DIRECTORY=dmpdir DUMPFILE=orcl-full-20111014.dmp FULL=Y #导出整个数据库 …… 执行逻辑恢复 使用impdp工具导入数据库 [root@dbserver ~]# impdp lisi/123456 DIRECTORY=dmpdir DUMPFILE=lisi-20111014.dmp REUSE_DATAFILES=Y TABLE_EXISTS_ACTION=REPLACE #恢复用户lisi的数据库 [root@dbserver ~]# impdp system/123456 DIRECTORY=dmpdir DUMPFILE=orcl-full-20111014.dmp REUSE_DATAFILES=Y TABLE_EXISTS_ACTION=REPLACE FULL=Y #恢复整个数据库 注意: 
glibc-32bit-8.1-9 
glibc-devel-32bit-8.1-9
compat-libstdc++-33-3.2.3-47.3.x86_64.rpm 
libaio-0.3.105-2.x86_64.rpm
oracle9i for rhel3 install 1、 准备好所需的以下安装包: Oracle9i安装文件: [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio.gz [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk2.cpio.gz [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk3.cpio.gz RHEL3的补丁文件: p4198954_21_linux.zip 另注: 解压.gz文件的方法是: gunzip [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio.gz 解压cpio文件的方法是: cpio -idv < [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio 解压.zip文件的方法是: unzip p4198954_21_linux.zip 2、 配置内核参数: vi /etc/sysctl.conf kernel.core_uses_pid = 1 kernel.shmmax=2147483648 kernel.shmmni=4096 kernel.shmall=2097152 kernel.sem=250 32000 100 128 net.ipv4.ip_local_port_range=1024 65000 fs.file-max=65536 3、 让所修改的内核参数及时生效: sysctl -p 4、 添加安装和管理oracle软件所需的用户、组和目录: groupadd dba groupadd oinstall useradd -g oinstall -G dba oracle passwd oracle mkdir /oracle mkdir /oradata chown -R oracle:oinstall /oracle chown -R oracle:oinstall /oradata chown -R oracle:oinstall /software/ 5、 配置输出环境变量,调出oracle安装图形界面locate机器: export DISPLAY=10.1.1.1:0.0(图形界面显示到….这部机器) xhost +(本机安装!如不是在本机安装请配置IP地址) xclock(测试) 6、 安装oracle软件 su - oracle ./runInstall 一开始安装时,可能会出现这样的问题: [oracle@oracle Disk1]$ ./runInstaller [oracle@oracle Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2009-01-07_12-33-13PM/jre/bin/java. Please wait... Error occurred during initialization of VM Unable to load native library: /tmp/OraInstall2009-01-07_12-33-13PM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference 官方说明是这样的: To install the compat-oracle-rhel4 and compat-libcwait packages you have to download the patch 4198954 from http://metalink.oracle.com. Make sure to select the Linux x86 platform for 32bit (for 64bit it would be patch 5386899). To unzip the downloaded p4198954_21_LINUX.zip file 去csdn上可以下载到以上包 p4198954_21_linux.zip 解压并安装(可能只能安装成功一个包,不过没什么关系,不会影响后来的安装工作),安装完成以后再切换到oracle用户运行./runInstall 7、 在RHEL4上安装ORACLE10G时出现的部分情况: -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- 在rhel4上安装oracle10g的时候,当把安装文件传到/software上后,可能部分文件的权限会发生改变,像我在装的时候就出现了一下两个问题: [oracle@test oraclelinux]$ ./runInstaller ./runInstaller: line 54: /software/oraclelinux/install/.oui: Permission denied [oracle@test oraclelinux]$ ll /software/oraclelinux/install/.oui -rw-r--r-- 1 oracle oinstall 163185 Jul 2 2005 /software/oraclelinux/install/.oui [oracle@test oraclelinux]$ chmod 777 /software/oraclelinux/install/.oui [oracle@test oraclelinux]$ ./runInstaller Starting Oracle Universal Installer... Checking installer requirements... Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2 Passed All installer requirements met. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-01-08_10-15-51PM. Please wait ...sh: /software/oraclelinux/install/unzip: Permission denied Error in writing to directory /tmp/OraInstall2009-01-08_10-15-51PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue. : Success [oracle@test oraclelinux]$ ll /software/oraclelinux/install/unzip -rw-r--r-- 1 oracle oinstall 102612 Jul 2 2005 /software/oraclelinux/install/unzip [oracle@test oraclelinux]$ chmod 777 /software/oraclelinux/install/unzip 经过以上操作以后,才能顺利的调出安装界面 -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- cd /tmp/ sh orainstRoot.sh(运行此脚本是为了能让用户所选的组能够有升级oracle软件的权限) cd /oracle/OraHome1 sh root.sh 8、 配置安装后环境变量: export LD_ASSUME_KERNEL=2.4.1 export ORACLE_BASE=/oracle export ORACLE_HOME=/oracle/OraHome1 #export ORACLE_SID=orcl(定义自己的数据库实例名) export ORACLE_TERM=xterm export NLS_LANG=AMERICAN export THREADS_FLAG=native export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export TNS_ADMIN=$ORACLE_HOME/network/admin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_BASE/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib PATH=$PATH:$HOME/bin:/$ORACLE_HOME/bin:/sbin export PATH unset USERNAME 即时应用环境变量所配置的内容: . .bash_profile 至此oracle9i安装成功,但是安装后还存在一些问题,进入oracle9i的sql环境以后,会发现方向键在sql环境是用不了,此时必须安装几个定义方向键的几个包,配置方法请参考我的另一篇文章------------------------------------在RHEL3上安装并配置oracle9i的方向键支持
自己整理的技术文档,里面许多都是自己实践过的; 耗费了好几个星期,才整理完成!!! 1、Virtualbox安装centos 5.4图解参考一.... 2 1、在VirtualBox下安装CentOS截图参考二.... 11 2、安装增强功能.... 47 3、修改图形界面分辨率.... 49 4、配置远程桌面.... 50 5、配置samba.. 51 6、安装mysql和mysql client.. 74 7、安装jdk1.6.. 74 8、安装apache tomcat 6.0.. 79 9、安装flash... 81 10、Linux下安装Oracle11g服务器.... 81 11、Linux下安装tomcat和apache(tar版).... 116 12、CentOS安装apache + tomcat集群(一).... 124 12、CentOS安装apache + tomcat集群(二).... 131 常见问题:安装Apache提示APR not found的解决办法.... 135 常见问题:关于CentOS安装SAMBA服务器在windows下无法访问.... 137 常见问题:apache和tomcat整合(linux). 142 常见问题:./runInstaller前缺包报错:xorg-x11-libs-6.8.2-1.EL.52.i386.rpm 168 常见问题:./runInstaller前缺包报错:Xlib: connection to ":0.0" refused by server 169 常见问题:./runInstaller前权限报错:/oracle/product/10.2.0/db_1.. 170 常见问题:通过命令给Linux(CentOS)分区.... 170 常见问题:GParted 增加VirtualBox虚拟机磁盘容量.... 173 常见问题:Linux下调整根目录的空间大小.... 179 常见问题:我在安装oracle时提示我:.... 184 常见问题CentOS 5.5 修改IP地址DNS服务器等网络设置.... 185 常见问题:Linux上修改oracle字符集.... 187 常见问题:用命令行方式关闭CentOS防火墙.... 188 常见问题:Cannot load /etc/httpd/modules/mod_jk.so into server.. 189 常见问题:Apache 重启报错.... 189 讨论篇:apache与tomcat及整合实现负载均衡及集群.... 190 讨论篇:Apache+Tomcat 集群负载均衡 mod_proxy模式.... 201 讨论篇:网站静态化
一、安装前准备 磁盘规划 使用iscsi共享磁盘做成raw设备 Vote_OCR /dev/sdb1 /dev/raw/raw1 Vote_OCR /dev/sdb2 /dev/raw/raw2 Vote_OCR /dev/sdb3 /dev/raw/raw3 Vote_OCR /dev/sdb5 /dev/raw/raw4 Vote_OCR /dev/sdb6 /dev/raw/raw5 DATA / dev/sdb7 /dev/raw/raw6 DATA dev/sdb8 /dev/raw/raw7 DATA dev/sdb9 /dev/raw/raw8 FLR dev/sdb10 /dev/raw/raw9 FLR dev/sdb11 /dev/raw/raw10 以下操作如果没有特殊说明在两个节点都做相同操作 网络及主机名规划 #public 192.168.10.10 node1 192.168.10.20 node2 #vip 192.168.10.100 node1vip 192.168.10.200 node2vip #private 192.168.20.10 node1priv 192.168.20.20 node2priv #scan 192.168.10.101 scanip 修改/etc/hosts文件添加以上内容 # vi /etc/hosts 192.168.10.10 node1 192.168.10.20 node2 #vip 192.168.10.100 node1vip 192.168.10.200 node2vip #private 192.168.20.10 node1priv 192.168.20.20 node2priv #scan 192.168.10.101 scanip 修改以下文件的最后一行 # vi /etc/sysconfig/network HOSTNAME=node1 ---第二台机器修改为node2 命令行修改 # hostname node1 第二节点修改为 node2 执行 [root@localhost ~]# su - [root@node1 ~]# 我们在安装虚拟机时添加了两块网卡 在这里我们把 eth0作为对外访问使用 eth1作为对对内访问使用 配置IP地址 使用setup命令修改IP 分别配置eth0和eth1(我们只演示node1的配置,node2也配置成相应的IP) 保存退出 重启使配置生效 3、关闭没必要的服务 chkconfig autofs off chkconfig acpid off chkconfig sendmail off chkconfig cups-config-daemon off chkconfig cpus off chkconfig xfs off chkconfig lm_sensors off chkconfig gpm off chkconfig openibd off chkconfig iiim off chkconfig pcmcia off chkconfig cpuspeed off chkconfig nfslock off chkconfig ip6tables off chkconfig rpcidmapd off chkconfig apmd off chkconfig sendmail off chkconfig arptables_jf off chkconifg microcode_ctl off chkconfig rpcgssd off 上述服务有不存在的会提示,服务中读取信息时出错:没有那个文件或目录。没问题,忽略。 停用NTP服务 /sbin/service ntpd stop chkconfig ntpd off mv /etc/ntp.conf /etc/ntp.conf.bak 重启所有节点 安装yum源规划 在/etc/yum.repos.d/ 目录下添加rhel5.repo文件 [root@node1 yum.repos.d]# pwd /etc/yum.repos.d [root@node1 yum.repos.d]# ls rhel5.repo [root@node1 yum.repos.d]# [root@node1 yum.repos.d]# vi rhel5.repo [Server] name=server baseurl=file:///mnt/Server/ enabled=1 gpgcheck=0 [ClusterStorage] name=server baseurl=file:///mnt/ClusterStorage/ enabled=1 gpgcheck=0 挂载光驱到/mnt目录 [root@node1 yum.repos.d]# mount /dev/hdc /mnt mount: block device /dev/hdc is write-protected, mounting read-only [root@node1 yum.repos.d]# cd /mnt/ [root@node1 mnt]# ls Server ClusterStorage -ld dr-xr-xr-x 3 root root 8192 2010-03-22 ClusterStorage dr-xr-xr-x 3 root root 557056 2010-03-22 Server [root@node1 mnt]# 刷新yum列表 [root@node1 mnt]# yum clean all Loaded plugins: rhnplugin, security Cleaning up Everything [root@node1 mnt]# 4、软件包规划 安装所有依赖包 binutils-* compat-libstdc++-* elfutils-libelf-* elfutils-libelf-devel-* gcc-* gcc-c++-* glibc-* glibc-common-* glibc-devel-* glibc-headers-* ksh-* libaio-* libaio-devel-* libgcc-* libstdc++-* make-* sysstat-* expat-* pdksh-* unixODBC-* 使用YUM安装 # yum install -y binutils-* compat-libstdc++-* elfutils-libelf-* elfutils-libelf-devel-* gcc-* gcc-c++-* glibc-* glibc-common-* glibc-devel-* glibc-headers-* ksh-* libaio-* libaio-devel-* libgcc-* libstdc++-* make-* sysstat-* expat-* pdksh-* unixODBC-* 5、建立用户和目录 用户及目录规划 /usr/sbin/groupadd -g 501 oinstall /usr/sbin/groupadd -g 502 dba /usr/sbin/groupadd -g 504 asmadmin /usr/sbin/groupadd -g 506 asmdba /usr/sbin/groupadd -g 507 asmoper /usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba grid /usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle # passwd grid Changing password for user grid. New UNIX password: BAD PASSWORD: it is too short Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@node1 /]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. 创建grid目录结构 mkdir -p /u01/app/oraInventory chown -R grid:oinstall /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory mkdir -p /u01/app/grid chmod -R 775 /u01/app/grid chown -R grid:oinstall /u01/app/grid mkdir -p /u01/app/11.2.0/grid chown -R grid:oinstall /u01/app/11.2.0/grid chmod -R 775 /u01/app/11.2.0/grid 创建oracle目录结构 mkdir -p /u01/app/oracle mkdir /u01/app/oracle/cfgtoollogs chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oracle mkdir -p /u01/app/oracle/product/11.2.0/db_1 chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1 chmod -R 775 /u01/app/oracle/product/11.2.0/db_1 mkdir –p /u01/software chmod -R 775 /u01 iscsi共享存储规划 (分为server端和client端,我们这里是实验环境,为了节省机器,有一台机器既做服务器同时也做客户端<node1+iscsi>,另一台只有客户端<node2>。注:node1这个虚拟机尽量内存稍微大一些),下面我们开始配置。 在node1上准备要使用的磁盘,并做成相应的raw设备 我们在配置虚拟机的时候加了一块20G的盘 sdb 安装和配置 Node1+iscsi端: [root@node1 mnt]# yum install -y *scsi* [root@node1 /]# vi /etc/tgt/targets.conf #添加以下几行 <target iqn.2012-09.com.example:server.target4> #注:红色部分是在我们存储客户端登录的时候需要 backing-store /dev/sdb # Becomes LUN 1 </target> [root@node1 /]# /etc/init.d/tgtd restart [root@node1 /]# chkconfig tgtd on [root@node1 /]#cd /etc/rc.d/rc5.d/ [root@node1 rc5.d]# mv S13iscsi S40iscsi [root@node1 rc5.d]# [root@node1 ~]# /etc/init.d/iscsi start [root@node1 ~] iscsiadm -m discovery -t st -p 192.168.10.10 <-----(存储地址) 192.168.10.10:3260,1 iqn.2012-09.com.example:server.target4 [root@node1 ~]#iscsiadm -m node -T iqn.2012-09.com.example:server.target4 -p 192.168.10.10 -l Logging in to [iface: default, target: iqn.2012-09.com.example:server.target4, portal: 192.168.10.10,3260] Login to [iface: default, target: iqn.2012-09.com.example:server.target4, portal: 192.168.10.10,3260]: successful 查看磁盘信息 [root@node1 /]# fdisk -l Node2端: [root@node2 ~]# yum install *scsi* -y [root@node2 ~]# /etc/init.d/iscsi start [root@node2 ~]# iscsiadm -m discovery -t st -p 192.168.10.10 <-----(存储地址) 192.168.10.10:3260,1 iqn.2012-09.com.example:server.target4 [root@node2 ~]#iscsiadm -m node -T iqn.2012-09.com.example:server.target4 -p 192.168.10.10 -l Logging in to [iface: default, target: iqn.2012-09.com.example:server.target4, portal: 192.168.10.10,3260] Login to [iface: default, target: iqn.2012-09.com.example:server.target4, portal: 192.168.10.10,3260]: successful [root@node2 /]# 查看磁盘信息 # fdisk -l 在其中一个节点上分区 /dev/sdb 分成10个2G大小的分区 Device Boot Start End Blocks Id System /dev/sdb1 1 1908 1953776 83 Linux /dev/sdb2 1909 3816 1953792 83 Linux /dev/sdb3 3817 5724 1953792 83 Linux /dev/sdb4 5725 20480 15110144 5 Extended /dev/sdb5 5725 7632 1953776 83 Linux /dev/sdb6 7633 9540 1953776 83 Linux /dev/sdb7 9541 11448 1953776 83 Linux /dev/sdb8 11449 13356 1953776 83 Linux /dev/sdb9 13357 15264 1953776 83 Linux /dev/sdb10 15265 17172 1953776 83 Linux /dev/sdb11 17173 19080 1953776 83 Linux [root@node2 ~]# fdisk -l /dev/sdb Disk /dev/sdb: 21.4 GB, 21474836480 bytes 64 heads, 32 sectors/track, 20480 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 1908 1953776 83 Linux /dev/sdb2 1909 3816 1953792 83 Linux /dev/sdb3 3817 5724 1953792 83 Linux /dev/sdb4 5725 20480 15110144 5 Extended /dev/sdb5 5725 7632 1953776 83 Linux /dev/sdb6 7633 9540 1953776 83 Linux /dev/sdb7 9541 11448 1953776 83 Linux /dev/sdb8 11449 13356 1953776 83 Linux /dev/sdb9 13357 15264 1953776 83 Linux /dev/sdb10 15265 17172 1953776 83 Linux /dev/sdb11 17173 19080 1953776 83 Linux [root@node2 ~]# 做完分区之后 在两个节点上分别执行以下命令: # partprobe 配置raw设备(每个节点都操作) #vi /etc/udev/rules.d/60-raw.rules ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add", KERNEL=="sdb2", RUN+="/bin/raw /dev/raw/raw2 %N" ACTION=="add", KERNEL=="sdb3", RUN+="/bin/raw /dev/raw/raw3 %N" ACTION=="add", KERNEL=="sdb5", RUN+="/bin/raw /dev/raw/raw4 %N" ACTION=="add", KERNEL=="sdb6", RUN+="/bin/raw /dev/raw/raw5 %N" ACTION=="add", KERNEL=="sdb7", RUN+="/bin/raw /dev/raw/raw6 %N" ACTION=="add", KERNEL=="sdb8", RUN+="/bin/raw /dev/raw/raw7 %N" ACTION=="add", KERNEL=="sdb9", RUN+="/bin/raw /dev/raw/raw8 %N" ACTION=="add", KERNEL=="sdb10", RUN+="/bin/raw /dev/raw/raw9 %N" ACTION=="add", KERNEL=="sdb11", RUN+="/bin/raw /dev/raw/raw10 %N" KERNEL=="raw*", OWNER="grid" GROUP="asmadmin", MODE="0660" # start_udev  启动 udev: [确定] [root@node1 ~]# ll /dev/raw/ 总计 0 crw-rw---- 1 grid asmadmin 162, 1 09-29 18:13 raw1 crw-rw---- 1 grid asmadmin 162, 10 09-29 18:13 raw10 crw-rw---- 1 grid asmadmin 162, 2 09-29 18:13 raw2 crw-rw---- 1 grid asmadmin 162, 3 09-29 18:13 raw3 crw-rw---- 1 grid asmadmin 162, 4 09-29 18:13 raw4 crw-rw---- 1 grid asmadmin 162, 5 09-29 18:13 raw5 crw-rw---- 1 grid asmadmin 162, 6 09-29 18:13 raw6 crw-rw---- 1 grid asmadmin 162, 7 09-29 18:13 raw7 crw-rw---- 1 grid asmadmin 162, 8 09-29 18:13 raw8 crw-rw---- 1 grid asmadmin 162, 9 09-29 18:13 raw9 [root@node1 ~]# 各类参数及所需配置设置 配置内核参数 vi /etc/sysctl.conf kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6553600 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 # sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.file-max = 6553600 fs.file-max = 6815744 fs.aio-max-nr = 1048576 修改limits文件,添加如下内容 vi /etc/security/limits.conf grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 配置hangcheck-timer # modprobe hangcheck-timer hangcheck_tick=1 hangcheck_margin=10 hangcheck_reboot=1 修改pam文件 #vi /etc/pam.d/login 添加一行 session required pam_limits.so 修改profile文件 #vi /etc/profile if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi 配置ssh密钥互认(oracle和grid两个用户) [root@node1 u01]# su - oracle [oracle@node1 ~]$ [oracle@node1 ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Created directory '/home/oracle/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_rsa. Your public key has been saved in /home/oracle/.ssh/id_rsa.pub. The key fingerprint is: 5d:94:12:23:9c:5b:ae:e8:5e:23:fb:ce:65:bc:a6:23 oracle@node1 [oracle@node1 ~]$ cd .ssh/ [oracle@node1 .ssh]$ mv id_rsa.pub authorized_keys [oracle@node1 .ssh]$ ll 总计 8 -rw-r--r-- 1 oracle oinstall 394 09-27 21:52 authorized_keys -rw------- 1 oracle oinstall 1675 09-27 21:52 id_rsa [oracle@node1 .ssh]$ chmod 600 authorized_keys [oracle@node1 .ssh]$ cd .. [oracle@node1 ~]$ scp -r .ssh/ 192.168.10.20:/home/oracle The authenticity of host '192.168.10.20 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.10.20' (RSA) to the list of known hosts. oracle@192.168.10.20's password: id_rsa 100% 1675 1.6KB/s 00:00 authorized_keys 100% 394 0.4KB/s 00:00 known_hosts 100% 395 0.4KB/s 00:00 [oracle@node1 ~]$ [oracle@node1 ~]$ su - grid 口令: [grid@node1 ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/grid/.ssh/id_rsa): Created directory '/home/grid/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/grid/.ssh/id_rsa. Your public key has been saved in /home/grid/.ssh/id_rsa.pub. The key fingerprint is: 09:b9:21:44:1e:fc:a1:94:6f:9a:e6:5e:ee:d2:76:e4 grid@node1 [grid@node1 ~]$ cd .ssh/ [grid@node1 .ssh]$ ls id_rsa id_rsa.pub [grid@node1 .ssh]$ mv id_rsa.pub authorized_keys [grid@node1 .ssh]$ chmod 600 authorized_keys [grid@node1 .ssh]$ cd .. [grid@node1 ~]$ scp -r .ssh/ 192.168.10.20:/home/grid The authenticity of host '192.168.10.20 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.10.20' (RSA) to the list of known hosts. grid@192.168.10.20's password: id_rsa 100% 1671 1.6KB/s 00:00 authorized_keys 100% 392 0.4KB/s 00:00 known_hosts 100% 395 0.4KB/s 00:00 [grid@node1 ~]$ 测试: #su - oracle [oracle@node1 ~]$ ssh node2 date The authenticity of host 'node2 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:57:17 CST [oracle@node1 ~]$ ssh node2priv date The authenticity of host 'node2priv (192.168.20.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2priv,192.168.20.20' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:57:28 CST [oracle@node1 ~]$ ssh node1 date The authenticity of host 'node1 (192.168.10.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1,192.168.10.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:57:45 CST [oracle@node1 ~]$ ssh node1priv date The authenticity of host 'node1priv (192.168.20.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1priv,192.168.20.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:58:02 CST [oracle@node1 ~]$ [oracle@node1 ~]$ ssh node2 [oracle@node2 ~]$ id uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba) [oracle@node2 ~]$ ssh node2 date The authenticity of host 'node2 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:58:41 CST [oracle@node2 ~]$ ssh node2priv date The authenticity of host 'node2priv (192.168.20.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2priv,192.168.20.20' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:58:49 CST [oracle@node2 ~]$ ssh node1 date The authenticity of host 'node1 (192.168.10.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1,192.168.10.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:59:01 CST [oracle@node2 ~]$ ssh node1priv date The authenticity of host 'node1priv (192.168.20.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1priv,192.168.20.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:59:12 CST [oracle@node2 ~]$ [root@node1 /]# su - grid [grid@node1 ~]$ ssh node1 date The authenticity of host 'node1 (192.168.10.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1,192.168.10.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:59:53 CST [grid@node1 ~]$ ssh node1priv date The authenticity of host 'node1priv (192.168.20.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1priv,192.168.20.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 21:59:59 CST [grid@node1 ~]$ ssh node2 date The authenticity of host 'node2 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:09 CST [grid@node1 ~]$ ssh node2priv date The authenticity of host 'node2priv (192.168.20.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? Host key verification failed. [grid@node1 ~]$ ssh node2priv date The authenticity of host 'node2priv (192.168.20.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2priv,192.168.20.20' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:16 CST [grid@node1 ~]$ ssh node2 [grid@node2 ~]$ ssh node2 date The authenticity of host 'node2 (192.168.10.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:29 CST [grid@node2 ~]$ ssh node2priv date The authenticity of host 'node2priv (192.168.20.20)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node2priv,192.168.20.20' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:38 CST [grid@node2 ~]$ ssh node1 date The authenticity of host 'node1 (192.168.10.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1,192.168.10.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:49 CST [grid@node2 ~]$ ssh node1priv date The authenticity of host 'node1priv (192.168.20.10)' can't be established. RSA key fingerprint is 95:ed:6d:87:61:00:27:ed:38:17:6c:e9:6c:c3:8a:1d. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'node1priv,192.168.20.10' (RSA) to the list of known hosts. 2012年 09月 27日 星期四 22:00:58 CST [grid@node2 ~]$ 最后 在每个节点的 oracle用户 grid用户都执行一个命令 $ ssh node1 date && ssh node1priv date && ssh node2 date && ssh node2priv date $ id uid=501(grid) gid=501(oinstall) groups=501(oinstall),502(dba),504(asmadmin),506(asmdba),507(asmoper) 最后是这个效果: [grid@node2 ~]$ ssh node1 date && ssh node1priv date && ssh node2 date && ssh node2priv date 2012年 09月 27日 星期四 22:04:03 CST 2012年 09月 27日 星期四 22:04:03 CST 2012年 09月 27日 星期四 22:04:00 CST 2012年 09月 27日 星期四 22:04:01 CST [grid@node2 ~]$ su - oracle 口令: [oracle@node2 ~]$ ssh node1 date && ssh node1priv date && ssh node2 date && ssh node2priv date 2012年 09月 27日 星期四 22:04:14 CST 2012年 09月 27日 星期四 22:04:14 CST 2012年 09月 27日 星期四 22:04:11 CST 2012年 09月 27日 星期四 22:04:12 CST [oracle@node2 ~]$ ssh node1 [oracle@node1 ~]$ ssh node1 date && ssh node1priv date && ssh node2 date && ssh node2priv date 2012年 09月 27日 星期四 22:04:22 CST 2012年 09月 27日 星期四 22:04:22 CST 2012年 09月 27日 星期四 22:04:19 CST 2012年 09月 27日 星期四 22:04:20 CST [oracle@node1 ~]$ su - grid 口令: [grid@node1 ~]$ ssh node1 date && ssh node1priv date && ssh node2 date && ssh node2priv date 2012年 09月 27日 星期四 22:04:45 CST 2012年 09月 27日 星期四 22:04:45 CST 2012年 09月 27日 星期四 22:04:42 CST 2012年 09月 27日 星期四 22:04:42 CST [grid@node1 ~]$ 8、配置远程图形界面管理 可以使用xmanager,也可以使用vnc。对于远程链接跨越互联网的建议用vnc,如果在局域网中我们使用xmanager即可。 Xmanager配置说明: 配置文件位置: vi /usr/share/gdm/defaults.conf找到下面内容修改配置选项: [xdmcp] DisplaysPerHost=10 Enable=true //257行 Port=177 //284行 [security] AllowRemoteRoot =true //214行 /etc/inittab文件最后一行添加 x:5:respawn:/usr/sbin/gdm 使用命令 # gdm-restart 重启gdm; 查看gdm监听端口开启成功 netstat -nltpu | grep 177 [root@node1 /]# netstat -nltpu | grep 177 udp 0 0 0.0.0.0:177 0.0.0.0:* 3184/gdm-binary [root@node1 /]# 安装前检测 将软件上传到服务器中的我们之前建好的/u01/software 中并解压 [root@node1 /]# chown –R grid.oinstall /u01/software/ #su -grid #cd /u01/software/grid #./runcluvfy.sh stage -pre crsinst -n node1,node2 -fixup -verbose > check.txt 最后查看check.txt文件,如果有错误,可以尝试使用root身份运行/tmp/CVU_11.2.0.1.0_grid/runfixup.sh。最后我们可能看到关于NTP的错误,我们忽略。 二、图形界面开始安装clusterware [root@node1 ~]# su – grid [grid@node1 ~]$ cd /u01/software/grid [grid@node1 grid]$ ls check1.txt doc response runcluvfy.sh sshsetup welcome.html check.txt install rpm runInstaller stage [grid@node1 grid]$ ./runInstaller 选择语言支持 配置集群名称,第二行的“SCAN名称”要和hosts文件里面的scan那项要对应 添加修改节点信息,一定要和hosts文件中的名字对应。在此步骤可以配置ssh互信。因为我们事先已经配置好,这里就不需要修改了。 网络配置 选择磁盘管理方式,我们选择ASM表决盘管理 创建ASM磁盘组 搜索路径 选择需要的盘 设置密码 选择“是” 不使用 使用默认用户即可 设置grid的base和home目录 设置日志目录 检查环境 这项可以忽略 摘要 开始安装 将两个脚本分别在两个节点上以root身份运行 每个脚本等node1执行完了,在去下一个节点执行 执行完成之后点击确定 等待完成,clusterware安装成功。 三、安装数据库软件 #su - oracle $cd /u01/software/database $ cd database/ $ ls doc install response rpm runInstaller sshsetup stage welcome.html $ ./runInstaller 关闭电子邮件接收 选择是 仅安装数据库软件 选择RAC数据库安装 选择语言支持 企业版安装 选择安装目录 选择操作组 点击完成,直到安装结束。 建库(dbca) 以oracle用户身份执行dbca 点击完成直到结束。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值