centos7下安装ORACLE 12C-系统环境配置

环境说明
操作系统: CentOS Linux release 7.4.1708 (Core) 
数据库版本: 
IP地址:10.1.3.19
主机名: db100103019
CPU: 2核 内存:4G 硬盘:30G

系统环境配置

环境准备

1.1 配置hosts

# vim /etc/hosts
10.1.3.19   db100103019

1.2 安装依赖包

# yum -y install wget binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 ibXext ibXext.i686 libX11 libX11.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat smartmontools

1.3 修改内核参数

# vim /etc/sysctl.conf 
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack =1
net.ipv4.tcp_window_scaling = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4101144576
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
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_keepalive_intvl = 2
net.ipv4.tcp_keepalive_probes = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
vm.overcommit_memory = 1
vm.swappiness = 0
kernel.watchdog_thresh=30

执行/sbin/sysctl -p 立即生效

1.4 修改limit

# vim /etc/security/limits.conf 
    *               hard    nofile          65536
    *               soft    nofile          65536
    *               hard nproc              32767
    *               soft nproc              32767
    *               soft    core           unlimited
    *               hard    core           unlimited
    oracle  soft  nproc   2047
    oracle  hard  nproc   16384
    oracle  soft  nofile  1024
    oracle  hard  nofile  65536
    oracle  soft  stack   10240
    oracle  hard  stack   32768
# vim /etc/security/limits.d/20-nproc.conf 
    *          soft    nproc     unlimited
    root       soft    nproc     unlimited

1.5 修改selinux

# vim /etc/selinux/config 
SELINUX=disabled

1.6 关闭防火墙

# systemctl stop firewalled
# systemctl disable firewalld

1.7 创建用户、组及密码

groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
echo "oracle"|passwd --stdin oracle

1.8 创建目录并授权

mkdir -p /opt/oracle/product/12.2.0.1/db_1
mkdir -p /data/oradata
mkdir -p /opt/oraInventory
mkdir /data/archivelog
chown oracle. /opt/oracle/ /data/oradata/ /data/archivelog/ /opt/oraInventory -R

1.9 配置环境变量

# su - oracle
$ vim .bash_profile 
umask 022
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=oradb
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

$ source .bash_profile 

1.10 vnc安装配置

# yum -y install tigervnc-server
# su - oracle
$ vncserver :1

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Verify:
xauth:  file /home/oracle/.Xauthority does not exist

New ‘db100103019:1 (oracle)‘ desktop is db100103019:1

Creating default startup script /home/oracle/.vnc/xstartup
Creating default config /home/oracle/.vnc/config
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/db100103019:1.log

使用vnc客户端连接

软件准备

软件下载,去官网下载软件

https://www.oracle.com/downloads/

将下载好的软件linuxx64_12201_database.zip 上传到/data/soft目录下,解压并授权给oracle

# ls -al linuxx64_12201_database.zip 
# unzip linuxx64_12201_database.zip 
# chown -R oracle. database/

centos7下安装ORACLE 12C-系统环境配置

上一篇:centos7下安装ORACLE 12C-软件安装


下一篇:php excel类 phpExcel使用方法介绍