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
分享到:
相关推荐
llvm-toolchain_8.0.1-7_amd64-linux-gnu_debian-10.tar.gzllvm-toolchain_8.0.1-7_amd64-linux-gnu_debian-10.tar.gzllvm-toolchain_8.0.1-7_amd64-linux-gnu_debian-10.tar.gzllvm-toolchain_8.0.1-7_amd64-linux-...
codeblocks-13.12-1_i386.debian.stable.tar.xz
llvm-toolchain_18.1.6-1_amd64-linux-gnu_debian-10.tar.gz llvm-toolchain_18.1.6-1_amd64-linux-gnu_debian-10.tar.gz llvm-toolchain_18.1.6-1_amd64-linux-gnu_debian-10.tar.gz llvm-toolchain_18.1.6-1_amd64...
llvm-toolchain_15.0.7-1_amd64-linux-gnu_debian-10.tar.gz 龙芯LLVM 15.0.7.1 llvm-toolchain_15.0.7-1_amd64-linux-gnu_debian-10.tar.gz 龙芯LLVM 15.0.7.1 llvm-toolchain_15.0.7-1_amd64-linux-gnu_debian-...
mysql-server_8.1.0-1debian11_amd64.deb-bundle.tar 适用于Debian Linux 11 (x86, 64-bit)
debian-8.11.1-amd64-DVD-1 debian-8.11.1-amd64-DVD-1 debian-8.11.1-amd64-DVD-1 debian-8.11.1-amd64-DVD-1 debian-8.11.1-amd64-DVD-1
sudo apt-get install oracle-xe ``` 5. **配置 Oracle-XE** 安装完成后,需要进行初始配置: ```bash sudo /etc/init.d/oracle-xe configure ``` 配置项包括但不限于: - Web 管理界面端口 - Oracle ...
nginx-autoinstall, 在Debian和Ubuntu上,使用定制模块从源代码编译 Nginx 自动安装通过optionnal模块编译和安装 Nginx 。 兼容性x86,x64,arm*Debian 8和更高版本Ubuntu 16.04和更高版本特性最新的主线或者稳定...
mysql-server_8.2.0-1debian12_amd64.deb-bundle.tar 适用于Debian Linux 12 (x86, 64-bit)
总结起来,这个压缩包为在Debian、Ubuntu和凝思磐石系统上安装Oracle 11g提供了便利。内置的安装脚本不仅简化了安装流程,还支持自动恢复数据库,这对于开发者和运维人员来说是一个高效且实用的工具。然而,在实际...
codeblocks_12.11-2_i386-debian-stable, linux下最新的好用的开发包。 1 下载 codeblocks_12.11-1_i386-debian-stable.tar.bz 2. 解压,记住压缩好解压出来的文件没有放在文件夹中的,所以载解压命令里最好加上 -...
MySQL8.4.0 LTS(mysql-server_8.4.0-1debian11_amd64.deb-bundle.tar)适用于Debian 11 Linux (x86, 64-bit)
$ npm install -g electron-installer-debian 用于npm脚本或以编程方式使用: $ npm install --save-dev electron-installer-debian 用法 假设您的Electron应用程序位于path/to/app ,并且具有以下结构: . ├─...
debain11.1镜像种子,可拿该种子到迅雷下载iso镜像
使用用户名“ 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...
Ansible-ansible-role-packer-debian.zip,ansible role-vagrant virtualboxible的packer debian/ubuntu配置,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任务自动化。
debian最新系统,实测VMware可以使用
dh-make-golang, 自动创建Debian打包软件包 dh-make-golang是自动创建Debian打包软件包的工具。 它的目标是在创建一个for包包时尽可以能自动地离开任何工作。概述你所需要指定的是go包 NAME 。 在当前的工作目录中,...
kubernetes部署prometheus监控nginx-exporter-1.3.0-debian-12-r2.tar
puppet-enterprise-2.7.0-debian-6-amd64.tar.gz.002