oracle 安裝筆記

來源:互聯網
上載者:User

標籤:oracle   主機   


修改主機名稱
[[email protected] ~]# sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/" /etc/sysconfig/network
[[email protected] ~]# hostname oracledb

添加主機名稱與IP對應記錄
[[email protected] ~]# vi /etc/hosts

192.168.1.160    oracledb
[[email protected] ~]# ping oracledb

關閉Selinux
[[email protected] ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
[[email protected] ~]# setenforce 0

關閉防火牆
[[email protected] ~]# chkconfig iptables off
[[email protected] ~]# service iptables stop


安裝依賴包


[[email protected] ~]# yum -y install  gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-commonglibc-devel libaio libaio-devel libgcclibstdc++ libstdc++-devel unixODBC unixODBC-devel


建立使用者和組

[[email protected] ~]# groupadd oinstall
[[email protected] ~]# groupadd dba
[[email protected] ~]# useradd -g oinstall -G dba oracle
[[email protected] ~]# passwd oracle

修改核心參數

[[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

[[email protected] ~]# sysctl -p
[[email protected] ~]# sysctl -a

修改oracle安裝使用者資源限制

[[email protected] ~]# vim /etc/security/limits.conf

oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   10240

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

建目錄改許可權

[[email protected] ~]# mkdir -p /u01
[[email protected] ~]# chown -R oracle:oinstall /u01
[[email protected] ~]# chmod -R 775 /u01

使所有使用者都能訪問圖形案頭


[[email protected] ~]# xhost +

設定oracle環境變數
[[email protected] ~]# su - oracle #切換到oracle使用者

[[email protected] ~]$ vim ~/.bash_profile

export ORACLE_BASE=/u01/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/oracle/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$HOME/bin:/u01/oracle/product/11.2.0/dbhome_1/bin

[email protected] ~]$ source .bash_profile  #立即生效

安裝Oralce
1 解壓orcale 到 root/Documents/123 目錄

[[email protected] 123]$ ./database/runInstaller

修改/etc/oratab 將N改為Y,允許dbstart 啟動資料庫

[[email protected] /]# vim /etc/oratab


修改/etc/rc.local 自啟動Oracle

[[email protected] /]# vim /etc/rc.local

su - oracle -c ‘lsnrctl start‘
su - oracle -c ‘dbstart‘
su - oracle -c ‘emctl start dbconsole‘



























本文出自 “12352241” 部落格,請務必保留此出處http://12362241.blog.51cto.com/12352241/1878523

oracle 安裝筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.