archlinux 安装oracle database 10g xe

安装Oracle-XE数据库
ArchLinux 686的安装步骤

通过AUR安装libaio
在AUR网站上下载oracle-xe的tarball包,解压后生成oracle-xe子目录,将从oracle下载下来的rpm包放入该目录
在oracle-xe子目录下运行makepkg,将生成一个pkg.tar.xz的文件
运行sudo pacman -U oracle-xe-.....pkg.tar.xz(在此输入文件名全称),
在/etc/profile 中配置oracle环境变量   export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
执行/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/oraconfig.sh。
再输入口令等,可等待安装完成。
登录http://localhost:8080/apex
BUG修订
如果在makepkg的过程出现chmod 755错误提示,请删除PKGBUILD文件中chmod 6755 .... 那一行即可。
oracle-xe安装完成后如果JDBC不能连接请修改listener.ora nano -w /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora

原listener.ora # listener.ora Network Configuration File:

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc) (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server) (PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))

)

)

DEFAULT_SERVICE_LISTENER = (XE)

修改后 # listener.ora Network Configuration File:

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc) (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server) (PROGRAM = extproc)

)

(SID_DESC =

(GLOBAL_DBNAME = XE) (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server) (SID_NAME = XE)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

)

)

DEFAULT_SERVICE_LISTENER = (XE)
修改后重新启动数据库
原因是jdbc:oracle:thin:@192.168.0.80:1521:XE时找的是sid为XE,而不是services_name,oracle-xe默认的services_name为XE,但并没有设置SID

你可能感兴趣的:(oracle,jdbc)