CentOS7-Oracle11g 安装记录

1.CentOS7 Oracle 11g 需要安装的依赖包
binutils-2.23.52.0.1-12.el7.x86_64 
compat-libcap1-1.10-3.el7.x86_64 
compat-libstdc++-33-3.2.3-71.el7.i686
compat-libstdc++-33-3.2.3-71.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 
ksh
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 

unixODBC-2.3.1-6.el7.x86_64 or later
unixODBC-2.3.1-6.el7.i686 or later
unixODBC-devel-2.3.1-6.el7.x86_64 or later
unixODBC-devel-2.3.1-6.el7.i686 or later

2.创建用户组和对应用户
groupadd oinstall
groupadd dba
groupadd oper
useradd -u -g oinstall -G dba,oper oracle
passwd oracle

3.内核参数配置 vi /ect/sysctl.conf 
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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 = 1048576

使参数生效
sysctl -p

4.安装目录创建
mkdir /u01/app/oracle
mkdir /u01/app/oraInventory

5.修改目录权限
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/oracle

6.修改Oracle用户设置限制 vi /etc/security/limits.conf 
oracle  soft nproc 2047
oracle  hard nproc 16384
oracle  soft nofile 1024
oracle  hard nofile 65536

7.配置用户环境变量
export ORACLE_BASE=/u01/app/
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/db_1
export ORACLE_SID=qijin
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安装时设置的字符集保持一致


8.修改操作系统运行级别
systemctl set-default graphical.target

systemctl set-default multi-user.target

9.上传安装介质

10.开启操作系统图形界面

11.安装lightdm 配置XDMCPServer
yum install epel-release
yum install lightdm 
yum groups mark convert "X Window system"
yum groups mark convert "MATE Desktop"
yum groupinstall "X Window system"
yum groupinstall "MATE Desktop"

vi /etc/lightdm/lightdm.conf
[XDMCPServer]
enabled=ture
port=177

systemctl start lightdm 
firewall-cmd --zone=public --permanent --add-port=177/udp 12.登录图形界面后用Installer安装数据库 用oracle 用户登录 配置监听端口:1523 修改默认监听端口后需要手动注册监听 a.在tnsnames.ora 文件中指定pmon动态注册监听的目标端口 listener_alias = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.130)(PORT = 1523)) ) b. 修改参数local_listener alter system set local_listener=listener_alias; alter system register; 13.创建数据库表空间 create tablespace odsspace datafile '/u01/app/oracle/oradata/qijin/odsspace01.dbf' size 32700M; create tablespace dwspace datafile '/u01/app/oracle/oradata/qijin/dwspace01.dbf' size 32700M; create tablespace dmspace datafile '/u01/app/oracle/oradata/qijin/dmspace01.dbf' size 32700M; 14.创建数据库用户,指定默认表空间,给定权限 create user ods identified by xxx default tablespace odsspace; create user dw identified by xxx default tablespace dwspace; create user dm identified by xxx default tablespace dmspace; grant connect,resource to ods; grant connect,resource to dm; grant connect,resource,dba to dw; 15.install client
调整防火墙策略 firewall-cmd --zone=public --permanent --add-port=1523/tcp firewall-cmd --list-ports --permanent firewall-cmd --reload systemctl restart firewalld

  

posted @ 2023-02-10 11:15  Alex-Zeng  阅读(23)  评论(0编辑  收藏  举报