请选择 进入手机版 | 继续访问电脑版

Linux中安装Oracle的环境配置涉及命令

[复制链接]
黎平 发表于 2020-12-31 20:25:47 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
整理Centos 8中安装Oracle12c(单机)的下令整理,情况设置好,启动runInstaller.sh,界面安装方式跟Windows一样
一、网络
设置网络
cat /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
BROADCAST=192.168.139.255
IPADDR=192.168.1.233
NETMASK=255.255.255.0
NETGETWAY=192.168.1.1
ONBOOT=yes

重启网络
centos 8: nmcli c reload
其它:service network restart
cat /etc/resolv.conf
search uucc.com
nameserver 192.168.1.1
去掉?
cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=db1.uucc.com
GATEWAY=192.168.1.1
vim /etc/hosts
192.168.1.233         db1.uucc.com db1
二、安装包
校验包
rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libxcb libXi make sysstat
安装包
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutilslibelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBCdevel*.i686 libXp
大概
rpm -ivh libaio-devel-0.3.106*
rpm -ivh libgomp-4.4.7*
rpm -ivh numactl-devel-0.9.8*
rpm -ivh sysstat-7.0.2*
rpm -ivh pdksh-5.2.14*
rpm -ivh unixODBC-libs-2.2.11*
rpm -ivh unixODBC-2.2.11*
rpm -ivh unixODBC-devel-2.2.11*
三、建组,用户,目次
groupadd oinstall  
groupadd dba 
useradd -g oinstall -G dba oracle   
passwd oracle 
mkdir -p /u01/app/oracle
mkdir -p /u01/tmp
mkdir -p /u01/setup
chown -R oracle:oinstall /u01
chmod -R 777 /u01 

四、内核设置
vim /etc/sysctl.conf
编辑内核
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 2097152
net.core.rmem_max = 4194304
net.core.wmem_default = 2097152
net.core.wmem_max = 4194304
生效:sysctl -p
五、空间扩容操作
swap扩容2G
查察:free -m
块文件:dd if=/dev/zero of=/tmp/swap bs=1M count=2048
格式化:mkswap -f /tmp/swap
开启:swapon /tmp/swap
关闭:swapoff /tmp/swap
开机启动  vim /etc/fstab
/tmp/swap          swap            swap    defaults        0 0
六、设置文件更改
vim /etc/security/limits.conf 
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vim /etc/pam.d/login
session required /lib/security/pam_limits.so
vim /etc/profile
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
vim /etc/csh.login
if ( $USER == "oracle" ) then
 limit maxproc 16384
 limit descriptors 65536
 umask 022
endif
vim /home/oracle/.bash_profile
umask 022
TMP=/u01/tmp
TMPDIR=/u01/tmp
export TMP TMPDIR
#export ORACLE_BASE=/u01/app/oracle
#export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
#export ORA_CRS_HOME=$ORACLE_BASE/crs
#export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
#export ORACLE_SID=orcl
#export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:${PATH}:$HOME/bin
#export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
#export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
#export ORACLE_TERM=xterm
#export TNS_AMDIN=$ORACLE_HOME/network/admin
#export ORA_NLS10=$ORACLE_HOME/nls/data
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/lib
#export LIBPATH=$LIBPATH:$ORA_CRS_HOME/lib:$ORACLE_HOME/lib
#export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/JRE
#export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#export LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/oracle 
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1 
export ORACLE_SID=orcl
export PATH=$HOME/bin:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

来源:https://blog.csdn.net/qq_30085577/article/details/111954242
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


专注素材教程免费分享
全国免费热线电话

18768367769

周一至周日9:00-23:00

反馈建议

27428564@qq.com 在线QQ咨询

扫描二维码关注我们

Powered by Discuz! X3.4© 2001-2013 Comsenz Inc.( 蜀ICP备2021001884号-1 )