代码拉取完成,页面将自动刷新
同步操作将从 jack2zhang/oracle_silent 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# install preinstall
wget -O /etc/yum.repos.d/oracle-ol7.repo http://public-yum.oracle.com/public-yum-ol7.repo
yum install oracle-rdbms-server-11gR2-preinstall -y
yum -y install xz wget gcc-c++ ncurses ncurses-devel \
cmake make perl openssl openssl-devel gcc* libxml2 \
libxml2-devel curl-devel libjpeg* libpng* freetype* \
make gcc-c++ cmake bison perl perl-devel perl perl-devel \
glibc-devel.i686 glibc-devel libaio readline-devel \
zlib.x86_64 zlib-devel.x86_64 libcurl-* net-tool* \
sysstat lrzsz dos2unix telnet.x86_64 iotop unzip \
ftp.x86_64 xfs* expect vim psmisc openssh-client* \
libaio bzip2 epel-release automake binutils bzip2 \
elfutils expat gawk gcc ksh less make openssh-server \
rpm sysstat unzip unzip cifs-utils libXext.x86_64 \
glibc.i686 binutils compat-libstdc++-33 \
elfutils-libelf elfutils-libelf-devel \
expat gcc gcc-c++ glibc glibc-common \
glibc-devel glibc-headers libaio \
libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat unixODBC unixODBC-devel libnsl
yum install -y gcc make binutils setarch compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 unixODBC unixODBC-devel libaio-devel sysstat compat-gcc-34 compat-gcc-34-c++ unzip libXext
#set /etc/hosts
#passwd oracle
mkdir -p /u01/oracle
mkdir -p /u01/oraInventory
groupdel oinstall
groupdel dba
groupadd -g 10000 oinstall
groupadd -g 10001 dba
useradd -u 10000 -g oinstall -G dba oracle
chown -R oracle:oinstall /u01/
chmod -R 755 /u01/
mkdir -p /u01/oracle
mkdir -p /u01/oracle/product/11.2.0/dbhome_1
mkdir -p /u01/oraInventory
mkdir -p /home/oracle/oraInventory
chown -R oracle:oinstall /home/oracle/oraInventory
chown -R oracle:oinstall /u01/oraInventory/
chown -R oracle:oinstall /u01/oracle
chown -R oracle:oinstall /tmp
#cat > /home/oracle/.bash_profile << EOF
#export ORACLE_BASE=/u01/oracle
#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
#export ORACLE_SID=orcl
#export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/bin
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
#export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
#export NLS_LANG=AMERICAN
#export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
#EOF
echo 'export ORACLE_BASE=/u01/oracle' > /home/oracle/.bashrc
echo 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1' >> /home/oracle/.bashrc
echo 'export ORACLE_SID=orcl' >> /home/oracle/.bashrc
echo 'export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/bin' >> /home/oracle/.bashrc
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib' >> /home/oracle/.bashrc
echo 'export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH' >> /home/oracle/.bashrc
#echo 'export NLS_LANG=AMERICAN' >> /home/oracle/.bashrc
echo 'export NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8"' >> /home/oracle/.bashrc
echo "export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'" >> /home/oracle/.bashrc
echo "export PATH" >> /home/oracle/.bashrc
source /home/oracle/.bashrc
dd if=/dev/zero of=/home/swapfile bs=1M count=512
/home/swapfile swap swap defaults 0 0
mkswap /home/swapfile
swapon /home/swapfile
echo "/home/swapfile swap swap defaults 0 0" >> /etc/fstab
cat > /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
EOF
cat > /etc/sysctl.conf << EOF
kernel.shmall = 2097152
#kernel.shmmax最低:536870912,最大值:比物理内存小1个字节的值,建议超过物理内存的一半
kernel.shmmax = 2147483648
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmmni = 4096
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 = 1048576
EOF
sysctl -p
cat > /etc/oraInst.loc << EOF
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/oraInventory
EOF
#unzip linux.x64_11gR2_database_1of2.zip -d /u01/oracle/
#unzip linux.x64_11gR2_database_2of2.zip -d /u01/oracle/
chown -R oracle:dba /u01/oracle
sed -i '/CV_ASSUME_DISTID/s/4/6/g' /u01/oracle/database/stage/cvu/cv/admin/cvu_config
#su - oracle
#cd /u01/oracle/database
#./runInstaller -silent -force -responseFile /home/oracle/db_install.rsp
#dbca -silent -responseFile /home/oracle/dbca.rsp
#netca -silent -responsefile /u01/oracle/database/response/netca.rsp
#cp oracle.init.d /etc/init.d/oracle
#chkconfig oracle on
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。