yum install binutils compat-libstdc++-33 compat-libstdc++-33.i686 \ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 \ glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio \ libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ \ libstdc++.i686 libstdc++-devel make sysstat unixODBC unixODBC-devel
groupadd dba oinstall useradd -g oinstall -m oracle
export ORACLE_BASE=/opt/oracle/app #oracle數據庫安裝目錄 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_home1 #oracle數據庫路徑 export ORACLE_SID=orcl #oracle啓動數據庫實例名 export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #添加系統環境變量 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系統環境變量 #export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8" #設置Oracle客戶端中文utf8 export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #設置Oracle客戶端中文gbk
source ~/.bashrc
mkdir /opt/oracle/app/product/11.2.0/db_home1 -p chown oracle.oinstall /opt/oracle -R
fs.file-max = 6815744 fs.aio-max-nr =1048576 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 kernel.sem = 250 32000 100 128
sysctl -p
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
mkdir /usr/share/fonts/zh_CN/TureType/ -p mv zydong.ttf /usr/share/fonts/zh_CN/TrueType/ fc-cache -fv
unzip linux.x64_11gR2_database_1of2.zip -d /home/oracle/ unzip linux.x64_11gR2_database_2of2.zip -d /home/oracle/ chown oracle.oinstall /home/oracle/database/ -R
su - oracle cd database ./runInstaller
- Oracle軟件安裝完後,執行 netca 命令配置監聽器linux
netca
dbca
lsnrctl stop lsnrctl start
sqlplus /nolog SQL> connect / as sysdba; SQL> shutdown SQL> startup #執行其它SQL語句測試數據庫