티스토리 뷰
-- 오라클 그룹 및 계정 생성
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba oracle
#passwd oracle
-- 오라클 환경 설정
#su oracle
#cd /home/oracle
# vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_SID=XE
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export PATH
unset USERNAME
위 내용대로 작성후 저장과 함께 빠져나온다.
#su -
#cd
# vi .bash_profile
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_SID=XE
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
작성후 빠져 나온다.
-- 설치
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
# /etc/rc.d/init.d/oracle-xe configure
HTTP-PORT : 8081
Lister Port : 1521
System Passwd :
Auto Start : N
# $ORACLE_HOME/config/scripts/stopdb.sh
# $ORACLE_HOME/config/scripts/stopall.sh
(※ Auto Start를 N으로 하면 /etc/rc.d/init.d/oracle-xe stop이 실행되지 않으므로 수동으로 DB를 내려줘야 함)
-- CharSet 변경
select * from nls_database_parameters;
#update sys.props$ set value$='KO16KSC5601' where name='NLS_CHARACTERSET';
#update sys.props$ set value$='KO16KSC5601' where name='NLS_NCHAR_CHARACTERSET';
#update sys.props$ set value$='AMERICAN_AMERICA.KO16KSC5601' where name='NLS_LANGUAGE';
#KO16MSWIN949
update sys.props$ set value$='KO16MSWIN949' where name='NLS_CHARACTERSET';
update sys.props$ set value$='KO16MSWIN949' where name='NLS_NCHAR_CHARACTERSET';
update sys.props$ set value$='AMERICAN_AMERICA.KO16MSWIN949' where name='NLS_LANGUAGE';
-- DATA Base CharSet 변경
SQL>STARTUP MOUNT;
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;
SQL>ALTER DATABASE CHARACTER SET KO16MSWIN949;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;
-- 기타 환경 변수 설정.
SQL>alter system set audit_file_dest='/home/oracle_xe/adump' scope=spfile;
SQL>alter system set background_dump_dest='/home/oracle_xe/bdump' scope=spfile;
SQL>alter system set core_dump_dest='/home/oracle_xe/cdump' scope=spfile;
SQL>alter system set user_dump_dest='/home/oracle_xe/udump' scope=spfile;
SQL>alter system set DB_RECOVERY_FILE_DEST='/home/oracle_xe/flash_recovery_area' scope=spfile;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;
-- Table Space 및 User 생성
SQL>create tablespace mojaeq_d datafile '/oradata/mojaeq_data01.dbf' size 2048m;
SQL>create tablespace mojaeq_i datafile '/oradata/mojaeq_index01.dbf' size 1024m;
SQL>create temporary tablespace mojaeq_t tempfile '/oradata/mojaeq_t01.dbf' size 1024m autoextend on;
SQL>create user mojaeq identified by ****** default tablespace mojaeq_d temporary tablespace mojaeq_t;
SQL>grant dba to mojaeq;
--create database link mojaeq_org connect to mojaeq identified by ****** using 'mojaeq';
-- Export & Import
#exp mojaeq@gsik file=full.dmp full=Y
#imp mojaeq@xe fromuser=mojaeq touser=mojaeq file=full.dmp
-- Oracle 시작 & 종료 (oracle 환경변수가 없는 상황에서 실행해야함.)
root# /etc/rc.d/init.d/oracle-xe {start|stop|restart}
※ /etc/rc.d/init.d/oracle-xe configure 실행시
Auto Start : Y로 설정한 경우만 실행 됨.
☆☆☆☆ Auto Start : Y일 때 /etc/rc.d/init.d/oracle-xe stop 후
sqlplus "/as sysdba"에서 startup이 안되는 문제 발생으로
이후 Auto Start : N으로 하여 재설치함
사용하지 않는 서버가 하나 있어서 시험삼아 설치 해 봤다..
서버 사양은 p3 733, 384M, 18*2 SCSI LVM2
우선 yum -y update 한방 날려 주고 시작 했다.
[root@ml370 ~]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
오류: Failed dependencies:
libaio >= 0.3.96 is needed by oracle-xe-univ-10.2.0.1-1.0.i386
libaio 가 설치 되어 있지 않다고 해서 설치 했다.
[root@ml370 ~]# yum install libaio
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libaio to pack into transaction set.
libaio-0.3.104-2.i386.rpm 100% |=========================| 6.6 kB 00:00
---> Package libaio.i386 0:0.3.104-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libaio i386 0.3.104-2 base 18 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 18 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libaio-0.3.104-2.i 100% |=========================| 18 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libaio ######################### [1/1]
Installed: libaio.i386 0:0.3.104-2
Complete!
[root@ml370 ~]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
준비 중... ########################################### [100%]
1:oracle-xe-univ ########################################### [100%]
Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to
configure the database.
기본 셋팅
[root@ml370 init.d]# ./oracle-xe configure
Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g 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: [엔터]
Password can't be null. Enter password: 비밀번호
Confirm the password: 비밀번호
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]: [엔터]
n 으로 하는 경우에 오류가 있을 수도 있다고 주서 들은 얘기.
Starting Oracle Net Listener...Done
Configuring Database... [한참 걸립니다.]
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"
[root@ml370 init.d]#
setup 에서 방화벽 설정 꺼두고서 pc 에서 웹주소로 접속을 해보면 접속 환경이
웹상에서 보이게 됩니다.
제한조건으로는 저장영역 4G 이하, SGA+PGA 1G 이하라고 하네요..
연습용으로 적당할 듯 합니다..
'DATABASE > Oracle' 카테고리의 다른 글
오라클 유저 생성 및 효율적 테이블스페이스 생성하기(공간 자동증가하게 생성) (0) | 2014.11.13 |
---|---|
oracle xe 설치후 휴지인스턴스로 시작하지 못할때 (0) | 2008.07.26 |
오라클 기초 자료 (0) | 2008.07.26 |
오라클 9i부터 컬럼명 변경을 위한 SQL문법이 제공됨 (0) | 2008.07.26 |
오라클 팁 (0) | 2008.07.26 |
- Total
- Today
- Yesterday
- SSL
- Letsencrypt+nginx
- 마이바티스CamelCase
- Intellj들여쓰기
- Letsencrypt wildcard auto renew
- letsencrypt
- camelcase
- 마이바티스
- Letsencrypt wildcard
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |