`

Install Oracle XE in Debian

阅读更多

Steps

 

  • Change the file /etc/apt/sources.list and add the following line to it. The line describes the repository position for debian from oracle.

 

  deb http://oss.oracle.com/debian unstable main non-free

 

  • When I use the command mode to install the oracle-xe and oracle-xe-client, it says it will remove a lot of package. I don't know why.

aptitude install oracle-xe oracle-xe-client

 

Then I abort the procedures. And resort to the Synaptic  Package Manager . At last, in the GUI Package Manager I  installed the 2 packages successfully, oracle-xe and oracle- xe-client.

 

  • Then config the instance and database sys/system users.

/etc/init.d/oracle-xe configure

In this steps, you will need to specify the ports and pasword. The details for my installation are as follows,

Webconsole Http Port: 1158

Database Listener: 1521

Database Password: *******

 

  • At this point we must say, we have installed two programs. One is oracle server and another is oracle client. In the bin directory in their root path, they all have a sqlplus client to use. Actually, the one in server side connects the database with local protocol, it don't need the network(for OS user login, it login directly, for the other user, it login with /app/oracle/product/10.2.0/server/network/admin/tnsnames.ora ). So it has more rights. Then one in client need the file /etc/tnsnames.ora to connect to db. Oracle and Oracle client ships with a shell to set the environment. We can source them like this, 

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh

 

  • Firstly, we need setup some users. So I login with sqlplus in server site. Before doing this, make sure the oracle user(automatically added by installer) belongs to the dba group. Only the oracle can be used to login dba with OS user, root can't. (Because I login after I login with sys and password I specified during installation, I can't login, it says Invalide Username or password . So I need this step to specify password again)

 

su oracle

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/ server /bin/oracle_env.sh

sqlplus / as sysdba

alter user sys identified by *******

alter user system identified by *******

 

create user robert identifed by **********

default tablespace users

temporary tablespace temp

quota unlimited on users

 

grant create session,create table, create view, create procedure, create synonym to robert

 

  • Now the user sys/system/robert can be used to login database. You can use the command to login,

sqlplus sys/*******@xe as sysdba

sqlplus system/*******@xe

sqlplus robert/**********@xe

 

Until now, you are using the sqlplus from server site, you can login with OS user - oracle, you also can login with the sys/system users and your own user - robert.

 

  • Now we start to investigate how to login oracle with remote sqlplus - the on in client site.

 

  • Login web manager console, because oracle install the oracle server based on the loopback network adaptor, that is to say, you only can access web console by the loopback adaptor currently.

 

See my /etc/host s file,

127.0.0.1       localhost

127.0.1.1       debianlaptop

 

See my ifconfig -a

 

eth0      Link encap:Ethernet  HWaddr 00:1e:37:8a:71:c3  

         inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0

         inet6 addr: fe80::21e:37ff:fe8a:71c3/64 Scope:Link

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

         RX packets:1348 errors:0 dropped:0 overruns:0 frame:0

         TX packets:1596 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0 txqueuelen:100

         RX bytes:1021169 (997.2 KiB)  TX bytes:371191 (362.4 KiB)

         Base address:0x1840 Memory:fe200000-fe220000

 

lo        Link encap:Local Loopback  

         inet addr:127.0.0.1  Mask:255.0.0.0

         inet6 addr: ::1/128 Scope:Host

         UP LOOPBACK RUNNING  MTU:16436  Metric:1

         RX packets:4002 errors:0 dropped:0 overruns:0 frame:0

         TX packets:4002 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0 txqueuelen:0

         RX bytes:1433549 (1.3 MiB)  TX bytes:1433549 (1.3 MiB)

 

That is to say, the 127.0.0.1(localhost) is an alias of the loopback adaptor while the 127.0.0.1(debianlaptop, 192.168.0.100) is an alias of my real network adaptor.

 

For the first time, oracle only bind itself with the loopback one. So you only can access it by

 

http://127.0.0.1:1158/apex/

http://localhost:1158/apex/

 

  • Now you can login web console with sys/*******, go to Administratoin  item. In the right sidebar  Task , click the link. Then enable the item Available from local server and remote clients .    

 

Then you can login with the following address to console. This is the ip address of my real network adaptor.

 

http://127.0.1.1:1158/apex/

http://debianlaptop:1158/apex/

http://192.168.0.100:1158/apex/

 

  • After enable the remote clients, you must make a TNS file in /et c . So you can login remotely with sqlplus.  

 

cp /app/oracle/product/10.2.0/server/network/admin/tnsnames.ora /etc/

 

  • Now you can login with client sqlplus.

source /app/oracle/product/10.2.0/client/bin/oracle_env.sh

 

sqlplus sys/*******@xe as sysdba

sqlplus system/*******@xe

sqlplus robert/youarebest@xe

 

Please note, this time, the sqlplus is from client site, you can run which sqlplus  to see,

 

/usr/lib/oracle/xe/app/oracle/product/10.2.0/ client /bin/sqlplus

 

That is to say, it use the tnsnames.ora from /etc diretory.   Without last step and the right one before last step, you can't login in the client sqlplus.  

 

Reference

 

http://www.davidpashley.com/articles/oracle-install.html

 

http://www.debianhelp.co.uk/oracle.htm

 

http://sysop.com.cn/system5504,1.html

分享到:
评论

相关推荐

    debian、ubuntu、凝思磐石系统oracle11g安装包,内置安装脚本

    总结起来,这个压缩包为在Debian、Ubuntu和凝思磐石系统上安装Oracle 11g提供了便利。内置的安装脚本不仅简化了安装流程,还支持自动恢复数据库,这对于开发者和运维人员来说是一个高效且实用的工具。然而,在实际...

    ubuntu下安装oracle-xe,并建立数据库脚本测试

    sudo apt-get install oracle-xe ``` 5. **配置 Oracle-XE** 安装完成后,需要进行初始配置: ```bash sudo /etc/init.d/oracle-xe configure ``` 配置项包括但不限于: - Web 管理界面端口 - Oracle ...

    oracle4debian.zip

    不过,"oracle4debian.zip"这个压缩包提供了一个便捷的解决方案,它包含了一个自动安装Oracle数据库的脚本`install.sh`,以及相关的教程,旨在简化这一过程。 首先,我们来了解Oracle数据库的基础知识。Oracle...

    Oracle 19c RAC on Linux安装手册.docx

    运行`yum install oracle-database-preinstall-19c`来安装RPM,然后执行`/etc/init.d/oracle-preinstall-rpms setup`进行配置。 **4.2 手工配置参数** 如果选择手工配置,需确保所有节点的内核参数一致,以避免集群...

    debian 5+xdmcp+oracle 10g.txt

    ### Debian 5 安装 Oracle 10g 的配置与步骤 #### 一、环境配置与准备 在本文档中,我们将详细介绍如何在 Debian 5 操作系统上配置并安装 Oracle 10g 数据库。这包括了系统级别的配置、Oracle 前置条件以及必要的...

    Canaima(Debian)Linux上安装oracle11g RAC.docx

    Canaima Linux 上安装 Oracle 11g RAC 的详细描述 本文档旨在描述在 Canaima Linux 4.0 上安装 Oracle 11g RAC 的过程。Canaima Linux 是基于 Debian Linux 的操作系统,委内瑞拉政府指定使用的操作系统。本文档将...

    build GTK3.16 in debian 8 (64bit)

    build GTK3.16 ,tested in debian 8 (64bit) os.

    使用Oracle的Debian软件包在Linux上安装MySQL.pdf

    ### 使用Oracle的Debian软件包在Linux上安装MySQL #### 关键知识点概述: 1. **MySQL APT存储库**:这是在类似Debian的系统上安装MySQL的主要方式。 2. **MySQL开发者专区**:提供了MySQL的Debian软件包,包括各种...

    debian.11.3+debian-bullseye+debian-buster

    这个压缩包文件包含了三个不同版本的Debian操作系统镜像:debian.11.3、debian_bullseye和debian_buster。每个版本都有其独特的特性和改进,下面将详细讨论这些版本。 首先,我们来看`debian.11.3`,也被称为Debian...

    debian10_install-3.docx|debian10_install-3.docx

    在本文档中,我们将深入探讨如何在Debian 10(代号Buster)系统上配置本地Apt源,以及如何使用 TightVNC Server 实现远程桌面访问。配置本地Apt源可以极大地提高软件包安装速度,特别是当网络连接不稳定或速度较慢时...

    script-install-i3-debian:安装i3平铺Windows Manager Debian Minimum VirtualBox的脚本

    使用用户名“ user”进行安装: sh -c "$(wget http://bit.ly/1Ncbyek -O -)"或sh -c "$(wget https://raw.github.com/avelardev/script-install-i3-debian/master/i3wm.sh -O -)" 重新启动后,转到“ Virtualbox...

    debian package hwoto

    ### Debian Package Creation: An In-depth Overview #### 标题解析:Debian Package Howto(Debian包如何制作) 标题揭示了文档的核心主题:教导用户如何创建Debian软件包。Debian是一个广泛使用的Linux发行版,...

    debian-preseed:使用 virsh-install 预置 debian 的示例

    在本示例中,我们将探讨如何使用 `virsh-install` 工具结合 preseed 文件来创建一个预配置的 Debian 虚拟机。 `virsh` 是libvirt项目的一个命令行工具,用于管理和控制虚拟机。`virsh-install` 是 virsh 提供的一个...

    debian参考手册,debian管理员使用

    ### Debian参考手册知识点详解 #### 一、简介 **Debian参考手册**是一份非常详尽的指南,专为Debian系统的用户和管理员设计。它不仅涵盖了Debian的基础概念、安装指南,还深入探讨了软件包管理、系统优化、网络...

    nginx-autoinstall, 在Debian和Ubuntu上,使用定制模块从源代码编译 Nginx.zip

    nginx-autoinstall, 在Debian和Ubuntu上,使用定制模块从源代码编译 Nginx 自动安装通过optionnal模块编译和安装 Nginx 。 兼容性x86,x64,arm*Debian 8和更高版本Ubuntu 16.04和更高版本特性最新的主线或者稳定...

    oracle-java8, Debian的最新 Java 8软件包.zip

    oracle-java8, Debian的最新 Java 8软件包 简介用于Debian的Java 8软件包。支持Debian版本目前,软件包已经在Debian版本上进行了测试:扩展 i386/amd64jessie i386/amd64wheezy i386/amd64我没有在Ubun

    Debian系统管理员参考手册 The Debian Administrator’s Handbook

    《Debian系统管理员参考手册》是由Raphaël Hertzog和Roland Mas撰写的一本详细的手册,主要面向希望深入了解Debian系统的管理员和用户。Debian是一个基于Linux内核的操作系统,以其强大的社区支持、多平台兼容性和...

    Debian apt-get 使用指南

    ### Debian apt-get 使用指南 #### 一、简介与基本概念 `apt-get` 是 Debian 及其衍生系统(如 Ubuntu)中的一个强大的包管理工具,它可以帮助用户安装、升级、卸载软件包,并且能够自动解决依赖关系。本文将详细...

Global site tag (gtag.js) - Google Analytics