# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
# /etc/init.d/oracle-xe configure
# systemctl start oracle-xe.service
# systemctl enable oracle-xe.service
# systemctl status oracle-xe.service
# su -l oracle
$ cd /u01/app/oracle/product/11.2.0/xe/bin/
$ . ./oracle_env.sh
$./sqlplus system
SQL*Plus: Release 11.2.0.2.0 Production on 금 3월 25 03:48:39 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
SQL>
check users
SQL> SELECT * FROM ALL_USERS;
USERNAME USER_ID CREATED
------------------------------ ---------- --------
XS$NULL 2147483638 11/08/28
APEX_040000 47 11/08/28
APEX_PUBLIC_USER 45 11/08/28
FLOWS_FILES 44 11/08/28
HR 43 11/08/28
MDSYS 42 11/08/28
ANONYMOUS 35 11/08/28
XDB 34 11/08/28
CTXSYS 32 11/08/28
OUTLN 9 11/08/28
SYSTEM 5 11/08/28
USERNAME USER_ID CREATED
------------------------------ ---------- --------
SYS 0 11/08/28
12 rows selected.
check tablespaces
SQL> SELECT TABLESPACE_NAME, STATUS, CONTENTS FROM USER_TABLESPACES;
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------
SYSTEM ONLINE PERMANENT
SYSAUX ONLINE PERMANENT
UNDOTBS1 ONLINE UNDO
TEMP ONLINE TEMPORARY
USERS ONLINE PERMANENT
CREATE TABLESPACE
SQL> CREATE BIGFILE TABLESPACE OWL
DATAFILE '/u01/app/oracle/oradata/XE/owl.dbf' SIZE 10650M
AUTOEXTEND OFF
NOLOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK OFF;
SQL>
CREATE USER
SQL> CREATE USER OWL
IDENTIFIED BY ******
DEFAULT TABLESPACE OWL
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT CONNECT TO OWL;
GRANT RESOURCE TO OWL;
GRANT DBA TO OWL;
ALTER USER OWL DEFAULT ROLE ALL;
GRANT CREATE TYPE TO OWL;
GRANT CREATE SEQUENCE TO OWL;
GRANT CREATE TABLE TO OWL;
GRANT CREATE DATABASE LINK TO OWL;
GRANT UNLIMITED TABLESPACE TO OWL;
GRANT CREATE PROCEDURE TO OWL;
GRANT CREATE VIEW TO OWL;
GRANT CREATE SYNONYM TO OWL;
GRANT ALTER ANY OUTLINE TO OWL;
GRANT CREATE TRIGGER TO OWL;
GRANT DROP ANY OUTLINE TO OWL;
GRANT CREATE ROLE TO OWL;
GRANT CREATE ANY OUTLINE TO OWL;
GRANT CREATE MATERIALIZED VIEW TO OWL;
GRANT CREATE PUBLIC SYNONYM TO OWL;
SQL>
if more than 2 listeners used for test...
# vi /etc/rc.d/init.d/oracle-xe
#status=`ps -ef | grep tns | grep oracle`
status=`ps -ef | grep xe | grep tns | grep oracle`
if [ "$status" == "" ]
then
if [ -f $ORACLE_HOME/bin/tnslsnr ]
then
echo "Starting Oracle Net Listener."
$SU -s /bin/bash $ORACLE_OWNER -c "$LSNR start" > /dev/null 2>&1
touch /var/lock/subsys/listener
fi
fi