centos 6.5部署oracle 11g記錄

來源:互聯網
上載者:User

標籤:centos6.5部署安裝Oracle

1.修改主機名稱:
[[email protected] ~]# sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/" /etc/sysconfig/network
2.設定ip地址:

虛機安裝的話,建議使用僅主機模式。固定ip地址。
3.修改hosts檔案
vi /etc/hosts 192.168.138.120 oracledb
3.安裝依賴包,需安裝如下包:

4.建立使用者和組
[[email protected] ~]# sysctl -p
[[email protected] ~]# groupadd -g 200 oinstall
[[email protected] ~]# groupadd -g 201 dba
[[email protected] ~]# useradd -u 440 -g oinstall -G dba oracle
[[email protected] ~]# passwd oracle
5.修改核心參數
[[email protected] ~]# vi/etc/sysctl.conf #末尾添加如下
net.ipv4.ip_local_port_range= 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
6.修改系統資源限制
[[email protected] ~]# vi/etc/security/limits.conf #末尾添加如下
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

[[email protected] ~]# vi/etc/pam.d/login
session required pam_namespace.so #下面添加一條pam_limits.so
session required pam_limits.so

[[email protected] ~]# vi/etc/profile #
if [ $USER ="oracle" ]; then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
7.建立安裝目錄及設定許可權,命令列輸入:
[[email protected] ~]# mkdir /opt/oracle/app/
[[email protected] ~]# mkdir /opt/oracle/oradata/
[[email protected] ~]# chmod 755 /opt/oracle/
[[email protected] ~]# chmod 775 /opt/oracle/app/
[[email protected] ~]# chown oracle.oinstall -R /opt/oracle/

8.設定環境變數(su - oracle )
[[email protected] ~]$ vi ~/.bash_profile
export ORACLE_BASE=/opt/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
export ORACLE_PID=orcl
[[email protected] ~]$ source .bash_profile
9.以Oracle使用者登陸系統,進行解壓並安裝Oracle。

centos 6.5部署oracle 11g記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.