oracle安装环境一键部署脚本
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,OS:centos5.9 32位数据库:oracle 10g 32位在依赖的软件包全部安装完成之后,执行完此脚本可以直接安装oracle#!/bin/bashecho ##### install r
千家信息网最后更新 2026年11月03日oracle安装环境一键部署脚本
OS:centos5.9 32位
数据库:oracle 10g 32位
在依赖的软件包全部安装完成之后,执行完此脚本可以直接安装oracle
#!/bin/bashecho ##### install rlwrap tools #####wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gztar -zxvf rlwrap-0.37.tar.gz cd rlwrap-0.37./configure make make installcd echo ##### easy oracle10g install script ######## add user and group#groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle# create directory for install oracle mkdir -p /oraclemkdir -p /oracle/product/10.2.0/db_1 chown -R oracle:oinstall /oraclechmod -R 775 /oracle# edit entironment path for oracle#echo "#####">> /home/oracle/.bash_profileecho "#####">> /home/oracle/.bash_profileecho "#####">> /home/oracle/.bash_profileecho "#for oracle install" >>/home/oracle/.bash_profile echo "PATH=\$PATH:$HOME/bin" >>/home/oracle/.bash_profile echo "export PATH" >>/home/oracle/.bash_profile echo "PATH=\$PATH:$HOME/bin" >>/home/oracle/.bash_profile echo "export ORACLE_SID=heliang" >>/home/oracle/.bash_profile echo "export ORACLE_BASE=/oracle" >>/home/oracle/.bash_profile echo "export ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1" >>/home/oracle/.bash_profile echo "export LD_LIBRARY_PATH=\$ORACLE_HOME/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin" >>/home/oracle/.bash_profile echo "PATH=\$PATH:\$ORACLE_HOME/bin" >>/home/oracle/.bash_profile echo "export PATH" >>/home/oracle/.bash_profile echo "umask 022" >>/home/oracle/.bash_profile echo "alias sqlplus='rlwrap sqlplus'" >>/home/oracle/.bash_profile echo "alias rman='rlwrap rman'" >> /home/oracle/.bash_profileecho "#####">> /home/oracle/.bash_profileecho "#####">> /home/oracle/.bash_profileecho "#####">> /home/oracle/.bash_profilesource /home/oracle/.bash_profile# edit kernel parameter#echo "#####">> /etc/sysctl.confecho "#####">> /etc/sysctl.confecho "#####">> /etc/sysctl.confecho "#for oracle install" >> /etc/sysctl.conf 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 = 536870912" >> /etc/sysctl.conf echo "kernel.shmmni = 4096" >> /etc/sysctl.conf echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.confecho "net.ipv4.ip_local_port_range = 1024 65500" >> /etc/sysctl.confecho "net.core.rmem_default = 262144" >> /etc/sysctl.confecho "net.core.rmem_max = 4194304 " >> /etc/sysctl.confecho "net.core.wmem_default = 262144" >> /etc/sysctl.confecho "net.core.wmem_max = 1048586" >> /etc/sysctl.confecho "#####">> /etc/sysctl.confecho "#####">> /etc/sysctl.confecho "#####">> /etc/sysctl.conf # edit user resource limits#echo "#####">> /etc/security/limits.confecho "#####">> /etc/security/limits.confecho "#####">> /etc/security/limits.confecho "#for resource limits">>/etc/security/limits.confecho "oracle soft nofile 1024" >> /etc/security/limits.conf echo "oracle hard nofile 65536" >> /etc/security/limits.conf echo "oracle soft nproc 2047" >> /etc/security/limits.conf echo "oracle hard nproc 16384" >> /etc/security/limits.conf echo "#####">> /etc/security/limits.confecho "#####">> /etc/security/limits.confecho "#####">> /etc/security/limits.conf# edit user Authentication#echo "#####">> /etc/pam.d/loginecho "#####">> /etc/pam.d/loginecho "#####">> /etc/pam.d/loginecho "#for oracle install Authentication" >> /etc/pam.d/login echo "session required /lib/security/pam_limits.so" >> /etc/pam.d/login echo "session required pam_limits.so" >> /etc/pam.d/login echo "#####">> /etc/pam.d/loginecho "#####">> /etc/pam.d/loginecho "#####">> /etc/pam.d/login# edit xxx file#echo "#####">>/etc/profileecho "#####">>/etc/profileecho "#####">>/etc/profileecho "#for oracle install" >>/etc/profileecho "if [ $USER = "oracle" ]; then" >>/etc/profileecho " if [ $SHELL = "/bin/ksh" ]; then" >>/etc/profileecho " ulimit -p 16384" >>/etc/profileecho " ulimit -n 65536" >>/etc/profileecho " else" >>/etc/profileecho " ulimit -u 16384 -n 65536" >>/etc/profileecho " fi" >>/etc/profileecho "fi" >>/etc/profileecho "#####">>/etc/profileecho "#####">>/etc/profileecho "#####">>/etc/profilecat /dev/null>/etc/redhat-releaseecho "redhat-4">>/etc/redhat-release/sbin/sysctl -psu - oracle
如果出现报错Checking Network Configuration requirements ..
需要编辑/etc/hosts文件,添加IP和主机名,然后重启网络服务。
[root@db ~]# cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost::1 localhost6.localdomain6 localhost6192.168.150.8 db[root@db ~]#
脚本
主机
数据
数据库
文件
网络
网络服务
软件
软件包
服务
环境
一键
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
南京欣网互联网络科技有限公司
云信互联网科技有限公司
重庆互联网络科技
互联网 卓越科技
凡科互联网科技
汇久创客互联网科技
深圳艾佳互联网科技
互联网科技视频素材
互联网金融科技委员会
顺网科技2021年互联网排名
天速互联网络科技有限公司
广州恒生互联网科技有限
链环科技传统企业怎么转型互联网
中国互联网有什么科技
广州燕处互联网科技有限公司
吉林省码上互联网科技电话
唯美互联网科技
互联网科技职业技能培训学校
长沙易易互联网科技有限公司
互联网科技创新方面的资料
江苏根荣互联网科技
互联网科技有限公司经营范围
睿民互联网科技
左右互联网络科技
互联网科技创新企业排名
富国互联网金融科技混合基金
山东大美朱楼互联网科技有限公司
同城互联网络科技
互联网科技自媒体灵感
广州全民伙伴互联网科技有限公司