1、创建oracle用户用于安装oracle
2、安装如下的rpm包:
rpm -ivh mpfr-2.4.1-6.el6.i686.rpm
rpm -ivh ppl-0.10.2-11.el6.i686.rpm
rpm -ivh kernel-headers-2.6.32-696.el6.i686.rpm
rpm -U glibc-2.12-1.209.el6.i686.rpm glibc-common-2.12-1.209.el6.i686.rpm
rpm -ivh glibc-headers-2.12-1.209.el6.i686.rpm
rpm -ivh cpp-4.4.7-18.el6.i686.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.i686.rpm
rpm -ivh unixODBC-2.2.14-14.el6.i686.rpm
rpm -ivh unixODBC-devel-2.2.14-14.el6.i686.rpm
rpm -ivh glibc-devel-2.12-1.209.el6.i686.rpm
rpm -ivh elfutils-libelf-devel-0.164-2.el6.i686.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.i686.rpm
rpm -U libgcc-4.4.7-18.el6.i686.rpm
rpm -ivh libgomp-4.4.7-18.el6.i686.rpm
rpm -ivh gcc-4.4.7-18.el6.i686.rpm
rpm -U libstdc++-4.4.7-18.el6.i686.rpm
rpm -ivh libstdc++-devel-4.4.7-18.el6.i686.rpm
rpm -ivh gcc-c++-4.4.7-18.el6.i686.rpm
rpm -ivh ksh-20120801-33.el6.i686.rpm pdksh比较老,新的oracle实际山使用的是ksh,只需检查有没有安装ksh,pdksh忽略掉就可以了
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm
3、设置ORACLE_HOME
在oracle用户的~/.bash_profile文件中追加:
export ORACLE_BASE=/home/oacle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
4、关闭防火墙
5、在windows中就可以连接使用了
6、每次开机,需要开启oracle数据库的话请执行:
oracle登录系统
shell> sqlplus /nolog
SQL> connect /as sysdba
SQL> startup
SQL> exit
shell> lsnrctl start