Official documentation (http://docs.oracle.com/cd/E17781_01/index.htm)
Here records my step to install an Oracle XE 11.2 to a CentOS 6.3 running on a x86_64 KVM virtual machine:
Step1: download, copy to host, unzip, rpm -ivh install, all seems pretty simple. None of the kernel parameter issues raised.
[root@centos6 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing... ########################################### [100%]
1:oracle-xe ########################################### [100%]
Executing post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
Step2: following instruction, first attempt to configure the database FAILED...(not to repeat this error, check the hostname of the server can be resolved, i.e. 'ping `hostname`')
[root@centos6 Disk1]# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
This will configure on-boot properties of Oracle Database 11g 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 <Enter> to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
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:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
[root@centos6 Disk1]#
Step 3: check reason for the failure and do it again.
Look at /u01/app/oracle/product/11.2.0/xe/config/log/postDBCreation.log:
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=centos6.eastip.com)(PORT=1521))'
Is it possible the hostname cannot be resolved? Adding centos6.eastip.com into hosts file, run the command in step 2 again, now it works!
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
Step 4: check the status of the server (same command with 'start', 'stop' can also control the server manually):
#service oracle-xe status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-NOV-2012 11:51:32
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 16-NOV-2012 11:45:19
Uptime 0 days 0 hr. 6 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/centos6/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos6.eastip.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos6.eastip.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
Step 5: create a user to test the service
#adduser renbing
#passwd renbing
login with renbing, then add ". /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh" into .bash_profile, run the profile
$. ./bash_profile
$ sqlplus system/passw0rd
SQL> select count(*) from all_objects;
Yes it works!
Step 6: allow remote access
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
Note:
XE is only configured with Unicode char set - this is good enough.
Development Environment
Oracle Sql Developer (GUI SQL/PLUS), run on Java
Oracle Application Express (rapid web application development tool)