Ubuntu Linux安装Oracle数据库XE服务器
时间:2020-01-09 10:40:20 来源:igfitidea点击:
问题:如何在Ubuntu Linux桌面系统上安装Oracle Database XE Server?
解决方法:
Oracle数据库包含由Oracle数据库管理系统管理的一组数据。
您可以下载用于Debian,Mandriva,Novell,Red Hat和Ubuntu Linux发行版的Oracle Database XE服务器。
首先,您需要启动并运行数据库才能使用Oracle。
由于难以在Linux系统上安装,因此Oracle数据库在新Linux用户中享有盛誉。
现在,Oracle Corporation已为几种流行的Linux发行版打包了最新版本,以最大程度地减少安装挑战,从而将安装数据库服务器所需的技术知识降至最低。
确保您有足够的磁盘空间和内存
如果内存不足1GB,请运行以下命令来创建交换空间:
$ sudo dd if=/dev/zero of=/swpfs1 bs=1M count=1000 $ sudo mkswap /swpfs1 $ sudo swapon /swpfs1
Debian/Ubuntu Oracle安装
首先修改/etc/apt/sources.list文件:
$ sudo vi /etc/apt/sources.list
追加以下行:
deb http://oss.oracle.com/debian unstable main non-free
保存并关闭文件。
下一个导入GPG密钥:
$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add
更新软件包数据库:
$ sudo apt-get update
最后安装Oracle:
$ sudo apt-get install oracle-xe
输出:
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-2.6.20-15-generic linux-headers-2.6.20-15 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libaio The following NEW packages will be installed: libaio oracle-xe 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. Need to get 221MB/221MB of archives. After unpacking 405MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://oss.oracle.com unstable/non-free oracle-xe 10.2.0.1-1.1 [221MB] .... ....
安装后配置
您必须配置Oracle TCP/IP端口和其他参数。
只需执行以下命令:
$ sudo /etc/init.d/oracle-xe configure
输出:
Oracle Database 10g Express Edition Configuration ------------------------------------------------ This will configure on-boot properties of Oracle Database 10g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press to accept the defaults. Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express [8080]: [Enter key] Specify a port that will be used for the database listener [1521]:[Enter key] Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration:secret Confirm the password:secret Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y Starting Oracle Net Listener...Done Configuring Database...Done Starting Oracle Database 10g Express Edition Instance...Done Installation Completed Successfully. To access the Database Home Page go to "http://127.0.0.1:8080/apex"
要访问数据库主页,请访问http://127.0.0.1:8080/apex。
打开Web浏览器并执行url(您需要先使用用户名系统和密码设置)