redhat安装oracle11g7 oracle装好后怎么用

1549人阅读
redhat系统总结(15)
数据库(2)
网址:/gaojun/archive//2783257.html
中文乱码问题:
export LANG=en_US.gbk
export&NLS_LANG=american_america.ZHS16GBK&
安装准备工作
下载地址:
选择需要的oracle安装文件下载
联机文档:
可以下载其PDF文档参考(其中的有关Linux安装向导是最权威的安装手册)
数据库安装硬件配置要求:
最小内存&1 GB of RAM
虚拟内存容量
Available RAM
Swap Space Required
Between 1 GB and 2 GB
1.5 times the size of RAM
Between 2 GB and 16 GB
Equal to the size of RAM
More than 16 GB
硬盘空间要求
数据库软件硬盘空间需求:
Installation Type
Requirement for Software Files (GB)
Enterprise Edition
Standard Edition
数据文件硬盘空间需求:
Installation Type
Requirement for Data Files (GB)
Enterprise Edition
Standard Edition
检查的命令
# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo
查看联机文档,可以看出Oracle 11g支持Linux操作系统
下面是&X86(32位)上Linux
其中Red Hat 4与Oracle Linux 4对应,以及与Cent OS 4对应(版本要对应)
通过查看Oracle安装文档中列出的Package Requirements可以查看在不同平台上需要的软件包,下面列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0的要求,检查
下系统是否安装过这些包,如果没在对应的系统光盘查找对应的rpm包并安装。
检查工作:依次执行:rpm -qa | grep&下面软件包
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
libaio-0.3.106
libaio-devel-0.3.106&
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2&
libstdc++-devel-4.1.2
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
Oracle用户
root用户:创建Oracle安装组oinstall,数据库管理员组dba,及oracle用户
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba oracle(主组oinstall,其它组:dba)
# passwd oracle
root用户:修改&/etc/sysctl.conf&文件,加上如下参数
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax =
kernel.shmmni = 4096
kernel.sem = 250 8
net.ipv4.ip_local_port_range =
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
为使上述配置生效而不重启系统,执行如下命令
# /sbin/sysctl -p
root用户:修改&/etc/security/limits.conf&文件,加上下面的参数
oracle&&&&&&&&&& soft&&& nproc&& 2047
oracle&&&&&&&&&& hard&&& nproc&& 16384
oracle&&&&&&&&&& soft&&& nofile& 1024
oracle&&&&&&&&&& hard&&& nofile& 65536
root用户下:修改/etc/pam.d/login文件加上如下参数
session&&& required&&&& pam_limits.so
root用户下:修改/etc/profile文件加入如下参数:
if [ $USER = &oracle& ]; then
&&&&&&& if [ $SHELL = &/bin/ksh& ]; then
&&&&&&&&&&&&& ulimit -p 16384
&&&&&&&&&&&&& ulimit -n 65536
&&&&&&& else
&&&&&&&&&&&&& ulimit -u 16384 -n 65536
&&&&&&& fi
root用户:
# mkdir -p /u01/oraInventory
# chown -R oracle:oinstall /u01/
# chmod -R 775 /u01/
bash shell
$ vi .bash_profile
增加如下内容,主要是修改
export ORACLE_BASE=/u01&
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=oracleSid&
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
完成后执行:
#su –oracle
#env | grep ORA查看环境变量是否完成
使用oracle用户登录,然后解压缩Oracle安装文件:
$ unzip linux_11gR1_database.zip
然后进入解压后的目录,执行
&&&&&& $ ./runInstaller
然后进入解压后的目录,执行
选择高级安装,高级也挺简单
默认oraInventory认为是根目录下,oracle用户没有写权限,所以warning,不用管执行下一步
修改inventory directory目录为/u01/oralInventory,此时oracle用户就有写权限,下一步:
&&&&&& oracle会进行安装前检查工作,如果没有错误,则直接下一步。
可能出现的错误是:
(1)修改的系统配置文件没有生效,最绝的办法,重启系统
(2)静态IP问题,如果你使用了静态IP,则应该打开/etc/hosts添加静态IP指定:如192.168.188.10&&&&&& localhost.localdomain(路由域名)
(3)内存问题,如果内在设置1G左右,或稍微较少时,可忽略
一直下一步,安装完成!但此时没有创建数据库&。
首先配置Listener
$ netca&&&&&& (net configuration)
注意:此时可能报如下错误
是由于默认的主机名导致的,修改2处
[oracle@jc11g ~]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=test11g
GATEWAY=192.168.1.254
[oracle@jc11g ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1&&&&&&&&&&&&&&&localhost.localdomain localhost test11g
hostname test11g
让oracle用户退出重新登录就可以正常启动netca了 (参考:)
端口使用1521(在没有启用防火墙情况下,所有端口号都可以使用),直接下一步至完成,完成后查看是否启动:
$ ps –ef | grep LISTENER
创建数据库
$dbca&&&&& (database configuration)
选择默认,下一步
输入数据库名和SID(如示例中:oracleSid,一定要匹配)下一步
使用共同口令,如:oracle,下一步,直到如下图所示:
此时需要注意字符集的选择,对于含有中文数据的数据库来说,可以选择Unicode编码(如果字符集选择不对,后面再修改时非常麻烦)
下一步,选择安装一些示例数据库,一路下一步,将会开始创建数据库
创建完数据库后,将会在/u01/oradata目录下创建相应的数据,并且可以使用命令
ps –ef | grep oracle
查看已经启动的oracle进程
到此,oracle数据库软件及数据库安装完成。
接上一节,可以使用sqlplus测试是否已经成功安装oracle,如下:
$sqlplus /nolog
SQL&conn / as sysdba
SQL&create table mytable(name varchar(10), age int);
SQL&insert into mytable values(‘user1’,12);
SQL&select *
查看oracle进程:
SQL& !ps –ef | grep oracle
关闭oracle
SQL&shutdown immediate
下面将上面介绍的安装过程进行总结,来源:Linux开源公社
、检查硬件
# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo
、下载软件
Oracle Database 10g Release 2 (10.2.0.1) Software下载位置:
/software/products/database/oracle10g/index.html
、修改host文件
查看/etc/hosts文件中必须包含a fully qualified name for the server
、安装软件包检查
1、检查下列包是否安装,若未安装则要先安装:
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
gcc-4.1.1-52
gcc-c++-4.1.1-52
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11
# rpm -qa | grep make gcc glibc compat openmotif21 setarch&等等
、libstdc包的链接
(老版本需求,新版本oracle11不要设置):
ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5&&&&&&&&&&&
#检测存在如果不做此链接,在安装过程中建好数据库,将会出现不能链接不上数据库问题。
、设置核心参数
在/etc/sysctl.conf文件中加入下列行:
#kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax =
-- (以字节为单位,物理内存数量*,为内存的2倍)
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 8
fs.file-max = 65536
net.ipv4.ip_local_port_range =
net.core.rmem_default=8388608
net.core.rmem_max=8388608
net.core.wmem_default=262144
net.core.wmem_max=262144
# sysctl -p #运行下列命令改变核心参数
、设置Shell Limits(系统资源限制),提高软件的运行效率
a.在/etc/security/limits.conf文件中加入下列红色行:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
b.在/etc/pam.d/login文件中加入下列行,如果里面没有的话:
session required /lib/security/pam_limits.so
session required pam_limits.so
c.在/etc/profile后加入以下语句:
vi /etc/profile
if [ $USER = &oracle& ]; then
if [ $SHELL = &/bin/ksh& ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
创建用户和组及相关目录
--创建dba/oper/oinstall组
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
/usr/sbin/groupadd oinstall
--创建oracle用户并设置用户所属组
/usr/sbin/usermod -g oinstall -G dba oracle
/usr/sbin/useradd -g oinstall -G dba oracle
passwd oracle
# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
--创建相关安装目录
mkdir -p /opt/oracle/product
mkdir -p /opt/oracle/product/OraHome
mkdir -p /opt/oraInventory&&&&&&&&&&&&&&&&&&&&& #(the default inventory folder)
mkdir -p /opt/oracle/oradata&&&&&&&&&&&&&&&&&& #(change the right file owner)
mkdir -p /var/opt/oracle
--设置目录所有者和权限
chown -R oracle.oinstall /opt/oracle
chown -R oracle.oinstall /opt/oracle/oradata
chown -R oracle.oinstall /opt/oracle/product/OraHome
chown -R oracle.dba /opt/oraInventory
chown oracle.dba /var/opt/oracle
chmod -R 775 /opt/oracle
chmod -R 755 /var/opt/oracle
设置安装环境变量
# su - oracle --su到oracle用户下,
更改用户的一些配置
$vi .bash_profile
添加以下参数,主要是配置oracle软件运环境参数
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
&&&&&& . ~/.bashrc
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/OraHome
export ORACLE_SID=orcl
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
11g:ORA_NLS33=$ORACLE_HOME/nls/admin/data
10g:ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
9i:ORA_NLS33=/oracle/app/ora92/ocommon/nls/admin/data
--执行以下命令让配置马上生效或以oracle用户登录使设置生效
$ source $HOME/.bash_profile
Email:gaojun_
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:152949次
积分:4233
积分:4233
排名:第7671名
原创:283篇
评论:12条
(10)(20)(15)(17)(8)(15)(7)(15)(26)(39)(23)(43)(44)(5)
(window.slotbydup = window.slotbydup || []).push({
id: '4740887',
container: s,
size: '250,250',
display: 'inlay-fix'1576人阅读
Oracle DB(699)
RHEL7(84)
RHEL 7已经在2014年开放下载,从MOS的“认证”部分可以查到如下信息:
12.1.0.2在rhel7上通过了认证。
12.1.0.1在rhel7上没通过认证。
11.2.0.4在rhel7上通过了认证。
11.2.0.3在rhel7上没通过认证。
另外一些知识点:
1. 还有RHEL 5.10和RHEL 5.11版本,我以为RHEL5.9已经到头了。
2. 在各种linux发行版(RHEL,SUSE,OEL),各种Linux version下,安装不同的Oracle DB version的 必看文章:
Master Note of&Linux&OS Requirements for Database Server [ID ]
不过该文章没有RHEL7下安装oracle db的指导。
关于RHEL7下安装oracle DB 11.2.0.4的文章,请参见:
Requirements for Installing Oracle 11.2.0.4 RDBMS on RHEL7 or OL7 64-bit (x86-64) (文档 ID )
我翻译了该文章, 在如下的链接,请参考:
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1573567次
积分:23836
积分:23836
排名:第293名
原创:590篇
转载:287篇
译文:296篇
评论:64条
文章:21篇
阅读:13969
阅读:11358
文章:35篇
阅读:40754
文章:28篇
阅读:41469
文章:83篇
阅读:112816
(27)(5)(10)(25)(15)(33)(14)(37)(37)(38)(44)(25)(15)(50)(20)(15)(5)(3)(15)(31)(47)(28)(31)(19)(20)(23)(43)(17)(43)(41)(59)(34)(81)(22)(22)(21)(4)(5)(28)(87)(2)(2)(10)(11)(1)(1)(7)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'CentOS7安装Oracle 11gR2 图文详解_数据库技术_Linux公社-Linux系统门户网站
你好,游客
CentOS7安装Oracle 11gR2 图文详解
来源:Linux社区&
作者:sonnychen
最近要运维一个项目,准备在家办公,公司无远程作业环境,个人本本不喜欢别人碰,第一次在上安装,本案留以后使用,毕竟不是经常安装。
注:11gR2 X64安装
一、环境准备
1.VMware-workstation-full-11.1.0-2496824.exe
2.CentOS-7-x86_64-DVD-1511.iso
3.linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
以上觉得不是重点,不给下载地址,不描述安装过程,安装完CentOS 7,截图如下:
第一次安装防坑,没有进行任何操作之前,先在VMware中创建该虚拟机快照,后期搞郁闷了,可以回归到该快照版本。特么还是不放心,又把该虚拟机完整克隆一份(强迫症)。
二、安装Oracle前准备
1.创建运行oracle数据库的系统用户和用户组
[sonny@localhost ~]$ su root  #切换到root
[root@localhost sonny]# groupadd oinstall  #创建用户组oinstall
[root@localhost sonny]# groupadd dba  #创建用户组dba
[root@localhost sonny]# useradd -g oinstall -g dba -m oracle  #创建oracle用户,并加入到oinstall和dba用户组
[root@localhost sonny]# passwd oracle  #设置用户oracle的登陆密码,不设置密码,在CentOS的图形登陆界面没法登陆
Changing password for user oracle.
New password:   # 密码
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:   # 确认密码
passwd: all authentication tokens updated successfully.
[root@localhost sonny]# id oracle # 查看新建的oracle用户
uid=1001(oracle) gid=1002(dba) groups=1002(dba)
[root@localhost sonny]#
为啥要创建oinstall用户组及dba组? 参考:
理论上单例按照需要3种用户组,实际只建两个oinstall和dba,后面再安装oracle数据库的时候把OSOPER组也设置是dba组。
a.oracle 清单组(一般为oinstall):
OINSTALL 组的成员被视为 Oracle 软件的&所有者&,拥有对 Oracle 中央清单 (oraInventory) 的写入权限。在一个 Linux 系统上首次安装 Oracle 软件时, OUI 会创建 /etc/oraInst.loc 文件。该文件指定 Oracle 清单组的名称(默认为 oinstall)以及 Oracle 中央清单目录的路径。
b.数据库管理员(OSDBA,一般为 dba):
OSDBA 组的成员可通过操作系统身份验证使用 SQL 以 SYSDBA 身份连接到一个 Oracle 实例。该组的成员可执行关键的数据库管理任务,如创建数据库、启动和关 闭实例。该组的默认名称为dba。SYSDBA 系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。不要混淆 SYSDBA
系统权限与数据库角色 DBA。DBA 角色不包括 SYSDBA 或 SYSOPER 系统权限。
c.数据库操作员组(OSOPER,一般为 oper):
OSOPER 组的成员可通过操作系统身份验证使用 SQL 以 SYSOPER 身份连接到一个 Oracle 实例。这个可选组的成员拥有一组有限的数据库管理权限,如管理和运行备份。 该组的默认名称为oper。SYSOPER 系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。要使用该组,选择 Advanced 安装类型来安装 Oracle 数据库软件。&
2.创建oracle数据库安装目录
[sonny@localhost ~]$ su root
[root@localhost sonny]# mkdir -p /data/oracle  #oracle数据库安装目录
[root@localhost sonny]# mkdir -p /data/oraInventory  #oracle数据库配置文件目录
[root@localhost sonny]# mkdir -p /data/database  #oracle数据库软件包解压目录
[root@localhost sonny]# cd /data
[root@localhost data]# ls  #创建完毕检查一下(强迫症)
oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  #设置目录所有者为oinstall用户组的oracle用户
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]# &
3.修改OS系统标识
&oracle默认不支持CentOS系统安装,Oracle Database 11g Release 2 的 OS要求参考:&
&我安装是64位数据库,On Linux x86-64: Enterprise Linux 7 &(RHEL 7)
&另外,CentOS7.0.1511 基于 RHEL7.2 &参考:
&修改文件&/etc/-release&
[sonny@localhost data]$ su root
[root@localhost data]# cat /proc/version
Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3
(Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
[root@localhost data]# cat /etc/redhat-release  
CentOS Linux release 7.2.1511 (Core)
[root@localhost data]# vi /etc/redhat-release
[root@localhost data]# cat /etc/redhat-release
[root@localhost data]# &
4.安装oracle数据库所需要的软件包
重复一遍,我安装时Oracle Database 11g Release 2 64位数据库。
Oracle Database Package Requirements for Linux x86-64 如下:(参考:)
操作系统:Oracle Linux 7 and Red Hat Enterprise Linux 7
The following packages (or later versions) must be installed:
binutils-2.23.52.0.1-12.el7.x86_64
compat-libcap1-1.10-3.el7.x86_64
gcc-4.8.2-3.el7.x86_64
gcc-c++-4.8.2-3.el7.x86_64
glibc-2.17-36.el7.i686
glibc-2.17-36.el7.x86_64
glibc-devel-2.17-36.el7.i686
glibc-devel-2.17-36.el7.x86_64
libaio-0.3.109-9.el7.i686
libaio-0.3.109-9.el7.x86_64
libaio-devel-0.3.109-9.el7.i686
libaio-devel-0.3.109-9.el7.x86_64
libgcc-4.8.2-3.el7.i686
libgcc-4.8.2-3.el7.x86_64
libstdc++-4.8.2-3.el7.i686
libstdc++-4.8.2-3.el7.x86_64
libstdc++-devel-4.8.2-3.el7.i686
libstdc++-devel-4.8.2-3.el7.x86_64
libXi-1.7.2-1.el7.i686
libXi-1.7.2-1.el7.x86_64
libXtst-1.2.2-1.el7.i686
libXtst-1.2.2-1.el7.x86_64
make-3.82-19.el7.x86_64
sysstat-10.1.5-1.el7.x86_64&
&老实人,第一次搞,一个一个的安装,命令也很简单,反正文档要求高版本也可以:
[sonny@localhost data]$ su root
[root@localhost data]# yum install binutils省略...
5.关闭防火墙&CentOS 7.2默认使用的是firewall作为防火墙
[sonny@localhost /]$ su root
[root@localhost /]# systemctl status firewalld.service  #查看防火墙状态,运行中
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld. vendor preset: enabled)
Active: active (running) since Thu 2016-04-07 18:54:29 PDT; 2h 20min ago
Main PID: 802 (firewalld)
CGroup: /system.slice/firewalld.service
└─802 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl stop firewalld.service  #关闭防火墙
[root@localhost /]# systemctl status firewalld.service  #再次查看防火墙状态,发现已关闭
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld. vendor preset: enabled)
Active: inactive (dead) since Thu 2016-04-07 21:15:34 PDT; 9s ago
Main PID: 802 (code=exited, status=0/SUCCESS)
Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 07 21:15:33 localhost systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 07 21:15:34 localhost systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl disable firewalld.service  #禁止使用防火墙(重启也是禁止的)
Removed symlink /etc/systemd/system/dbus-org.project.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost /]#
&防火墙先禁用,搞好之后再配置,个人虚拟机,要毛线防火墙~~
6.关闭selinux(需重启生效)
[root@localhost /]# vi /etc/selinux/config
[root@localhost /]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=disabled
#此处修改为disabled
# SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@localhost /]#
为啥要关闭selinux?因为selinux太高深,非专业人士搞不懂~~
7.修改内核参数
红色部分为添加代码
[sonny@localhost /]$ su root
[root@localhost /]# vi /etc/sysctl.conf
[root@localhost /]# cat /etc/sysct.conf
cat: /etc/sysct.conf: No such file or directory
[root@localhost /]# cat /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/&name&.conf file
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744 #设置最大打开文件数
fs.aio-max-nr = 1048576
kernel.shmall = 2097152 #共享内存的总量,8G内存设置:k/
kernel.shmmax =
#最大共享内存的段大小
kernel.shmmni = 4096 #整个系统共享内存端的最大数
kernel.sem = 250 8
net.ipv4.ip_local_port_range =
#可使用的IPv4端口范围
net.core.rmem_default = 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576
[root@localhost /]#
使配置参数生效
[root@localhost /]# sysctl -p
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
sysctl: setting key "fs.file-max": Invalid argument
fs.file-max = 6815744 #设置最大打开文件数
fs.aio-max-nr = 1048576
sysctl: setting key "kernel.shmall": Invalid argument
kernel.shmall = 2097152 #共享内存的总量,8G内存设置:2097152*4k/1024/1024
sysctl: setting key "kernel.shmmax": Invalid argument
kernel.shmmax =
#最大共享内存的段大小
sysctl: setting key "kernel.shmmni": Invalid argument
kernel.shmmni = 4096 #整个系统共享内存端的最大数
kernel.sem = 250 32000 100 128
sysctl: setting key "net.ipv4.ip_local_port_range": Invalid argument
net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@localhost /]# &
8.对oracle用户设置限制,提高软件运行性能(红色为添加部分)
[sonny@localhost /]$ su root
[root@localhost /]# vi /etc/security/limits.conf
[root@localhost /]# cat /etc/security/limits.conf
# /etc/security/limits.conf
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
#subdirectory, but a user specific setting here can be overriden only
#with a user specific setting in the subdirectory.
#Each line describes a limit for a user in the form:
#&domain& can be:
- a user name
- a group name, with @group syntax
- the wildcard *, for default entry
- the wildcard %, can be also used with %group syntax,
for maxlogin limit
#&type& can have the two values:
- "soft" for enforcing the soft limits
- "hard" for enforcing hard limits
#&item& can be one of the following:
- core - limits the core file size (KB)
- data - max data size (KB)
- fsize - maximum filesize (KB)
- memlock - max locked-in-memory address space (KB)
- nofile - max number of open file descriptors
- rss - max resident set size (KB)
- stack - max stack size (KB)
- cpu - max CPU time (MIN)
- nproc - max number of processes
- as - address space limit (KB)
- maxlogins - max number of logins for this user
- maxsyslogins - max number of logins on the system
- priority - the priority to run user process with
- locks - max number of file locks the user can hold
- sigpending - max number of pending signals
- msgqueue - max memory used by POSIX message queues (bytes)
- nice - max nice priority allowed to raise to values: [-20, 19]
- rtprio - max realtime priority
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
[root@localhost /]# &
9.配置用户的环境变量(红色部分为添加代码)
[root@localhost /]# vi /home/oracle/.bash_profile
[root@localhost /]# cat /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export ORACLE_BASE=/data/oracle #oracle数据库安装目录
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 #oracle数据库路径
export ORACLE_SID=orcl #oracle启动数据库实例名
export ORACLE_TERM=xterm #xterm窗口模式安装
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #添加系统环境变量
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量
export LANG=C #防止安装过程出现乱码
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#设置Oracle客户端字符集,必须与Oracle安装时设置的字符集保持一致,如:ZHS16GBK,否则出现数据导入导出中文乱码问题
[root@localhost /]# &
使上述配置立即生效:
[oracle@localhost /]$ su root
[root@localhost /]# source /home/oracle/.bash_profile
[root@localhost /]#
10.上述都搞定了,上传安装包我喜欢xftp,将oracle安装包上传到/usr/local/src
11.解压安装包
[oracle@localhost /]$ cd /usr/local/src  #进入/usr/local/src目录
[oracle@localhost src]$ ls
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
[oracle@localhost src]$ unzip linux.x64_11gR2_database_1of2.zip -d /data/database/  #解压
[oracle@localhost src]$ unzip linux.x64_11gR2_database_2of2.zip -d /data/database/  #解压
[oracle@localhost src]$ su root
[root@localhost src]# chown -R oracle:oinstall /data/database/database/
[root@localhost src]# &
三、oracle安装&
1.图形界面登陆oracle用户:
2.启动oralce安装,到/data/database/database/目录下,执行runInstaller
3.去掉勾,懒得填,个人使用环境不需要自动接收Oracle的安全更新。
4.下一步,只安装数据库软件,个人用不要那些玩意~~
更多详情见请继续阅读下一页的精彩内容:
相关资讯 & & &
& (04月06日)
& (01月24日)
& (05月18日)
& (04月03日)
& (01月16日)
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款
匿名 发表于 setting key &fs.file-max&: 无效的参数,各种无效的参数怎么办
(0) 匿名 发表于 net.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1sysctl: setting key &fs.file-max&: 无效的参数fs.file-max = 6815744 #设置最大打开文件数fs.aio-max-nr = 1048576sysctl: setting key &kernel.shmall&: 无效的参数kernel.shmall = 2097152 #共享内存的总量,8G内存设置:k/sysctl: setting key &kernel.shmmax&: 无效的参数kernel.shmmax =
#最大共享内存的段大小sysctl: setting key &kernel.shmmni&: 无效的参数kernel.shmmni = 4096 #整个系统共享内存端的最大数kernel.sem = 250 8sysctl: setting key &net.ipv4.ip_

我要回帖

更多关于 redhat6安装oracle11g 的文章

 

随机推荐