Oracle詳細安裝過程

來源:互聯網
上載者:User

首先需要瞭解一下安裝Oracle的各方面要求:安裝oracle的系統要求:Red Hat Enterprise Linux AS/ES 3.0 (Update 4 or later)Red Hat Linux 4.0SUSE Linux Enterprise Server 9.0 with SP 2 or laterAsianux 1.0核心要求:The system must be running the following kernel version (or a later version): Red Hat Enterprise Linux 3.0 and Asianux 1.0:2.4.21-27.ELNote: This is the default kernel version.Red Hat Enterprise Linux 4.0 and Asianux 2.0:2.6.9-5.ELSUSE Linux Enterprise Server 9.0:2.6.5-7.201記憶體要求:1GB磁碟空間要求:交換空間:1.5GB/tmp目錄中的磁碟空間為400MBOracle軟體需要1.5GB至3.5GB預配置的資料庫需要1.2GB(可選)快速恢複區需要2.4GB(可選) Oracle的安裝步驟 :#su  - root (登入root使用者)#grep  MemTotal  /proc/meminfo  (查看記憶體,不要小於1G)#grep  SwapTotal   /proc/meminfo (查看交換分區,不要小於1.5G)#vmstat  (監視虛擬記憶體的使用方式)如果交換分區太小了,擴充一下,擴張交換分區的方法為:#swapoff  /dev/sda3(關閉交換分區)#fdisk   /dev/sda先刪除原來的交換分區,在分一個大的交換分區#mkswap   /dev/sda3 (分區格式為swap格式)#vim  /etc/fstab (設定開機掛載)/dev/sda3  swap swap defaults 0 0#swapon    /dev/sda3  (開啟交換分區)#cat  /proc/swaps  或#free  (來查看交換分區大小)#df  -kh  /tmp    (查看臨時檔案存放的目錄,不要小於400M)#grep  “model name”  /proc/cpuinfo   (查看cpu類型) Red Hat Enterprise linux 4.0 需要安裝的包有:


binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2control-center-2.8.0-12gcc-3.4.3-22.1.EL4gcc-c++-3.4.3-22.1.EL44glibc-2.3.4-2.9glibc-common-2.3.4-2.9gnome-libs-1.4.1.2.90-44.1libstdc++-3.4.3-22.1libstdc++-devel-3.4.3-22.1make-3.80-5pdksh-5.2.14-30sysstat-5.0.5-1xscreensaver-4.18-5.rhel4.2setarch-1.6-1        (因為我用的是Red Hat Enterprise linux 5.4,所以要修改一下/etc/issue檔案將版本修改為4.4,這樣才能通過安裝前的檢查。)   #uname  -n 查看我們的主機名稱,最好確定我們的主機名稱為oracle.example.com#vim /etc/sysconfig/network 修改我們的主機名稱為oracle.example.com#vim /etc/hosts192.168.0.168    oracle168.example.com   oracle168127.0.0.1         localhost                 localhost.localdomain以上設定可以解析解析出我們的主機名稱 # more /etc/oraInst.loc (查看以前是否安裝過oracle)#groupadd  oinstall        #groupadd  dba#groupadd  oper          (這三個組必須建立)#useradd  -g  oinstall  -G  dba,oper  oracle#passwd   oracle#id  oracle  (查看一下,看有錯誤的沒)#id   nobody  (如果沒有這個使用者,需要建立一下)#vim   /etc/sysctl.conf添加一下內容: #for  oraclekernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 1048576net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 262144  #sysctl  -p  (使設定檔生效)#vim   /etc/security/limits.conf  (關閉對oracle的限制,開啟oracle)添加一下內容:oracle              soft    nproc   2047oracle              hard    nproc   16384oracle              soft    nofile  1024oracle              hard    nofile  65536 #vim   /etc/pam.d/login   (關閉對oracle會話的限制)添加一下兩行:session    required     /lib/security/pam_limits.sosession    required     pam_limits.so#vim   /etc/profile添加一下內容:if [ $USER = "oracle" ]; then        if [ $SHELL = "/bin/ksh" ]; then              ulimit -p 16384              ulimit -n 65536        else              ulimit -u 16384 -n 65536        fifi#vim   /etc/csh.login添加以下內容:if ( $USER == "oracle" ) then        limit maxproc 16384        limit descriptors 65536endif#mkdir   /u01    (建立一個掛載點)#dfisk   /dev/sda  (建立分區,這個分區不要太小,10G左右)(新分一個分區sda5)#partprobe  (重讀一下分區資訊)#mkfs.ext3    /dev/sda5#vim    /etc/fstab/dev/sda5    /u01  ext3   default    0 0  (設定開機自動掛載)#mount  -a #ls   /u01#mkdir  -pv  /u01/app/oracle#chown  -R  oracle:oinstall   /u01/app               #chmod  -R  775  /u01/app             (提示一下,OFA用到三組目錄,第一組目錄是用來安裝oracle的,第二組是用來儲存控制檔案,重做記錄檔和其他管理檔案的,第三組目錄用來儲存,oracle的資料檔案的,而且每一組目錄最好位於單獨的磁碟上,我這裡是在做實驗,所以把它們放在一塊磁碟上了,實際應用中最好不要這樣) #xhost  +  表示任何人都可以進進入         下載oracle的軟體壓縮包10201_database_linux32.zip:#unzip   10201_database_linux32.zip#chown  -R  oracle:oinstall  database/#mv   database/    /home/oracle#yum  install   libXp   libXp-devel  (這兩個可能會提示您安裝)#su  -  oracle#export   DISPLAY=:0.0#vim  .bash_profile  (編輯oracle使用者的環境變數) 500)this.width=500;" border=0> #.   .bash_profile (重新讀取環境變數)#echo   $ORACLE_BASE (檢查一下)#cd  database/#./runInstaller  (執行這個指令碼,它會檢查你是否符合安裝oracle的條件)接著就是圖形化安裝介面了,根據提示安裝就行了,我想對這個大家來說就比較容易了吧! 幫你管理oracle的三個命令列工具管理oracle Enterperise Manager,請使用:#emctl  start  | status | set | stop  (它不支援restart)要停止和啟動SQL*PLus,請使用:#isqlplusctl    start  |  stop要管理監聽程式,請使用:#isnrctl  help |  start  | status  | stop                     如果想讓您的oracle支援中文:在安裝的時候請選上中文500)this.width=500;" border=0>當然您的Linux系統本身也要支援中文嘛!安裝一下系統的中文包的方法如下: #yum  install  fonts-chinese#system-config-language

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.