最全的Centos6.10詳細安裝Oracle 11G R2圖文教程
阿新 • • 發佈:2018-08-24
acl server rain oracle安裝 服務 選擇 product creating mod 平臺:Centos 6.10 x64 帶圖形
配置4G 4核心cpu 200G硬盤
配置4G 4核心cpu 200G硬盤
第一步、安裝依賴
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
下載javarpm包,安裝oracle java
[root@o1 ~]# rpm -ivh jdk-8u121-linux-x64.rpm Preparing... ########################################### [100%] 1:jdk1.8.0_121 ########################################### [100%]
第二步、創建所需用戶和組
創建oracle用戶並設置密碼
[root@o1 ~]# useradd oracle
[root@o1 ~]# passwd oracle
然後登陸圖形界面測試一下oracle用戶
測試正常
創建用戶組
[root@o1 ~]# groupadd oinstall
[root@o1 ~]# groupadd dba
修改oracle用戶組
usermod -g oinstall -G dba oracle
第三步、修改內核參數
追加一段內核參數
[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
再點next
選擇server,再點next
再點next
選擇高級安裝,再點next
再點next
next
next
next
next
next
點擊字符集,然後勾選UTF8,然後next
next
next
next
勾選下面的所有賬號使用同一個密碼,next
next
開始檢查依賴包,其實這些包都裝了的,只是版本高了,勾選ignore all,然後next
點擊save response file可以保存選擇配置,點finish開始安裝
安裝中
安裝完成後有提示,藍色的是em控制臺訪問地址,點ok
然後提示要執行兩個腳本,使用root執行
[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,安裝成功
在本機打開1158端口,可以登陸控制臺
運行狀態
最全的Centos6.10詳細安裝Oracle 11G R2圖文教程