主要参考网址

http://www.fuzzy.cz/en/articles/installing-oracle-11g-r2-on-gentoo
emerge pdksh
emerge libaio
#创建/usr/lib/libstdc++.so.6 -> /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libstdc++.so.6
sudo ln -s `gcc-config -L`/libstdc++.so.6 /usr/lib/libstdc++.so.6

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
passwd oracle

cat >>/etc/sysctl.conf <<EOF
#kernel.shmall = 2097152
kernel.shmmax = 536870912
#kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
EOF
/sbin/sysctl -p


cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

#修改 bash 和 ksh 的默认配置文件以及 cshell 的默认登录脚本。

cat >> /etc/profile <<EOF
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
EOF

cat >> /etc/csh.login <<EOF
if ( /$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF

# 这一句话要在安装过程中出现一个错误后,运行下面这句话,然后retry
echo "-ldl -lm -lpthread -lnsl -lirc -lipgo -lrt" >/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/sysliblist

这个错误解决后,我又出现了一个错误,没解决,不过不影响学习用,基本功能都在

cat >>/etc/env.d/99oracle <<EOF
ORACLE_SID=orcl
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
ORACLE_HOME_LISTNER=/home/oracle/app/oracle/product/11.2.0/dbhome_1
ORA_CRS_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/crs
ORA_OWNR=oracle
ORACLE_OWNER=oracle
LD_LIBRARY_PATH=/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib:/lib:/usr/lib
NLS_LANG='AMERICAN_AMERICA.UTF8'

#LC_CTYPE=en_US.UTF-8
#LANG=en_US
EOF



export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin

#启动oracle 的过程
#su - oracle
#sqlplus /nolog
#connect /as sysdba
#startup

#exit
#lsnrctl start

Logo

更多推荐