濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解

Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解

熱門(mén)標(biāo)簽:安陽(yáng)外呼系統(tǒng)免費(fèi) 400電話是不是免費(fèi)申請(qǐng) 圖像地圖標(biāo)注 濟(jì)南地圖標(biāo)注公司 分布式呼叫中心 貴陽(yáng)電話外呼系統(tǒng)哪家好 海南400電話哪里辦理 呼倫貝爾智能手機(jī)地圖標(biāo)注 南寧人工智能電銷(xiāo)機(jī)器人費(fèi)用

前面講了虛擬機(jī)的設(shè)置和OracleLinux的安裝,接下來(lái)我們來(lái)說(shuō)下Oracle安裝前的準(zhǔn)備工作。

1、系統(tǒng)信息查看

系統(tǒng)信息查看

首先服務(wù)器ip:192.168.8.120

服務(wù)器系統(tǒng):Oracle Linux Server release 6.5

服務(wù)器主機(jī)名:oracle-learn

查看磁盤(pán)空間情況:

[root@oracle-learn ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 4.8G 26G 17% /
tmpfs 3.9G 224K 3.9G 1% /dev/shm
/dev/sdc1 197G 60M 187G 1% /oracle
/dev/sdb1 40G 48M 38G 1% /soft

/oracle目錄用于安置oracle
/soft用于存放oracle等工具安裝包

2、掛載光驅(qū)

在啟動(dòng)系統(tǒng)后,檢查虛擬機(jī)光驅(qū)設(shè)置是否選中已連接,如果沒(méi)有,則選中。

掛載光驅(qū)

[root@oracle-learn ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

檢查是否掛載成功

[root@oracle-learn ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 4.8G 26G 17% /
tmpfs 3.9G 224K 3.9G 1% /dev/shm
/dev/sdc1 197G 60M 187G 1% /oracle
/dev/sdb1 40G 48M 38G 1% /soft
/dev/sr0 3.7G 3.7G 0 100% /mnt

1、設(shè)置yum配置

修改原yum文件的名稱(chēng)

[root@oracle-learn ~]# cd /etc/yum.repos.d/
[root@oracle-learn yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repofuben
[root@oracle-learn yum.repos.d]# ll

總用量 4

-rw-r--r--. 1 root root 2545 10月 29 2018 public-yum-ol6.repofuben
[root@oracle-learn yum.repos.d]# 

2、設(shè)置yum的配置

[root@oracle-learn yum.repos.d]# vim /etc/yum.conf

添加如下內(nèi)容:

[EL]
name =Oracle Linux 6.5 
baseurl=file:///mnt/Server/
gpgcheck=0
enabled=1

保存并退出

測(cè)試下是否配置成功

[root@oracle-learn yum.repos.d]# yum install binutils -y

如果配置成功

3、安裝Oracle需要的軟件包

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc-devel -y
yum install ksh -y
yum install libgcc -y
yum install libstdc++ -y
yum install libstdc++-devel -y
yum install libaio -y
yum install libaio-devel -y
yum install libXext -y
yum install libXtst -y
yum install libX11 -y
yum install libXau -y
yum install libxcb -y
yum install libXi -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel –y

4、hosts文件配置

編輯/etc/hosts文件,[root@db01 /]# vi /etc/hosts

在最后添加如下內(nèi)容:
192.168.8.120 oracle-learn
前面是服務(wù)器ip,后面是服務(wù)器主機(jī)名

5、添加組與用戶

[root@oracle-learn ~]# /usr/sbin/groupadd -g 60001 oinstall
/usr/sbin/groupadd -g 60002 dba
[root@oracle-learn ~]# /usr/sbin/groupadd -g 60002 dba
/usr/sbin/groupadd -g 60003 oper
[root@oracle-learn ~]# /usr/sbin/groupadd -g 60003 oper
[root@oracle-learn ~]#/usr/sbin/useradd -u 61002 -g oinstall -G dba oracle
[root@oracle-learn ~]# /usr/sbin/useradd -u 61002 -g oinstall -G dba oracle

查看oracle用戶

[root@oracle-learn ~]# id oracle
uid=61002(oracle) gid=60001(oinstall) 組=60001(oinstall),60002(dba)
[root@oracle-learn ~]# 

設(shè)置Oracle用戶密碼

[root@oracle-learn ~]# passwd oracle

更改用戶 oracle 的密碼 。

新的 密碼:

無(wú)效的密碼: 它基于字典單詞

無(wú)效的密碼: 過(guò)于簡(jiǎn)單

重新輸入新的 密碼:

passwd: 所有的身份驗(yàn)證令牌已經(jīng)成功更新。

[root@oracle-learn ~]# 

6、添加文件系統(tǒng)

創(chuàng)建/oracle用以存放oracle

[root@oracle-learn ~]# cd /oracle
[root@oracle-learn oracle]# mkdir -p /oracle/app/oracle/product/11.2.0/db_1
[root@oracle-learn oracle]# chown -R oracle:oinstall /oracle
[root@oracle-learn oracle]# chmod -R 775 /oracle/
[root@oracle-learn oracle]# 

7、修改操作系統(tǒng)參數(shù)

7.1修改/etc/security/limits.conf文件;

[root@oracle-learn oracle]# vi /etc/security/limits.conf

增加內(nèi)容如下:

#ORACLE SETTING
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

7.2修改/etc/security/limits.d/90-nproc.conf文件內(nèi)容

[root@oracle-learn oracle]# vi /etc/security/limits.d/90-nproc.conf

注釋掉

#* soft nproc 1024

添加

* - nproc 16384

 查看更改的文件

[root@oracle-learn oracle]# cat /etc/security/limits.d/90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
#* soft nproc 1024
* - nproc 16384
root soft nproc unlimited
[root@oracle-learn oracle]# 

7.3禁用SELINUX

[root@oracle-learn oracle]# vi /etc/selinux/config

SELINUX=enforcing

改成

SELINUX=disabled

讓SELINUX生效:

[root@oracle-learn oracle]# setenforce 0

7.4關(guān)閉iptables防火墻

關(guān)閉防火墻

[root@oracle-learn oracle]# service iptables stop
iptables:將鏈設(shè)置為政策 ACCEPT:filter [確定]
iptables:清除防火墻規(guī)則: [確定]
iptables:正在卸載模塊: [確定]
[root@oracle-learn oracle]# 

也可以設(shè)置永久關(guān)閉防火墻

[root@oracle-learn oracle]# chkconfig iptables off
[root@oracle-learn oracle]# 

7.5修改/etc/pam.d/login文件

[root@oracle-learn oracle]# vi /etc/pam.d/login

添加

#ORACLE SETTING
session required pam_limits.so

7.6修改sysctl.conf配置文件

[root@oracle-learn ~]# vi /etc/sysctl.conf

注釋

#kernel.shmmax = 68719476736
#kernel.shmall = 4294967296

添加

#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 8589934592
kernel.shmall = 2097152
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

 

注釋?zhuān)?/p>

kernel.shmmax和kernel.shmall的計(jì)算方法:
kernel.shmmax大于SGA,小于物理內(nèi)存

我這里服務(wù)器的內(nèi)存是8G

所以kernel.shmmax的值是

`1024*1024*1024*8=8589934592`
`kernel.shmmni = 4096`
`kernel.shmall=kernel.shmmax/4096`

讓配置生效:

[root@oracle-learn ~]# sysctl -p  

8、環(huán)境變量設(shè)置

切換到oracle用戶下

[root@oracle-learn ~]# su - oracle
[oracle@oracle-learn ~]$

修改環(huán)境變量

[oracle@oracle-learn ~]$ vi ~/.bash_profile

添加如下:

#Oracle Settings oracle
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
#export LANG=en_US
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

 

其中ORACLE_SID=orcl;可以自定義數(shù)據(jù)庫(kù)的sid

退出用戶

[oracle@oracle-learn ~]$ exit
logout
[root@oracle-learn ~]# 

在登錄oracle用戶檢查環(huán)境變量參數(shù)

[root@oracle-learn ~]# su - oracle
[oracle@oracle-learn ~]$ env |grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/oracle/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/oracle/app/oracle/product/11.2.0
[oracle@oracle-learn ~]$ 

至此,Linux環(huán)境下Oracle環(huán)境準(zhǔn)備完畢。

總結(jié)

以上所述是小編給大家介紹的Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

您可能感興趣的文章:
  • Linux+php+apache+oracle環(huán)境搭建之CentOS下安裝Oracle數(shù)據(jù)庫(kù)
  • Linux+php+apache+oracle環(huán)境搭建之CentOS下源碼編譯安裝PHP
  • Linux+php+apache+oracle環(huán)境搭建之CentOS下安裝Apache
  • VMware中l(wèi)inux環(huán)境下oracle安裝圖文教程(二)ORACLE 10.2.05版本的升級(jí)補(bǔ)丁安裝
  • VMware中l(wèi)inux環(huán)境下oracle安裝圖文教程(一)
  • Linux一鍵部署oracle安裝環(huán)境腳本(推薦)

標(biāo)簽:合肥 南充 涼山 焦作 郴州 滁州 許昌 遼源

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解》,本文關(guān)鍵詞  Linux,環(huán)境,下,Oracle,安裝,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于Linux環(huán)境下Oracle安裝參數(shù)設(shè)置方法詳解的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    忻州市| 上高县| 鹤壁市| 民和| 依安县| 阳信县| 那曲县| 靖西县| 准格尔旗| 临朐县| 基隆市| 城固县| 乌拉特中旗| 新巴尔虎右旗| 太仆寺旗| 台中市| 岳西县| 新和县| 建宁县| 江油市| 南安市| 尼玛县| 开江县| 揭东县| 沾化县| 衡阳市| 阳朔县| 昌乐县| 松原市| 景德镇市| 通许县| 漳平市| 石林| 双牌县| 池州市| 西城区| 旌德县| 仁怀市| 盈江县| 比如县| 绵竹市|