Oracle 11g安裝包
下載鏈接:https://pan.baidu.com/s/1sD_tR74PiVE4wF7T-ijouQ
提取碼:me6k
創建組和用戶
groupadd oinstall
groupadd dba
useradd -g oinstall -g dba -m oracle
passwd oracle
創建安裝目錄
mkdir /home/oracle/database
chown -R oracle:oinstall /home/oracle/database
chmod -R 775 /home/oracle/database
修改內核參數vi /etc/sysctl.conf
添加
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048576
立即生效
sysctl -p
修改limits.conf文件vi /etc/security/limits.conf
添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
修改/etc/pam.d/login 文件vi /etc/pam.d/login
添加
session required /lib64/security/pam_limits.so
session required pam_limits.so
修改/etc/profile文件vi /etc/profile
,添加
if [ $USER = "oracle" ];then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
配置oracle用戶的環境變量vi ~oracle/.bash_profile
添加
export ORACLE_BASE=/home/oracle/database
export PATH=/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin:$PATH
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
添加完執行
source .bash_profile
安裝依賴包
yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf \
elfutils-libelf-devel elfutils-libelf-devel-static 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 pdksh compat-libcap1 oracleasm-support readline readline-devel \
ld-linux.so.2 libXp.so.6 libXt.so.6 libXtst.so.6 compat-db
通過xftp將安裝包上傳至服務器,通過xstart進行Oracle11g可視化安裝。
安裝界面中文顯示:
zysong.ttf字體
下載鏈接:https://pan.baidu.com/s/1yp6ifjRQBj7KZuviA4k7PA
提取碼:clow
mkdir -p /usr/share/fonts/zh_CN/TrueType
mv zysong.ttf /usr/share/fonts/zh_CN/TrueType
chmod -R 755 zysong.ttf
echo $LANG zh_CN.UTF-8
su oracle
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
export DISPLAY=ip:0.0 (IP爲遠程訪問Linux服務器的本地IP)
cd /home/oracle/database
./runInstaller
如果出現pdksh沒有安裝;通過wget命令直接下載pdksh的rpm包,例如下載到/tmp文件夾下:
wget -O /tmp/pdksh-5.2.14-37.el5_8.1.x86_64.rpm http://vault.centos.org/5.11/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm
下載完成後,進入/tmp,執行
rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm
啓動監聽lsnrctl start
查看監聽狀態lsnrctl status
ORA-01034: ORACLE not available問題處理
sqlplus /nolog
conn /as sysdba
startup pfile='/home/oracle/app/oracle/admin/orcl/pfile/init.ora.211202013126'