標籤:oracle的安裝
1.修改主機名稱:
# sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/" /etc/sysconfig/network
# hostname oracledb
2.添加解析主機名稱記錄
# vi /etc/hosts
192.168.1.11 oracledb
3.安裝依賴包
# yum -y install glibc* gcc* make* compat-db* libstdc* libXp* libXtst* compat-libstdc++*
4.添加安裝使用者oracle
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
5.設定oracle使用者密碼
# passwd oracle
6.修改oracle的環境變數在最後添加
# vi /home/oracle/.bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/112
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin
7.修改核心參數檔案
# vi /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 = 1048586
8.使修改生效
# sysctl -p
9.添加認證模組,在後面添加一行
# vim /etc/pam.d/login
session required pam_limits.so
10.在全域變數檔案中添加
# vim /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/bash" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
# source /etc/profile
11.建立相應目錄並授權oracle
# mkdir -p /opt/oracle/112
# mkdir -p /opt/oralnventory
# mkdir -p /opt/oradata
# chown -R oracle:oinstall oralnventory/
# chown -R oracle:dba oracle/
12.切換到oracle
# xhost +
# su - oracle
13.執行./runInstaller 開始圖形安裝
oracle的安裝