1.建立oracle用户和组:
- #groupadd oinstall
- #useradd -g oinstall oracle
- #passwd oracle
2.建立一个Oracle 基本目录
- #mkdir –p /usr/local/oracle/product/11.2.0/db_1
- #chown –R oracle:oinstall /usr/local/oracle/product/11.2.0/db_1
- #chmod –R 755 /usr/local/oracle/product/11.2.0/db_1
- #mkdir –p /usr/local/oracle/oraInventory
- #chown –R oracle:oinstall /usr/local/oracle/oraInventory
- #chmod –R 755 /usr/local/oracle/oraInventory
3.配置oracle用户参数文件.bash_profile,增加
export ORACLE_BASE=/usr/local/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export SQLPATH=/usr/local/oracle
export TNS_ADMIN=/usr/local/oracle
export NLS_LANG=‘‘american_america.ZHS16GBK‘‘
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME:$ORACLE_HOME/bin
4.将安装软件ftp到$ORACLE_BASE下unzip生成client
#unzip p10404530_112030_Linux-x86-64_4of7.zip
5.修改client的权限
- #chown –R oracle:oinstall /usr/local/oracle/client
- #chmod –R 755 /usr/local/oracle/client
6.安装
$cd client
$./runInstaller
7.配置tnsnames.ora,路径$TNS_ADMIN
$netca
8.检查
$tnsping 数据库连接符
$sqlplus 用户名/密码@数据库连接符
时间: 2024-10-16 10:49:50