centos7.4如何测试安装oracle成功(安装前配置环境脚本)

#将下面文字保存io.sh脚本文件,选择unix编码格式保存脚本和oracle压缩包传入linux, linux进入io.sh 所在目录,下面我们就来聊聊关于centos7.4如何测试安装oracle成功?接下来我们就一起去了解一下吧!

centos7.4如何测试安装oracle成功(安装前配置环境脚本)

centos7.4如何测试安装oracle成功

#将下面文字保存io.sh脚本文件,选择unix编码格式保存。脚本和oracle压缩包传入linux, linux进入io.sh 所在目录。

##chmod x io.sh 赋予执行权限, ./io.sh 运行脚本。更多内容看视频。

linux-centos7.5,xshell脚本安装oracle11g全程

setenforce 0 #临时关闭selinux

systemctl stop firewalld.service #关闭firewalld

yum -y install iptables-services #安装iptables

systemctl restart iptables.service

systemctl enable iptables.service

#安装依赖

yum -y install binutils compat compat-libstdc gcc gcc-c glibc glibc-devel ksh libaio libaio-devel libgcc libstdc libstdc -devel libXi libXtst make sysstat unixODBC unixODBC-devel unzip net-tools telnet

#chmod x

#、创建用户

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba -m oracle

#passwd oracle

#、创建安装目录,解压文件

mkdir -p /ora/oracle

chown -R oracle:oinstall /ora

chmod 755 -R /ora

unzip -d /ora/ /home/io/linux.x64_11gR2_database_1of2.zip

unzip -d /ora/ /home/io/linux.x64_11gR2_database_2of2.zip

#修改内核

echo 'fs.aio-max-nr = 1048576' >>/etc/sysctl.conf

echo 'fs.file-max = 6815744' >>/etc/sysctl.conf

echo 'kernel.shmall = 2097152' >>/etc/sysctl.conf

echo 'kernel.shmmax = 4294967295' >>/etc/sysctl.conf

echo 'kernel.shmmni = 4096' >>/etc/sysctl.conf

echo 'kernel.sem = 250 32000 100 128' >>/etc/sysctl.conf

echo 'net.ipv4.ip_local_port_range = 9000 65500' >>/etc/sysctl.conf

echo 'net.core.rmem_default = 262144' >>/etc/sysctl.conf

echo 'net.core.rmem_max = 4194304' >>/etc/sysctl.conf

echo 'net.core.wmem_default = 262144' >>/etc/sysctl.conf

echo 'net.core.wmem_max = 1048576' >>/etc/sysctl.conf

#修改认证模块

echo 'oracle soft nproc 131072' >>/etc/security/limits.conf

echo 'oracle hard nproc 131072' >>/etc/security/limits.conf

echo 'oracle soft nofile 131072' >>/etc/security/limits.conf

echo 'oracle hard nofile 131072' >>/etc/security/limits.conf

echo 'oracle soft core unlimited' >>/etc/security/limits.conf

echo 'oracle hard core unlimited' >>/etc/security/limits.conf

echo 'oracle soft memlock 50000000' >>/etc/security/limits.conf

echo 'oracle hard memlock 50000000' >>/etc/security/limits.conf

#修改Oracle用户环境变量,或者改.bash_profile

echo 'export PATH' >>/home/oracle/.bashrc

echo 'export ORACLE_BASE=/ora/oracle' >>/home/oracle/.bashrc

echo 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1' >>/home/oracle/.bashrc

echo 'export ORACLE_SID=orcl' >>/home/oracle/.bashrc

echo 'export ORACLE_UNQNAME=orcl' >>/home/oracle/.bashrc

echo 'export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH' >>/home/oracle/.bashrc

echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib' >>/home/oracle/.bashrc

echo 'export LANG=C' >>/home/oracle/.bashrc

echo 'export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK' >>/home/oracle/.bashrc

#环境变量生效

sysctl -p

source /home/oracle/.bashrc

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页