在RedHat5.8上安裝oracle10G之安裝前期準備工作 更詳細的訪問:http://www.oracle.com/index.html 接下來的安裝分兩部分, 第一部分爲前期準備工作 第二部分爲oracle安裝部分 第一部分:前期準備工作 1.關閉防火牆 關閉selinux [root@stu49 tmp]# /etc/rc.d/init.d/iptables stop [root@stu49 tmp]# setenforce 0 2.解壓oracle10的安裝包, gunzip 10201_database_linux_x86_64.cpio.gz mv 10201_database_linux_x86_64.cpio /tmp/ cd /tmp/ cpio -idmv < 10201_database_linux_x86_64.cpio [root@stu49 database]# ls doc install response runInstaller stage welcome.html [root@stu49 database]# 2.1.在解壓的文件中,我們可以打開welcome.html這個網頁選擇Documentation-然後選擇PDF;來查看詳細安裝信息 3.服務器內存緩存的檢測,是否滿足安裝oracle的需求 [root@stu49 /]# grep MemTotal /proc/meminfo MemTotal: 3754408 kB [root@stu49 /]# grep SwapTotal /proc/meminfo SwapTotal: 4194296 kB [root@stu49 /]# free total used free shared buffers cached Mem: 3754408 3574748 179660 0 64324 2929116 -/+ buffers/cache: 581308 3173100 Swap: 4194296 0 4194296 [root@stu49 /]# df -k /tmp/ Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vol0-root 88891632 4399176 79977028 6% / [root@stu49 /]# [root@stu49 /]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vol0-root 88891632 4399176 79977028 6% / tmpfs 1877204 260 1876944 1% /dev/shm /dev/sda1 516040 77844 411984 16% /boot 4.查看系統版本內核 [root@stu49 /]# uname -a Linux oracle10g 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux [root@stu49 /]# uname -r 2.6.32-279.el6.x86_64 [root@stu49 /]# cat /etc/redhat-release 這裏需要我們注意,在安裝的時候我們需要修改成RHEL4不然是無法安裝的; Red Hat Enterprise Linux Server release 5.8 [root@stu49 /]# cat /proc/version Linux version 2.6.32-279.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Jun 13 18:24:36 EDT 2012 [root@stu49 /]# 5.修改計算機名字配置hosts [root@stu49 /]# hostname oracle2 [root@stu49 /]# echo "192.168.100.220oracle2" >> /etc/hosts [root@stu49 /]# cat /etc/hosts 刪除/etc/hosts文件中其他的文件,直接添加如下的內容 192.168.100.220oracle2 6.安裝相關依賴包 rpm -q binutils glibc-devel glib-devel compat-db control gcc gcc-c++ ld-linux.so.2 libXp.so.6 libXt.so.6 libXtst.so.6 libXp glibc glibc-common gnome-libs libstdc++ libstdc++-devel make sysstat xscreensaver 檢查系統是否安裝 7.創建用戶和組.修改密碼 [root@stu49 /]# groupadd dba [root@stu49 /]# groupadd oinstall [root@stu49 /]# useradd -g oinstall -G dba oracle [root@stu49 /]# id oracle uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba) [root@stu49 /]# echo 123.com | passwd --stdin oracle Changing password for user oracle. passwd: all authentication tokens updated successfully. [root@stu49 /]# id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) [root@stu49 /]# 通過查看是否安裝過沒有 more /etc/oraInst.loc 8.修改系統參數內核 [root@stu49 etc]# sed -e '/^#/d' -e '/^$/d' /etc/sysctl.conf > 1.conf [root@stu49 etc]# mv 1.conf sysctl.conf [root@stu49 etc]# vim sysctl.conf [root@stu49 etc]# 查看 [root@stu49 etc]# cat sysctl.conf net.ipv4.ip_forward = 1 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 net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 ########################oracle##################### kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144 [root@stu49 etc]# sysctl -p 生效 9.修改系統文件句柄的限制大小 [root@stu49 etc]# vim /etc/security/limits.conf [root@stu49 etc]# grep 'oralce' /etc/security/limits.conf [root@stu49 etc]# grep 'oracle' /etc/security/limits.conf oraclesoftnproc2048 oraclehardnproc20480 oraclesoftnofile65535 oraclehardnofile65535 [root@stu49 etc]# 10.修改系統pam模塊 [root@stu49 etc]# vim /etc/pam.d/login [root@stu49 etc]# cat /etc/pam.d/login | grep limits session required pam_limits.so [root@stu49 etc]# 11.創建..磁盤問題 權限問題 [root@stu49 etc]# mkdir /oracle/app/dbhome -p [root@stu49 etc]# chown -R oracle:oinstall /oracle/app/dbhome/ [root@stu49 etc]# chmod -R 755 /oracle/app/dbhome/ [root@stu49 etc]# mkdir /u01/app/oracle -p [root@stu49 etc]# chown -R oracle:oinstall /u01/app/oracle/ [root@stu49 etc]# chmod 755 -R /u01/app/oracle/ [root@stu49 etc]# mkdir /oracle/tmp [root@stu49 etc]# chmod a+wr /oracle/tmp/ [root@stu49 etc]# chown oracle:oinstall /oracle/tmp/ [root@stu49 etc]# [root@stu49 ~]# mkdir /oracle/app/dbhome -p && chown -R oracle:oinstall /oracle/app/dbhome/ && chmod -R 755 /oracle/app/dbhome/ [root@stu49 ~]# mkdir /u01/app/oracle -p && chown -R oracle:oinstall /u01/app/oracle/ && chmod 755 -R /u01/app/oracle/ [root@stu49 ~]# mkdir /oracle/tmp && chmod a+wr /oracle/tmp/ && chown oracle:oinstall /oracle/tmp/ [root@stu49 ~]# 12.配置oracle用戶環境變量 [root@stu49 etc]# su - oracle [oracle@oracle10g ~]$ [oracle@oracle10g ~]$ [oracle@oracle10g ~]$ id uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [oracle@oracle10g ~]$ echo $SHELL /bin/bash [oracle@oracle10g ~]$ vim .bash_profile 查看配置的環境變量 [oracle@oracle10g ~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH PATH=$PATH:$HOME/bin export ORACLE_ALERT=/u01/app/oracle/admin/oracle2 export ORACLE_SID=oracle2 export ORACLE_HOME=/u01/app/oracle1 export ORACLE_DATA=/u01/app/oracle/oradata/oracle2 export TMP=/oracle/tmp export PATH=$ORACLE_HOME/bin:$PATH [root@stu49 tmp]# cd /tmp/ [root@stu49 tmp]# chown oracle:oinstall database/ -R [root@stu49 tmp]# chmod 755 database/ -R [root@stu49 tmp]# xhost + 需要在服務器本機執行 [root@stu49 tmp]# su - oracle 以下執行必須在圖形化界面下安裝,遠程需要VNC或者box支持圖形化的來安裝
oracle10g安裝三部曲之oracle安裝前期準備工作
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.