월요일, 10월 30, 2006

Install of Oracle 9i on Fedora Core 4

Install of Oracle 9i on Fedora Core 4

* 요약
fedora에 오라클 9i설치하기....^^

Xmanager이 있으면 원격으로 설치가 가능하다.. xclock이 실행되는지 확인함...

* java 1.3.0 버젼을 미리 설치한다. http://java.sun.com/j2se/1.3/download.html

1. 계정생성
su -
# groupadd dba
# useradd -g dba oracle

2. 환경설정
/etc/sysctl.conf
kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

3. Oracle 환경변수 수정
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/920
ORACLE_SID=MY_ORACLE
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_ASSUME_KERNEL=2.4.1
THREADS_FLAG=native
ORACLE_OEM_JAVARUNTIME=/opt/jre1.3.1_15
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_ASSUME_KERNEL THREADS_FLAG ORACLE_OEM_JAVARUNTIME PATH

4. 설치 확인
rpm -q gcc glibc-headers glibc-kernheaders glibc-devel compat-libstdc++ cpp compat-gcc

ftp://ftp.kaist.ac.kr/pub/fedora/linux/core/4/i386/os/Fedora/RPMS

5. config 변경후 reboot <-- 꼭 필요함..
/etc/selinux/config and change value of SELINUX to "disabled"

6. Download the Oracle 9i
gunzip ship_9204_linux_disk1.cpio.gz
gunzip ship_9204_linux_disk2.cpio.gz
gunzip ship_9204_linux_disk3.cpio.gz
cpio -idmv < ship_9204_linux_disk1.cpio
cpio -idmv < ship_9204_linux_disk2.cpio
cpio -idmv < ship_9204_linux_disk3.cpio

/install/linux/oraparam.ini and modify JRE_LOCATION
variable and set path to our JRE installation from Step
JRE_LOCATION=/opt/jre1.3.1_15

7. install cd Disk1 ./runInstaller
* 참고 http://ivan.kartik.sk/oracle/install_ora9_fedora.html

fedora 4 pro*c 컴파일

