時(shí)間:2015-06-28 00:00:00 來(lái)源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評(píng)論(1)
#!/bin/bash
#增加安裝Oracle所需的用戶和組
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /home/oracle -m oracle
#創(chuàng)建安裝Oracle所需的目錄
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chmod -R 775 /u01
chown -R oracle:oinstall /u01
#改變Oracle參數(shù)
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=262144" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=262144" >> /etc/sysctl.conf
/sbin/sysctl -p
#設(shè)置Oracle環(huán)境變量
echo "ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile
echo "ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1" >> /home/oracle/.bash_profile
echo "ORACLE_SID=cmtest" >> /home/oracle/.bash_profile
echo "PATH=\$PATH:\$HOME/bin:\$ORACLE_HOME/bin" >> /home/oracle/.bash_profile
echo "LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/usr/lib" >> /home/oracle/.bash_profile
echo "export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH" >> /home/oracle/.bash_profile
source /home/oracle/.bash_profile
#設(shè)置Oracle用戶shell limit
echo "oracle soft nproc 2047" >> /etc/security/limits.conf
echo "oracle hard nproc 16384" >> /etc/security/limits.conf
echo "oracle soft nofile 1024" >> /etc/security/limits.conf
echo "oracle hard nofile 65536" >> /etc/security/limits.conf
#修改Linux版本號(hào)
cp /etc/redhat-release /etc/redhat-release.`date -I`.bak
echo "redhat-4" > /etc/redhat-release
#修改/etc/hosts文件
cp /etc/hosts /etc/hosts.`date -I`.bak
echo "# Do not remove the following line, or various programs" > /etc/hosts
echo "# that require network functionality will fail." >> /etc/hosts
echo "`ifconfig eth0 |grep "inet addr" |cut -d: -f2 |cut -d" " -f1`? `more /etc/sysconfig/network | grep HOSTNAME | cut -c10-`? localhost" >> /etc/hosts
echo "127.0.0.1 `more /etc/sysconfig/network | grep HOSTNAME | cut -c10-`" >> /etc/hosts
#yum安裝必要包
yum -y install setarch-2*? make-3*? glibc-2*? libaio-0*? compat-libstdc++-33-3*? compat-gcc-34-3*? compat-gcc-34-c++-3*? gcc-4*? libXp-1*? openmotif-2*? compat-db-4*
關(guān)鍵詞標(biāo)簽:oracle,數(shù)據(jù)庫(kù)
相關(guān)閱讀
熱門(mén)文章 Oracle中使用alter table來(lái)增加,刪除,修改列的語(yǔ)法 oracle中使用SQL語(yǔ)句修改字段類型-oracle修改SQL語(yǔ)句案例 誤刪Oracle數(shù)據(jù)庫(kù)實(shí)例的控制文件 為UNIX服務(wù)器設(shè)置Oracle全文檢索
人氣排行 oracle中使用SQL語(yǔ)句修改字段類型-oracle修改SQL語(yǔ)句案例 Oracle中使用alter table來(lái)增加,刪除,修改列的語(yǔ)法 ORACLE SQL 判斷字符串是否為數(shù)字的語(yǔ)句 ORACLE和SQL語(yǔ)法區(qū)別歸納(1) oracle grant 授權(quán)語(yǔ)句 ORACLE修改IP地址后如何能夠使用 如何加速Oracle大批量數(shù)據(jù)處理 Oracle刪除表的幾種方法