腾讯视频/爱奇艺/优酷/外卖 充值4折起
1、准备好所需要的安装包
oracle-instantclient-basic-10.2.0.5-1.i386.rpm
oracle-instantclient-devel-10.2.0.5-1.i386.rpm
oracle-instantclient-jdbc-10.2.0.5-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm
先安装oracle-instantclient-basic-10.2.0.5-1.i386.rpm,其他依次安装
2、创建用户、组和目录
[root@wxcs-2 oracle]# groupadd oinstall
[root@wxcs-2 oracle]# groupadd dba
[root@wxcs-2 oracle]# useradd -g oinstall -g dba oracle
[root@wxcs-2 oracle]# passwd oracle
changing password for user oracle.
new unix password:
bad password: it is based on a dictionary word
retype new unix password:
passwd: all authentication tokens updated successfully.
[root@wxcs-2 oracle]# mkdir -p /home/oracle/network/admin
[root@wxcs-2 oracle]# chown -r oracle:oinstall /home/oracle
[root@wxcs-2 oracle]# chmod -r 755 /home/oracle
3、将oracle服务器上面的tnsnames.ora拷贝出来,放到/home/oracle/network/admin目录下面。
4、修改环境变量
[oracle@wxcs-2 ~]$ vi .bash_profile
export oracle_home=/home/oracle
export sqlpath=/home/oracle/network/admin
export tns_admin=/home/oracle/network/admin
export nls_lang="simplified chinese_china.zhs16gbk"
export ld_library_path=/usr/lib/oracle/10.2.0.5/client/lib/:/usr/lib/oracle/10.2.0.5/client/lib:$ld_library_pa
th
export path=$path:$oracle_home:$ld_library_path
[oracle@wxcs-2 ~]$ source .bash_profile 环境变量立即生效
5、可以正常连接oracle服务器了