#>su - oracle 시에
#>!sh/.....(머라고 했었는지 기억이 안나네요 ㅡㅡ;;;)

여튼 요딴 에러가 나온다면...

#>env | grep $SHELL
을 실행해 보세요. 해당쉘을 확인하는건데 만약 ksh라면 에러 내용과 다른 쉘이기때문에
/etc/passwd의 해당id 쉘을 수정해줍니다.

혹......시나 vi 에서 :wq! 를 했는데 저장도 안되고 빠져나오지도 않는다~~~~요딴 고민에 빠져계신분은
 :w 한후 :q!를 하세요.  ^_______________^씨익


혹시 USER생성시 생성후
#>su - oracle
실행시 NO Directory! 라고 나오는 경우가 있었음... >.<... 멀까....고민하던중 검색 검색 검색 ... ㄷㄷㄷ

결론은 useradd 실행시에 '-d' 옵션을 주는겁니다. (디폴트로 디렉토리를 지정)
이해가 안되는 분들을 위해 예를 들면
ex)
#>useradd -g oinstall -g oinstall -G dba -d /data/oracle oracle
요딴식으로? ^^;
오라클을 설치하는건 OS의 종류에 따라서 다르겠지만 별반 다를게 없습니다.
Linux, solaris, HP, Aix 등등등...
단 커널 셋팅하는건 따로 봐야 할듯 하네요. 그런건 타 인터넷 블로그를 찾아보시면 각 OS에 맞게 DB버전에 맞게
설정하는 값들이 있을겁니다. 워낙 많아서 금방 찾아지더라고요.
현재 밑의 설정은 페도라4를 기준으로 되어있습니다.

Unpack Files

Unzip the files:

unzip 10201_database_linux32.zip

You should now have a single directory containing installation files. Depending on the age of the download this may either be names "db/Disk1" or "database".

Hosts File

The /etc/hosts file must contain a fully qualified name for the server:

Set Kernel Parameters

Add the following lines to the /etc/sysctl.conf file:

kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmem_max=262144

Run the following command to change the current kernel parameters:

/sbin/sysctl -p

Add the following lines to the /etc/security/limits.conf file:

*               soft    nproc   2047*               hard    nproc   16384*               soft    nofile  1024*               hard    nofile  65536

Add the following line to the /etc/pam.d/login file, if it does not already exist:

session    required     /lib/security/pam_limits.so

Note by Kent Anderson: In the event that pam_limits.so cannot set privilidged limit settings see Bug 115442.

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:

SELINUX=disabled

Alternatively, this alteration can be done using the GUI tool (Desktop > System Settings > Security Level). Click on the SELinux tab and disable the feature.

Setup

Install the following packages:

# From Fedora Core 4 Disk 1cd /media/cdrom/Fedora/RPMSrpm -Uvh setarch-1.7-3.i386.rpmrpm -Uvh tcl-8.4.9-3.i386.rpm# From Fedora Core 4 Disk 2cd /media/cdrom/Fedora/RPMSrpm -Uvh xorg-x11-deprecated-libs-6.8.2-31.i386.rpmrpm -Uvh openmotif-2.2.3-10.i386.rpmrpm -Uvh compat-db-4.2.52-2.i386.rpm# From Fedora Core 4 Disk 3cd /media/cdrom/Fedora/RPMSrpm -Uvh compat-libstdc++-33-3.2.3-47.fc4.i386.rpmrpm -Uvh compat-gcc-32-3.2.3-47.fc4.i386.rpmrpm -Uvh libaio-0.3.104-2.i386.rpm# From Fedora Core 4 Disk 4cd /media/cdrom/Fedora/RPMSrpm -Uvh compat-gcc-32-c++-3.2.3-47.fc4.i386.rpm



여기서 부터는 다른 OS와 상관없이 같게 하시면 됩니다.




Create the new groups and users:

groupadd oinstallgroupadd dbauseradd -g oinstall -G dba oraclepasswd oracle

Create the directories in which the Oracle software will be installed:

mkdir -p /u01/app/oracle/product/10.2.0/db_1chown -R oracle.oinstall /u01
여기서 추가사항이
chmod -R 775 /u01 해주세요. 아니면 설치시 안되더라고요.

Login as root and issue the following command: 반드시 root 부팅입니다.

xhost +    

Login as the oracle user and add the following lines at the end of the .bash_profile file:

# Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOMEORACLE_SID=TSH1; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNELif [ $USER = "oracle" ]; then  if [ $SHELL = "/bin/ksh" ]; then    ulimit -p 16384    ulimit -n 65536  else    ulimit -u 16384 -n 65536  fifi

Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable :
혹시나 이런분이 계실까봐...putty 같은 프로그램으로 실행해서 인스톨하면 안됩니다 ㅡㅡ;
display가 되야 합니다. 혹시나 절실하게 필요하신분은 XManager라는 프로그램 있는데 그거 사용하세요.

DISPLAY=:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory:

./runInstaller

During the installation enter the appropriate ORACLE_HOME and name then continue with the installation.

Post Installation

Finally edit the /etc/oratab file setting the restart flag for each instance to 'Y':

TSH1:/u01/app/oracle/product/10.2.0/db_1:Y

Create a file called /etc/init.d/dbora containing the following:

#!/bin/sh# description: Oracle auto start-stop script.# chkconfig: - 20 80## Set ORA_HOME to be equivalent to the $ORACLE_HOME# from which you wish to execute dbstart and dbshut;## Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME.ORA_HOME=/u01/app/oracle/product/10.2.0/db_1ORA_OWNER=oracleif [ ! -f $ORA_HOME/bin/dbstart ]then    echo "Oracle startup: cannot start"    exitficase "$1" in    'start')        # Start the Oracle databases:        # The following command assumes that the oracle login         # will not prompt the user for any values        su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"        su - $ORA_OWNER -c $ORA_HOME/bin/dbstart        ;;    'stop')        # Stop the Oracle databases:        # The following command assumes that the oracle login         # will not prompt the user for any values        su - $ORA_OWNER -c $ORA_HOME/bin/dbshut        su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"        ;;esac

Use chmod to set the privileges to 750:

chmod 750 /etc/init.d/dbora

Link the file into the appropriate run-level script directories:

ln -s /etc/init.d/dbora /etc/rc0.d/K10dboraln -s /etc/init.d/dbora /etc/rc3.d/S99dbora

Associate the dbora service with the appropriate run levels:

chkconfig --level 345 dbora on
그리고 혹시나 /u01/app....initTSH1.ora 인가?? 없다면
ORACLE_SID=orcl 을 해주세요.

The relevant instances should now startup/shutdown automatically at system startup/shutdown.


+ 인스톨 화면 보기