单机oracle安装
发表于:2025-01-21 作者:千家信息网编辑
千家信息网最后更新 2025年01月21日,===配置yum源===[base]name=rhel6-basebaseurl=file:///osenabled=1gpgcheck=0[Server]name=rhel6-Serverbaseu
千家信息网最后更新 2025年01月21日单机oracle安装===配置yum源===
[base]
name=rhel6-base
baseurl=file:///os
enabled=1
gpgcheck=0
[Server]
name=rhel6-Server
baseurl=file:///os/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=rhel6-HighAvailability
baseurl=file:///os/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=rhel6-LoadBalancer
baseurl=file:///os/LoadBalancer
enabled=1
gpgcheck=0
[ResilientStorage]
name=rhel6-ResilientStorage
baseurl=file:///os/ResilientStorage
enabled=1
gpgcheck=0
[ScalableFileSystem]
name=rhel6-ScalableFileSystem
baseurl=file:///os/ScalableFileSystem
enabled=1
gpgcheck=0
===安装软件oracle所需===
echo 'multilib_policy=all' >> /etc/yum.conf ==安装32位和64位===
yum install -y binutils
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y elfutils-libelf-devel-static
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc
yum install -y glibc-common
yum install -y glibc-devel
yum install -y glibc-headers
yum install -y kernel-headers
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libgcc
yum install -y libgomp
yum install -y libstdc
yum install -y libstdc++-devel
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
===
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y nfs-utils
yum install -y net-tools
yum install -y smartmontools
yum install -y sysstat
====
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)
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)
libxcb-1.9-5.el7 (i686)
libxcb-1.9-5.el7 (x86_64)
libX11-1.6.0-2.1.el7 (i686)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (i686)
libXau-1.0.8-2.1.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)
net-tools-2.0-0.17.20131004git.el7 (x86_64) (for Oracle RAC and Oracle Clusterware)
nfs-utils-1.3.0-0.21.el7.x86_64 (for Oracle ACFS)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-1.el7 (x86_64)
规划:
1、IP规划
127.0.0.1 localhost.localdomain localhost
119.23.147.63 shardcat
119.23.134.20 shardnode1
119.23.134.28 shardnode2
2、磁盘规划
+CRS 三个10G的盘
+DGDATA 4个200G的盘
+ARCH 1个200G
1、创建用户和组
/usr/sbin/groupadd -g 1001 oinstall
/usr/sbin/groupadd -g 1002 dba
/usr/sbin/groupadd -g 1003 oper
/usr/sbin/useradd -u 1001 -g oinstall -G dba,oper -m oracle
echo nihao123, |passwd --stdin oracle
2、创建文件夹
mkdir -p /oracle/app/
chown -R oracle:oinstall /oracle/app/
chmod -R 775 /oracle/app/
mkdir -p /oracle/app/oraInventory
chown -R oracle:oinstall /oracle/app/oraInventory
chmod -R 775 /oracle/app/oraInventory
mkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle/app/oracle
3、编辑.bash_profile
#for grid
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=/oracle/app/grid/product/11.2.0/grid
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export THREADS_FLAG=native
export PATH=$ORACLE_HOME/bin:$PATH
export THREADS_FLAG=native
export PATH=$ORACLE_HOME/bin:$PATH
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
#for oracle
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle/app/oracle
export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1
export GSM_HOME=$ORACLE_BASE/product/11.2.0/gsm
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=shardcat
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
alias gsm_env='. /home/oracle/gsm_env'
alias db_env='. /home/oracle/db_env'
==
gsm_env
export ORACLE_HOME=$GSM_HOME
export PATH=$ORACLE_HOME/bin
db_env
export ORACLE_HOME=$DB_HOME
export PATH=$ORACLE_HOME/bin
4、修改系统参数
vi /etc/security/limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 10240
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
=========================
vi /etc/pam.d/login
# oracle
session required /lib64/security/pam_limits.so
================================================
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.panic_on_oops = 1
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
==============================================
设置vnc
yum install -y tigervnc-server
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service
vi /etc/systemd/system/vncserver@:3.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l oracle -c "/usr/bin/vncserver %i -geometry 1024x768"
PIDFile=/home/oracle/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
==
[root@shardnode1 ~]# systemctl daemon-reload
[root@shardnode1 ~]# systemctl start vncserver@:3.service
===============================================================
unix平台
Oracle11g 参数(必选参数)
archive_lag_target=3600
audit_trail = none
control_file_record_keep_time = 90
db_files=5000
deferred_segment_creation=false
enable_ddl_logging=true
fast_start_mttr_target=300
open_cussors=1000
open_links=50
processes=2000
remote_login_passwordfile = none
sessions=2200
undo_retention=300
sec_max_failed_login_attempts=30
parallel_max_servers=30
(可调内存参数)
memory_max_target=0
memory_target=0
pga_aggregate_target=800M
sga_target=5G
shared_pool_size=1G
db_cache_size=3G
large_pool_size=256M
java_pool_size=256M
stream_pool_size=256M
log_buffer=30M
(可选参数)
ddl_lock_timeout = 10
sec_case_sensitive_logon=false
sec_return_server_release_banner=true
use_large_pages = false
filesystemio_options=SETALL --在ext4下有BUG,不能设,仅当数据文件在本地文件系统时才设置。
ASM实例参数:
memory_target = 1g (至少是1g)
alter system set archive_lag_target=3600 scope=both;
alter system set audit_trail = none scope=spfile;
#alter system set control_file_record_keep_time = 90 scope=both;
#alter system set db_files=5000 scope=both;
alter system set deferred_segment_creation=false scope=both;
alter system set enable_ddl_logging=true scope=both;
alter system set fast_start_mttr_target=300 scope=both;
alter system set open_cussors=1000 scope=both;
alter system set open_links=50 scope=both;
#alter system set processes=2000 scope=both;
alter system set remote_login_passwordfile = none scope=spfile;
#alter system set sessions=2200 scope=both;
alter system set undo_retention=300 scope=both;
alter system set sec_max_failed_login_attempts=30 scope=both;
alter system set parallel_max_servers=30 scope=both;
[base]
name=rhel6-base
baseurl=file:///os
enabled=1
gpgcheck=0
[Server]
name=rhel6-Server
baseurl=file:///os/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=rhel6-HighAvailability
baseurl=file:///os/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=rhel6-LoadBalancer
baseurl=file:///os/LoadBalancer
enabled=1
gpgcheck=0
[ResilientStorage]
name=rhel6-ResilientStorage
baseurl=file:///os/ResilientStorage
enabled=1
gpgcheck=0
[ScalableFileSystem]
name=rhel6-ScalableFileSystem
baseurl=file:///os/ScalableFileSystem
enabled=1
gpgcheck=0
===安装软件oracle所需===
echo 'multilib_policy=all' >> /etc/yum.conf ==安装32位和64位===
yum install -y binutils
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y elfutils-libelf-devel-static
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc
yum install -y glibc-common
yum install -y glibc-devel
yum install -y glibc-headers
yum install -y kernel-headers
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libgcc
yum install -y libgomp
yum install -y libstdc
yum install -y libstdc++-devel
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
===
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y nfs-utils
yum install -y net-tools
yum install -y smartmontools
yum install -y sysstat
====
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)
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)
libxcb-1.9-5.el7 (i686)
libxcb-1.9-5.el7 (x86_64)
libX11-1.6.0-2.1.el7 (i686)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (i686)
libXau-1.0.8-2.1.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)
net-tools-2.0-0.17.20131004git.el7 (x86_64) (for Oracle RAC and Oracle Clusterware)
nfs-utils-1.3.0-0.21.el7.x86_64 (for Oracle ACFS)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-1.el7 (x86_64)
规划:
1、IP规划
127.0.0.1 localhost.localdomain localhost
119.23.147.63 shardcat
119.23.134.20 shardnode1
119.23.134.28 shardnode2
2、磁盘规划
+CRS 三个10G的盘
+DGDATA 4个200G的盘
+ARCH 1个200G
1、创建用户和组
/usr/sbin/groupadd -g 1001 oinstall
/usr/sbin/groupadd -g 1002 dba
/usr/sbin/groupadd -g 1003 oper
/usr/sbin/useradd -u 1001 -g oinstall -G dba,oper -m oracle
echo nihao123, |passwd --stdin oracle
2、创建文件夹
mkdir -p /oracle/app/
chown -R oracle:oinstall /oracle/app/
chmod -R 775 /oracle/app/
mkdir -p /oracle/app/oraInventory
chown -R oracle:oinstall /oracle/app/oraInventory
chmod -R 775 /oracle/app/oraInventory
mkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle/app/oracle
3、编辑.bash_profile
#for grid
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=/oracle/app/grid/product/11.2.0/grid
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export THREADS_FLAG=native
export PATH=$ORACLE_HOME/bin:$PATH
export THREADS_FLAG=native
export PATH=$ORACLE_HOME/bin:$PATH
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
#for oracle
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle/app/oracle
export DB_HOME=$ORACLE_BASE/product/11.2.0/db_1
export GSM_HOME=$ORACLE_BASE/product/11.2.0/gsm
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=shardcat
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
alias gsm_env='. /home/oracle/gsm_env'
alias db_env='. /home/oracle/db_env'
==
gsm_env
export ORACLE_HOME=$GSM_HOME
export PATH=$ORACLE_HOME/bin
db_env
export ORACLE_HOME=$DB_HOME
export PATH=$ORACLE_HOME/bin
4、修改系统参数
vi /etc/security/limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 10240
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
=========================
vi /etc/pam.d/login
# oracle
session required /lib64/security/pam_limits.so
================================================
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.panic_on_oops = 1
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
==============================================
设置vnc
yum install -y tigervnc-server
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service
vi /etc/systemd/system/vncserver@:3.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l oracle -c "/usr/bin/vncserver %i -geometry 1024x768"
PIDFile=/home/oracle/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
==
[root@shardnode1 ~]# systemctl daemon-reload
[root@shardnode1 ~]# systemctl start vncserver@:3.service
===============================================================
unix平台
Oracle11g 参数(必选参数)
archive_lag_target=3600
audit_trail = none
control_file_record_keep_time = 90
db_files=5000
deferred_segment_creation=false
enable_ddl_logging=true
fast_start_mttr_target=300
open_cussors=1000
open_links=50
processes=2000
remote_login_passwordfile = none
sessions=2200
undo_retention=300
sec_max_failed_login_attempts=30
parallel_max_servers=30
(可调内存参数)
memory_max_target=0
memory_target=0
pga_aggregate_target=800M
sga_target=5G
shared_pool_size=1G
db_cache_size=3G
large_pool_size=256M
java_pool_size=256M
stream_pool_size=256M
log_buffer=30M
(可选参数)
ddl_lock_timeout = 10
sec_case_sensitive_logon=false
sec_return_server_release_banner=true
use_large_pages = false
filesystemio_options=SETALL --在ext4下有BUG,不能设,仅当数据文件在本地文件系统时才设置。
ASM实例参数:
memory_target = 1g (至少是1g)
alter system set archive_lag_target=3600 scope=both;
alter system set audit_trail = none scope=spfile;
#alter system set control_file_record_keep_time = 90 scope=both;
#alter system set db_files=5000 scope=both;
alter system set deferred_segment_creation=false scope=both;
alter system set enable_ddl_logging=true scope=both;
alter system set fast_start_mttr_target=300 scope=both;
alter system set open_cussors=1000 scope=both;
alter system set open_links=50 scope=both;
#alter system set processes=2000 scope=both;
alter system set remote_login_passwordfile = none scope=spfile;
#alter system set sessions=2200 scope=both;
alter system set undo_retention=300 scope=both;
alter system set sec_max_failed_login_attempts=30 scope=both;
alter system set parallel_max_servers=30 scope=both;
参数
文件
规划
系统
三个
下有
内存
实例
平台
数据
文件夹
用户
磁盘
软件
可调
配置
单机
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
筑牢网络安全主阵地
清除mysql库数据库
学校网络安全宣传语
微软服务器收入
保证财务网络安全
陕西量化积分管理软件开发系统
青岛华我网络技术有限公司
数据库大全网站
数据库所研究的数据具有
工商秘密服务器坏了怎么办
软件开发中有 哪些工作岗位
国产工业软件开发
养老院个人健康指标数据库
网络安全培养项目
报表软件开发平台
徐州通用软件开发价格优惠
澳新成都分部软件开发
信息网络安全杂志封面
ftp服务器租金
网络安全进社区新闻简报
ping不通服务器ip
惠普gen10服务器怎么进
邮箱服务器要加密吗
吉林正宗服务器机柜
开黑吧服务器
青岛华我网络技术有限公司
江苏跨贸网络技术
比较两数据库字段plsql
点击华为账号显示无法连接服务器
网络安全进社区新闻简报