1. 程式人生 > >單實例12.2.0.1安裝

單實例12.2.0.1安裝

rod ipv it is def pdb dba term cnblogs 0.10

1. 修改用戶的SHELL的限制,vi /etc/security/limits.conf 文件,文件末尾添加修改如下
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

2. 修改linux內核,修改 /etc/sysctl.conf 文件
vi /etc/sysctl.conf 文件並添加如下內容:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
或者kernel.shmall和kernel.shmmax的默認值已經超過上述值,使用默認值即可。
修改生效
[[email protected]

/* */ ~]# /sbin/sysctl -p


3. 創建用戶
/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54323 oper
/usr/sbin/groupadd -g 54324 backupdba
/usr/sbin/groupadd -g 54325 dgdba
/usr/sbin/groupadd -g 54326 kmdba
/usr/sbin/groupadd -g 54327 asmdba
/usr/sbin/groupadd -g 54328 asmoper
/usr/sbin/groupadd -g 54329 asmadmin
/usr/sbin/groupadd -g 54330 racdba
/usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -u 54322 -g oinstall -G asmdba,asmadmin grid

4. 確認用戶:
[[email protected] ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54327(asmdba)
[[email protected] ~]# id grid
uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54327(asmdba),54329(asmadmin)

5. 修改密碼:讓你輸入密碼,密碼任意輸入2次,但必須保持一致,回車確認
[[email protected]

/* */ ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[[email protected] ~]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.

6. 創建目錄結構:
mkdir -p /home/oracle/app/oracle/product/12.2.0/dbhome_1
mkdir -p /home/oracle/app/oradata
chown -R oracle:oinstall /home/oracle/

7. 設置oracle用戶的環境變量:
#vi .bash_profile
--將如下代碼添加到.bash_profile文件中:
# Oracle Settings
umask 022
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_BASE=/home/oracle/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1;
export ORACLE_SID=12cdb;
export ORACLE_TERM=xterm;
export PATH=/usr/sbin:$PATH;
export PATH=$ORACLE_HOME/bin:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

8.檢查 /etc/hosts 文件確認是否添加主機名和域名全稱
[[email protected] ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.100.25.16 12c01

9. 將Oracle安裝包(以64位為例)復制到linux的home目錄下,打開終端命令行界面,運行unzip命令解壓oracle安裝文件。
輸入命令:
[[email protected] ~]$ ll
total 3372760
drwxr-xr-x. 4 oracle oinstall 4096 May 6 03:31 app
-rw-r--r--. 1 oracle oinstall 3453696911 May 6 03:38 linuxx64_12201_database.zip
[[email protected] ~]$ du -h linuxx64_12201_database.zip
3.3G linuxx64_12201_database.zip
[[email protected] ~]$ unzip linuxx64_12201_database.zip

PRVF-0002 : could not retrieve local node name

解壓完成後 cd 進入其解壓後的目錄database
輸入命令:
cd database
執行安裝
輸入命令:
./runInstaller

技術分享

技術分享

技術分享

技術分享

技術分享

技術分享

技術分享

技術分享

單實例12.2.0.1安裝