打杂
全部博文(524)
分类: Oracle
2014-12-25 14:51:39
[root@vrh3 ~]# mkdir /media/disk
[root@vrh3 ~]# mount /dev/cdrom /media/disk
mount: block device /dev/cdrom is write-protected, mounting read-only
touch /etc/yum.repos.d/public-yum-el5.repo,并加入以下内容
[oel5]
name = Enterprise Linux 5.5 DVD
baseurl=file:///media/disk/Server/
gpgcheck=0
enabled=1
yum install oracle-validated
[root@vrh3 ~]# mkdir /s01
[root@vrh3 ~]# chown oracle:oinstall /s0
[root@vrh3 ~]# passwd oracle
vi /etc/hosts
192.168.1.171 vrh3 vrh3.oracle.com
192.168.1.172 vrh3-vip
192.168.1.173 vrh4 vrh4.oracle.com
192.168.1.174 vrh4-vip
172.168.1.191 vrh3-priv
172.168.1.192 vrh4-priv
~
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=="raw*", OWNER=="oracle", GROUP=="oinstall", MODE=="0660"
ssh-keygen -t rsa
ssh-keygen -t dsa
cd .ssh
touch authorized_keys
[oracle@vrh3 .ssh]$ ssh vrh4 cat ~/.ssh/id_dsa.pub >> authorized_keys
password:
[oracle@vrh3 .ssh]$ ssh vrh4 cat ~/.ssh/id_rsa.pub >> authorized_keys
[oracle@vrh3 .ssh]$ cat id_dsa.pub >> authorized_keys
[oracle@vrh3 .ssh]$ cat id_rsa.pub >> authorized_keys
[oracle@vrh3 .ssh]$ scp authorized_keys vrh4:~/.ssh
ORA_CRS_HOME=/s01/oracle/app/product/crs_1
PATH=$ORA_CRS_HOME/bin:$PATH
export ORA_CRS_HOME PATH
[oracle@vrh3 ~]$ date ;ssh vrh4-priv date
for i in b c d e f g h i j k ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"oracle\", GROUP=\"oinstall\", MODE=\"0660\""
done