undefined reference to `ECPGget_sqlca' <-- 이 함 수를 못찾는 다고 나오는 경우

이런경우 pc파일에서 c로 변환시 postgressql 함수가 추가되어서 생기는 문제로.
proc설정파일을 수정하면 됩니다...



/oracle/9.2.0/precomp/admin/pcscfg.cfg

* 기존
sys_include=(/usr/include,/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include)
ltype=short

* 수정

sys_include=(/oracle/9.2.0/precomp/public,/usr/include,/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include)
ltype=short


* 추가내용: /oracle/9.2.0/precomp/public

컴파일시 시스템함수 못찾는경우 링크하기...^^

1. man 함수명
* 일반적인 경우에 man페이지에 대부분은 링크해야하는 라이브러리가 적혀있음....

2. man으로 알 수 없는경우

# nm -A /usr/lib/*.a | grep 시스템함수
이렇게 파일이 나오는경우
libabc.a
-labc <-- 이렇게 링크시에 적어주면 됩니다. 참고하세요.

VC6에서 PRO*C 설정하기..

FileView 에
Add files to Folder
오라클이 설치되어 있는 디렉토리 밑에 oraSQL8.LIB 파일을 추가
예) G:\PROGRAM~1\ORACLE\ORA81\PRECOMP\LIB\MSVC\oraSQL8.LIB

Tools -> Options -> Directories

Include files
G:\PROGRAM~1\ORACLE\ORA81\PRECOMP\PUBLIC
G:\PROGRAM~1\ORACLE\ORA81\OCI\INCLUDE

Library files
G:\PROGRAM~1\ORACLE\ORA81\PRECOMP\LIB\MSVC
G:\PROGRAM~1\ORACLE\ORA81\OCI\LIB\MSVC


Pro C 컴파일 2가지 방법

첫번째 방법

.pc 파일에서 오른쪽 마우스를 클릭하고 Settings를 선택하고

Custom Build 메뉴에서

Commands 에 및의 내용을 추가하고

G:\program~1\Oracle\Ora81\Bin\proc oraca=yes code=CPP define=d:\Oracle\Precomp\LIB\MSVC sys_include=d:\Oracle\Precom\PUBLIC $(ProjDir)\$(InputName)

Outputs 에 및의 내용을 추가하면
$(ProjDir)\$(InputName).cpp

내용을 추가하고 컴파일하면 됨.

솔라리스 아이피 변경시 확인

솔라리스를 아이피 변경시 확인해야하는 내용.

* Solaris 에서 변경해야 될 파일들
/etc/nodename # if you need to change the name of the machine
/etc/hostname.interface # eg. hostname.hme0
/etc/hosts # Update to reflect new name
/etc/nsswitch.conf # Update if your name resolution
/etc/resolv.conf

# Update if your name servers/domain changed (DNS only)
/etc/defaultdomain # set you default domain
/etc/defaultrouter # Set the default router's IP
/etc/inet/networks # Set your network name
/etc/inet/netmasks # Set your network number
/etc/n/etc/net/ticots/hosts # For the streams-level loopback
/etc/ticlts/hosts # For the streams-level loopback
/etc/net/ticotsord/hosts # For the streams-level loopback

* Solaris 에서 IP 변경 작업

/etc/hosts 파일을 수정함.
/etc/hostname.hme0 랜카드에 적용되는 호스명을 명시

$ ifconfig hme0 [ip] netmask 0xffffff00 broadcast + up

ex)
--- 영구적인 변경
$vi /etc/hostname.hme0
xxxx

$ vi /etc/hosts
127.0.0.1 localhost
xxx.xxx.xxx.xxx xxxx xxxx

--- 임시변경시 (컴퓨터가 켜져있는 동안, 리부팅되면 정보가 사라짐)
$ ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet xxx.xxx.xxx.xxx netmask ffffff00 broadcast xxx.xxx.xxx.xxx

$ ifconfig hme0 xxx.xxx.xxx.xxx netmask 0xffffff00 broadcast + up

* Solaris 에서 GATEWAY 변경 작업

$ netstat -rn
$ route add default [gateway ip]
$ vi /etc/defaultrouter
[gateway ip]

ex)
--- 영구적인 변경
$ vi /etc/defaultrouter
xxx.xxx.xxx.1

--- 임시적인 변경
route add default xxx.xxx.xxx.1


* Solaris 에서 DNS 변경 작업

ex)
$ vi /etc/resolv.conf
nameserver xxx.xxx.xxx.1
nameserver xxx.xxx.xxx.2

$ vi nsswitch.conf
# hosts: 부분을 수정한다.
# consult /etc "files" only if nis is down.
hosts: files dns

* 설정 변경 후 reboot , 시스템에 관한 내용이 변경된경우
reboot

linux network settting

리눅스 네트웩 설정 - IP 변경시 확인해야하는 파일..
LINUX NETWORK 설정

* 모든 설정은 root 계정으로 실행합니다. *

$ vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=vtn01
GATEWAY=xxx.xxx.xxx.1 <-- default G/W IP로 변경함.

$ cd /etc/sysconfig/network-scripts

$ vi ifcfg-eth2

DEVICE=eth2
BOOTPROTO=none
HWADDR=
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=vtn01
IPADDR=xxx.xxx.xxx.xxx <-- IP
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
GATEWAY=xxx.xxx.xxx.1 <--- 해당 IP 대역에 G/W를 설정
IPV6INIT=no

$ vi route-eth2
GATEWAY0=xxx.xxx.xxx.1 <--- 해당 서버 GW
NETMASK0=255.0.0.0
ADDRESS0=xxx.0.0.0

$ vi route-eth3
GATEWAY0=xxx.xxx.xxx.1
NETMASK0=255.0.0.0
ADDRESS0=xxx.0.0.0

$ cd /etc/init.d

$ network restart

$ ifconfig <-- 아이피가 변경되었는지 확인

$ route <-- G/W ip가 적용되어 있는지 확인.


-----------------------------------------------------------------------------
이전

* /etc/sysconfig/network-scripts/ifcfg-eth0 파일을 수정함.
방법 1)
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xx
NETMASK=255.255.255.0
GATEWAY=xxx.xxx.xxx.xx

이더넷 확인)
$ ifconfig -a
eth0 Link encap:Ethernet HWaddr
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68620 errors:0 dropped:0 overruns:0 frame:0
TX packets:45782 errors:0 dropped:0 overruns:60 carrier:0
collisions:29821 txqueuelen:100
RX bytes:73725865 (70.3 Mb) TX bytes:12988879 (12.3 Mb)
Interrupt:30

eth1 Link encap:Ethernet HWaddr
inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4488 errors:0 dropped:0 overruns:0 frame:0
TX packets:2505 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:734304 (717.0 Kb) TX bytes:265288 (259.0 Kb)
Interrupt:29 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6969 errors:0 dropped:0 overruns:0 frame:0
TX packets:6969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1097647 (1.0 Mb) TX bytes:1097647 (1.0 Mb)

방법 2) Usage : ifconfig eth0 [ip] netmask 0xffffff00 broadcast + up
$ ifconfig eth0 xxx.xxx.xxx.xxx netmask 0xffffff00 broadcast + up

* Gateway 변경

방법 1)
$ netstat -rn (네트워크 상태 확인)
$ route add default [gateway ip] (게이트웨이 추가)
$ vi /etc/sysconfig/network
[gateway ip]

방법 2)
$ vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node1 # 호스트 네임
GATEWAY=xxx.xxx.xxx.xxx

$vi /etc/sysconfig/static-routes
eth0 net xxx.xxx.xxx.0 netmask 255.255.255.0 gw xxx.xxx.xxx.xxx
eth1 net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1

* 리눅스 DNS 변경

방법)
$ vi /etc/resolv.conf
domain xxxx.com
nameserver xxxx.xxx.xx.1
nameserver xxx.xxx.xx.2
nameserver xxx.xxx.xx.xxx


* 모든 작업을 종료하고 network restart 한다.

$ /etc/rc.d/init.d/network stop
$ /etc/rc.d/init.d/network start

수요일, 10월 11, 2006

OS별 패키지 설치 요약

* Linux (www.rpmfind.net)
* 설치
rpm -Uvh 설치패키지
* 설치확인
rpm -qa | grep 설치 패키지
* 삭제
rpm -e 패키지명

* SunOS (www.sunfreeware.com)
* 설치
pkgadd 패키지
* 설치확인
pkginfo | grep 패키지
* 삭제
pkgrm 패키지

* HPUX (hpux.connect.org.uk, www.hp.com)
* 설치
swinstall /절대경로/패키지
* 설치확인
swlist | grep 패키지
* 삭제
swremove 패키지

GNU 소프트웨어 설치하거나 컴파일 해야하는 경우에는
gmake, gcc, automake, autoconf, 기본적으로 4가지 패키지를 설치하고 작업하시면
대부분의 소프트웨어들을 설치됩니다. 설치하시는 패키지의 필요에 따라서 더 설치하시면 됩니다.