1. 程式人生 > >oracle 11G安裝圖文

oracle 11G安裝圖文

1. 依賴包
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

2. 建立 oracle 使用者和調整環境變數
groupadd -g 1001 dba
groupadd -g 1002 oinstall
useradd -u 1001 -g oinstall -G dba oracle
passwd oracle

3. oracle 使用者環境變數配置( vim .bash_profile)


export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=192.168.1.64:0.0
stty erase ^h

4. 系統調整

# vim /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65535


# vim /etc/sysctl.conf
net.ipv4.ip_forward = 0
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
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 536870912
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 1048586

4.1 編輯/etc/pam.d/login,新增內容(黃色背景部分)


# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_limits.so
session optional pam_console.so

5 建立目錄並授權,上傳 oracle 軟體包(linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip)
將Oracle軟體包以 bin方式ftp到資料庫伺服器,建議放到/u01目錄下,然後解包。
cd /u01
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
mkdir /u01/app
chown -R oracle:oinstall /u01/
chmod 755 -R /u01/

6. Xstart 設定
主機: oracle 伺服器 ip
協議: SSH
使用者名稱: 上面建立的使用者
命令: /usr/bin/gnome-session --display $DISPLAY



7. 開始安裝 Oracle
7.1 Oracle 資料庫軟體安裝

切換到 oracle 軟體包目錄, ./runInstaller 進行 oracle 資料庫安裝
$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 10664 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8055 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-08-14_02-48-06PM. Please wait ...


這個警告沒有任何意義,點【 YES】




語言選擇



如果之前安裝 yum 依賴包,還是提示沒安裝成功,就忽略把,勾選【 Ignore ALL】




彈出上圖的對話方塊時,需在 root 管理員許可權下執行上面兩條指令碼