Steps
deb http://oss.oracle.com/debian unstable main non-free
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.
/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: *******
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
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
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.
See my /etc/hosts 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/
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/
cp /app/oracle/product/10.2.0/server/network/admin/tnsnames.ora /etc/
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