目录
echo 'X.X.X.X hostsname' >> /etc/hosts
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 60001 -g oinstall -G dba,oper -m oracle
#-g所属组 -G附加组 -m创建家目录
mkdir /oracle
mkdir -p /oracle/app/oracle/product/19.3.0/dbhome_1
mkdir -p /oracle/app/oraInventory
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
#确认光盘已经连接,然后开始挂载
mount /dev/cdrom /mnt/
# mount: /dev/sr0 is write-protected, mounting read-only
cd /etc/yum.repos.d/
rm -rf *
vim /etc/yum.repos.d/henry.repo
[henry]
name=henry_repo
baseurl=file:///mnt/
gpgcheck=0 #验证包是否来自官网,0是不检查
enabled=1 #本地源启用
yum repolist all
yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install unzip
yum install -y libXrender
yum install -y libXrender-devel
yum install -y nfs-utils
yum install -y smartmontools
yum install -y readline*
vim /etc/security/limits.conf #固定搭配,直接粘贴就可以了,需要配置大内存的选项
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 16384
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
#oracle hard memlock 134217728
#oracle soft memlock 134217728
#怎么算,拿大页数量*2048
#3000大页*2M=6000M
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 7730941133 #物理机内存8G 8*1024*1024*1024*0.9
kernel.shmall = 1887437 #kernel.shmall = kernel.shmmax / kernel.shmmni
kernel.shmmni = 4096 #kernel.shmmni默认是4k
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 = 1048586
kernel.panic_on_oops = 1
sysctl -p #执行参数
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
su - oracle
#编辑 .bash_profile
vim .bash_profile
#PS1="[`whoami`@`hostname`:"'$PWD]$'
#export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_UNQNAME=cdb19c
export ORACLE_SID=cdb19c
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
export THREADS_FLAG=native
umask=022
if [ $USER = "oracle" ]; then
if [ $ = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
alias sqlplus="rlwrap sqlplus" #设置翻页软件
chown -R oracle:oinstall /soft/
chmod -R 775 /soft/
su - oracle
echo $ORACLE_HOME #测试是否能打印环境变量/oracle/app/oracle/product/19.3.0/dbhome_1
cd $ORACLE_HOME
unzip -q /soft/07-LINUX.X64_193000_db_home.zip #不加-q是交互式安装
等我最近搭完环境更新
./runInstaller
目录
echo 'X.X.X.X hostsname' >> /etc/hosts
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 60001 -g oinstall -G dba,oper -m oracle
#-g所属组 -G附加组 -m创建家目录
mkdir /oracle
mkdir -p /oracle/app/oracle/product/19.3.0/dbhome_1
mkdir -p /oracle/app/oraInventory
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
#确认光盘已经连接,然后开始挂载
mount /dev/cdrom /mnt/
# mount: /dev/sr0 is write-protected, mounting read-only
cd /etc/yum.repos.d/
rm -rf *
vim /etc/yum.repos.d/henry.repo
[henry]
name=henry_repo
baseurl=file:///mnt/
gpgcheck=0 #验证包是否来自官网,0是不检查
enabled=1 #本地源启用
yum repolist all
yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install unzip
yum install -y libXrender
yum install -y libXrender-devel
yum install -y nfs-utils
yum install -y smartmontools
yum install -y readline*
vim /etc/security/limits.conf #固定搭配,直接粘贴就可以了,需要配置大内存的选项
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 16384
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
#oracle hard memlock 134217728
#oracle soft memlock 134217728
#怎么算,拿大页数量*2048
#3000大页*2M=6000M
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 7730941133 #物理机内存8G 8*1024*1024*1024*0.9
kernel.shmall = 1887437 #kernel.shmall = kernel.shmmax / kernel.shmmni
kernel.shmmni = 4096 #kernel.shmmni默认是4k
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 = 1048586
kernel.panic_on_oops = 1
sysctl -p #执行参数
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
su - oracle
#编辑 .bash_profile
vim .bash_profile
#PS1="[`whoami`@`hostname`:"'$PWD]$'
#export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_UNQNAME=cdb19c
export ORACLE_SID=cdb19c
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
export THREADS_FLAG=native
umask=022
if [ $USER = "oracle" ]; then
if [ $ = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
alias sqlplus="rlwrap sqlplus" #设置翻页软件
chown -R oracle:oinstall /soft/
chmod -R 775 /soft/
su - oracle
echo $ORACLE_HOME #测试是否能打印环境变量/oracle/app/oracle/product/19.3.0/dbhome_1
cd $ORACLE_HOME
unzip -q /soft/07-LINUX.X64_193000_db_home.zip #不加-q是交互式安装
等我最近搭完环境更新
./runInstaller
./netca
./dbca