最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

平臺:Centos 6.10 x64 帶圖形
配置4G 4核心cpu 200G硬盤java

第一步、安裝依賴linux

yum install -y binutils compat-libcap1 compat-libstdc++-33  gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel  make sysstat unixODBC-devel pdksh

卸載openjdkc++

yum remove -y java-1.8.0-openjdk java-1.8.0-openjdk-headless

下載java rpm包,安裝oracle javavim

[root@o1 ~]# rpm -ivh jdk-8u121-linux-x64.rpm 
    Preparing...                ########################################### [100%]
   1:jdk1.8.0_121           ########################################### [100%]

第二步、建立所需用戶和組bash

建立oracle用戶並設置密碼服務器

[root@o1 ~]# useradd oracle
[root@o1 ~]# passwd oracle

而後登錄圖形界面測試一下oracle用戶
測試正常
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程oracle

建立用戶組app

[root@o1 ~]# groupadd oinstall
[root@o1 ~]# groupadd dba

修改oracle用戶組less

usermod -g oinstall -G dba oracle

第三步、修改內核參數ide

追加一段內核參數
[root@o1 ~]# vim /etc/sysctl.conf
........
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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

執行生效
[root@o1 ~]# sysctl -p

修改文件打開限制,追加一段

[root@o1 ~]# vim /etc/security/limits.conf
.......
oracle             soft    nproc           4096
oracle             hard    nproc           65536
oracle             soft    nofile          4096
oracle             hard    nofile          65536

建立oracle安裝目錄

[root@o1 ~]# mkdir -p /u01/app/
[root@o1 ~]# chown -R oracle:oinstall /u01/app/
[root@o1 ~]# chmod -R 775 /u01/app/

重啓服務器,使limit生效

第四步、添加環境變量,準備安裝

使用oracle用戶登錄

[root@o1 ~]# su - oracle
[oracle@o1 ~]$ vim .bash_profile
#追加下面這段
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=sales
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_BASE ORACLE_SID ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH

檢查主機名能訪問不

[oracle@o1 ~]$ ping o1
PING o1 (192.168.1.18) 56(84) bytes of data.
64 bytes from o1 (192.168.1.18): icmp_seq=1 ttl=64 time=0.061 ms

檢查正常

解壓oracle安裝包

[oracle@o1 ~]$ unzip linux.x64_11gR2_database_1of2.zip
[oracle@o1 ~]$ unzip linux.x64_11gR2_database_2of2.zip

第五步、開始安裝

進入安裝目錄,開始安裝
[oracle@o1 ~]$ cd database/
[oracle@o1 database]$ ./runInstaller

而後彈出安裝程序,去掉下面那個勾,點next

最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

再點next

最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

選擇server,再點next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

再點next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

選擇高級安裝,再點next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

再點next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

點擊字符集,而後勾選UTF8,而後next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

勾選下面的全部帳號使用同一個密碼,next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

開始檢查依賴包,其實這些包都裝了的,只是版本高了,勾選ignore all,而後next
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

點擊save response file能夠保存所選擇的配置,這個文件能夠用來執行靜默安裝,點finish開始安裝
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

安裝中
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

安裝完成後有提示,藍色的是em控制檯訪問地址,點ok
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

而後提示要執行兩個腳本,使用root執行
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

[root@o1 ~]# sh /u01/app/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oracle.
The execution of the script is complete.
[root@o1 ~]# 
[root@o1 ~]# sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh 
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

執行完成,點ok,安裝成功
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

在本機打開1158端口,能夠登錄控制檯
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

運行狀態
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程

相關文章
相關標籤/搜索