当前位置:网站首页>安装Oracle数据库
安装Oracle数据库
2022-06-11 05:38:00 【zhmhbest】
安装Oracle数据库
准备工作
检查系统
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
df -h
uname -m
关闭SeLinux和防火墙
sed -i '/SELINUX/s/enforcing/disabled/' '/etc/selinux/config'
more '/etc/selinux/config'
systemctl stop firewalld.service
systemctl disable firewalld.service
安装依赖

# 查看缺少的包
rpm --query bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat elfutils-libelf elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel | grep -e ^package
# CentOS7最小化安装缺失
yum install -y bc compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc-devel ksh libaio libaio-devel libstdc++-devel sysstat elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel
系统限制

sysctl
vi /etc/sysctl.conf
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 16451328
kernel.shmmax = 33692319744
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
limits
vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
立即加载配置:ulimit -a
开始安装
创建用户
groupadd oinstall
groupadd dba
groupadd asmdba
groupadd backupdba
groupadd dgdba
groupadd kmdba
groupadd racdba
groupadd oper
useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper -m oracle
# passwd oracle
# A189C633D9995E11BF8607170EC9A4B8
echo "A189C633D9995E11BF8607170EC9A4B8" | passwd --stdin oracle
vi /etc/sudoers
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
oracle ALL=(ALL) ALL
Export
vi /home/oracle/.bash_profile
# .bash_profile内容
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PATH=$ORACLE_HOME/bin:/usr/sbin:/usr/local/bin:$PATH
export LANG=en_US
export DISPLAY=:0.0
# source /home/oracle/.bash_profile
mkdir -p /u01
chown -R oracle:oinstall /u01
chmod -R 775 /u01
X11
yum -y install xorg-x11-server-utils xdpyinfo
xhost +
su - oracle
export DISPLAY=192.168.19.90:0.0
export LANG="en_US"
xdpyinfo
Installer
sudo mkdir /home/temp
sudo chown oracle /home/temp
cd /home/temp
# 上传安装文件
# unzip ...
sudo chown oracle:oinstall -R database
./database/runInstaller
- Installation option
- Create and Config a database
- Install database software only
- Upgrade an existing database
- System class
- Desktop class
- Server class
- type of database
- Single instance database installation
- Oracle Real Application Cluster database installation
- Oracle RAC One Node database installation
- Installation type
- Typical install
- Advanced install
- English
- Enterprise Edition
- Location
- Oracle base:
/u01/app/oracle - Software location:
/u01/app/oracle/product/12.1.0/dbhome_1
- Oracle base:
- Inventory
- Inventory Directory:
/u01/app/oraInventory - Group Name:
oinstall
- Inventory Directory:
- Configuration type
- General purpose / Transaction Processing
- Data warehousing
- Database Identifiers
- Global database name:
orcl.localdomain - SID:
orcl
- Global database name:
- Scheme Passwords
- Use different passwords for these accounts
- Use the same passwords for all accounts
启动Oracle服务
su - oracle
# A189C633D9995E11BF8607170EC9A4B8
# 打开监听服务
lsnrctl status
lsnrctl start
# lsnrctl stop
# 启动实例
sqlplus /nolog
SQL>connect /as sysdba
SQL>startup
# shutdown
SQL>quit
边栏推荐
- JVM tuning V: JVM tuning tools and tuning practice
- 2021-04-19
- (15) Infrared communication
- NDK learning notes (IX) POSIX sockect connection oriented communication
- 项目-智慧城市
- NDK learning notes (II)
- Tencent X5 kernel initialization failed tbsreaderview not support by:***
- [project - what are the supporting materials in the annexes? (18 kinds of 2000 word summary)] project plan of innovation and entrepreneurship competition and supporting materials of Challenge Cup entr
- If the MAC fails to connect with MySQL, it will start and report an error
- [opencv learning problems] 1 Namedwindow() and imshow() show two windows in the picture
猜你喜欢

20多种云协作功能,3分钟聊透企业的数据安全经

Recommend a free intranet penetration open source software that can be used in the local wechat official account under test

NDK R21 compiles ffmpeg 4.2.2+x264 and converts video files using ffmpeg

NDK learning notes (IX) POSIX sockect connection oriented communication

How much current can PCB wiring carry

PCB走线到底能承载多大电流

智能门锁为什么会这么火,米家和智汀的智能门锁怎么样呢?

SQLite installation and configuration tutorial +navicat operation

NDK learning notes (XI) POSIX sockect local communication

Basics of customized view
随机推荐
微信小程序,购买商品属性自动换行,固定div个数,超出部分自动换行
QT Road (1) -- Introduction to pro file
SwiftUI: Navigation all know
【深入kotlin】 - 初识 Flow
Adapter the problem of executing only one animation in multiple frames
Feynman learning method
Section III: structural characteristics of cement concrete pavement
Recommend a free intranet penetration open source software that can be used in the local wechat official account under test
NDK learning notes (VI) Basics: memory management, standard file i/o
PCB走线到底能承载多大电流
Handle double quotation mark escape in JSON string
Preliminary understanding of multi task learning
自定义View之基础篇
Section IV: composition and materials of asphalt mixture (2) -- main materials of asphalt
English digital converter
Concurrent search set
Slide the receleview horizontally to the far right to listen to the page loading function
Intercept file extension
ELK日志系统实战(六):技术选型之vector与filebeat对比
35.搜索插入位置