728x90
반응형

 

 

 

 

[Ubuntu Linux] 리눅스 서버 구축 #1 - Oracle 설치

 

 

 

1. 다운로드 페이지로 바로가기

 - https://www.oracle.com/database/technologies/oracle21c-linux-downloads.html

 

 

 

2. Oracle Home 디렉토리를 생성하고 다운받은 파일의 *.zip 압축을 푼다

 

 - mkdir -p /home/javanian/app/oracle/product/19.3.0/dbhome_1
 - cd /home/javanian/app/oracle/product/19.3.0/dbhome_1
 - unzip /home/javanian/download/LINUX.X64_193000_db_home.zip

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1. 다운로드 페이지로 바로가기

 - https://www.oracle.com/database/technologies/oracle21c-linux-downloads.html

 

 - 오라클 계정에 로그인을 하면 바로 다운로드가 됩니다.

 

 

2. Oracle Home 디렉토리를 생성하고 다운받은 파일의 *.zip 압축을 푼다

 

 - mkdir -p /home/javanian/app/oracle/product/21.3.0/dbhome_1
 - cd /home/javanian/app/oracle/product/21.3.0/dbhome_1
 - unzip /home/javanian/download/LINUX.X64_213000_db_home.zip

 

javanian@ubuntu:~/download$ ll
total 5726424
drwxrwxr-x 2 javanian javanian       4096 Feb 21 02:37 ./
drwxrwxr-- 9 javanian javanian       4096 Feb 21 02:44 ../
-rw-rw-r-- 1 javanian javanian 3109225519 Feb 20 13:14 LINUX.X64_213000_db_home.zip
-rw-rw-r-- 1 javanian javanian 2754612612 Feb 20 09:53 oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm
javanian@ubuntu:~/download$ cd /home/javanian/app/oracle/product/21.3.0/dbhome_1
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ unzip /home/javanian/download/LINUX.X64_213000_db_home.zip
Command 'unzip' not found, but can be installed with:
sudo apt install unzip
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ sudo apt install unzip
[sudo] password for javanian:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  zip
The following NEW packages will be installed:
  unzip
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 174 kB of archives.
After this operation, 385 kB of additional disk space will be used.
Get:1 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip amd64 6.0-26ubuntu3.1 [174 kB]
Fetched 174 kB in 2s (71.4 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 81247 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-26ubuntu3.1_amd64.deb ...
Unpacking unzip (6.0-26ubuntu3.1) ...
Setting up unzip (6.0-26ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning candidates...
Scanning linux images...

Running kernel seems to be up-to-date.

Restarting services...
Service restarts being deferred:
 systemctl restart ModemManager.service
 /etc/needrestart/restart.d/dbus.service
 systemctl restart networkd-dispatcher.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ unzip /home/javanian/download/LINUX.X64_213000_db_home.zip
Archive:  /home/javanian/download/LINUX.X64_213000_db_home.zip
   creating: addnode/
  inflating: addnode/addnode.sh
  inflating: addnode/addnode_oraparam.ini.sbs
  inflating: addnode/addnode_oraparam.ini
  inflating: addnode/addnode.pl
  inflating: root.sh
   creating: QOpatch/
  inflating: QOpatch/qopiprep.bat
   creating: rdbms/
   creating: rdbms/mesg/
  inflating: rdbms/mesg/orae.msb
  inflating: rdbms/mesg/diako.msb
  inflating: rdbms/mesg/ulko.msb

~~~

finishing deferred symbolic links:
  bin/lbuilder           -> ../nls/lbuilder/lbuilder
  lib/libocci.so         -> libocci.so.21.1
  lib/libjavavm.a        -> ../javavm/jdk/jdk8/lib/libjavavm.a
  lib/libagtsh.so        -> libagtsh.so.1.0
  lib/libclntsh.so       -> libclntsh.so.21.1
  javavm/lib/jce.jar     -> ../../javavm/jdk/jdk8/lib/jce.jar
  javavm/admin/cbp.jar   -> ../../javavm/jdk/jdk8/admin/cbp.jar
  lib/libclntshcore.so   -> libclntshcore.so.21.1
  jdk/bin/ControlPanel   -> jcontrol
  jdk/jre/bin/ControlPanel -> jcontrol
  javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so
  javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin
  javavm/lib/security/cacerts -> ../../../javavm/jdk/jdk8/lib/security/cacerts
  javavm/lib/security/README.txt -> ../../../javavm/jdk/jdk8/lib/security/README.txt
  javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar
  javavm/lib/security/java.security -> ../../../javavm/jdk/jdk8/lib/security/java.security
  jdk/jre/lib/amd64/server/libjsig.so -> ../libjsig.so
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$

 

 

3. Oracle 설치

 - $ ls

-rwx------  1 javanian javanian   695 Jul 27  2021 root.sh
-rwxr-x---  1 javanian javanian  1783 Mar  8  2017 runInstaller

 

javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/javanian/app/oracle/product/21.3.0/dbhome_1/jdk/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
        at java.lang.Runtime.load0(Runtime.java:810)
        at java.lang.System.load(System.java:1086)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
        at java.lang.Runtime.loadLibrary0(Runtime.java:871)
        at java.lang.System.loadLibrary(System.java:1122)
        at java.awt.Toolkit$3.run(Toolkit.java:1636)
        at java.awt.Toolkit$3.run(Toolkit.java:1634)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
        at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
        at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
        at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:136)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1879)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:582)
        at oracle.install.commons.util.Application.startup(Application.java:976)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
        at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:1144)
        at oracle.install.ivw.db.driver.DBConfigWizard.startup(DBConfigWizard.java:74)
        at oracle.install.ivw.db.driver.DBConfigWizard.main(DBConfigWizard.java:84)
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ xdpyinfo --help
Command 'xdpyinfo' not found, but can be installed with:
sudo apt install x11-utils
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$
javanian@ubuntu:~/app/oracle/product/21.3.0/dbhome_1$ sudo apt install x11-utils
[sudo] password for javanian:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1 libgl1-amber-dri libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6
  libllvm15 libpciaccess0 libsensors-config libsensors5 libsm6 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-shm0
  libxcb-sync1 libxcb-xfixes0 libxcomposite1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1
  libxxf86dga1 libxxf86vm1 x11-common
Suggested packages:
  lm-sensors mesa-utils
The following NEW packages will be installed:
  libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1 libgl1-amber-dri libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6
  libllvm15 libpciaccess0 libsensors-config libsensors5 libsm6 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-shm0
  libxcb-sync1 libxcb-xfixes0 libxcomposite1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1
  libxxf86dga1 libxxf86vm1 x11-common x11-utils
0 upgraded, 45 newly installed, 0 to remove and 2 not upgraded.
Need to get 39.0 MB of archives.
After this operation, 166 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libdrm-amdgpu1 amd64 2.4.113-2~ubuntu0.22.04.1 [19.9 kB]

 

 

 - Set Up Software Only 선택

   첫번째 옵션 : Oracle Database S/W 를 설치하고 DB Creation 도 함께 하는 옵션

   두번째 옵션 : S/W 설치만 하는 옵션

   >>> dbca (Database Configuration Assistant) 툴을 이용해서 DB 를 생성할 예정

 

 - Single instance database installation 선택

   Single DB 로 설치할지, RAC 로 설치할 지

 

 - Enterprise Edition 선택

   Standard Edition 은 파티션, 병렬처리 등의 기능이 지원되지 않습니다

 

 - Oracle base 경로 설정

   /home/javanian/app/oracle

   /home/oracle/.bash_profile 파일에서 ORACLE_BASE와 ORACLE_HOME을 확인하고 다음을 누른다.

 

 - Inventory Directory 경로 설정

   /home/javanian/app/oraInventory

   Inventory 디렉토리 (Oracle 제품군 설치이력이 관리되는 디렉토리 )

 

 - 그룹 권한 설정

   각종 Role 에 따라 그룹을 각각 지정하도록 권고하고 있다.

   runInstaller 를 실행하는 유저의 기본그룹이 디폴트로 나옵니다.

   dba 라는 이름으로 기본그룹을 만들었으면 dba 가 나오게 됩니다.

   이름 자체는 중요하지 않습니다.

 

   데이터베이스 관리자 (OSDBA) 그룹

   데이터베이스 운영자 (OSOPER) 그룹 (선택사항)

   데이터베이스 백업 및 복구 (OSBACKUPDBA) 그룹

   Data Guard관리 (OSDGDBA) 그룹

   암호화 키 관리 (OSKMDBA) 그룹

   Real Application Cluster 관리 (OSRACDBA) 그룹

   

 

 

 - Root 스크립트 실행 구성

   ./runinstaller 실행후 자동으로 root 스크립트 실행을 위한 root 패스워드 입력(root.sh 등)

 

 - Summary

    Install

 

 

 

 

 

 

 

 

-----------------------------------------------------------------------------------------------------------------------------------------

하기 방식은 에러발생으로 진행하지 않음

oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY

 

 - https://www.oracle.com/database/technologies/oracle21c-linux-downloads.html

 

 - 오라클 계정에 로그인을 하면 바로 다운로드가 됩니다.

 

 

디렉토리 권한 변경

 - $ sudo go+w download

javanian@ubuntu:/$ cd home
javanian@ubuntu:/home$ ll
total 12
drwxr-xr-x  3 root     root     4096 Feb 15 03:44 ./
drwxr-xr-x 19 root     root     4096 Feb 15 03:43 ../
drwxrwxr--  6 javanian javanian 4096 Feb 20 04:59 javanian/
javanian@ubuntu:/home$ mkdir download
mkdir: cannot create directory ‘download’: Permission denied
javanian@ubuntu:/home$ sudo mkdir download
[sudo] password for javanian:
javanian@ubuntu:/home$ sudo mkdir document
javanian@ubuntu:/home$ ll
total 20
drwxr-xr-x  5 root     root     4096 Feb 20 07:00 ./
drwxr-xr-x 19 root     root     4096 Feb 15 03:43 ../
drwxr-xr-x  2 root     root     4096 Feb 20 07:00 document/
drwxr-xr-x  2 root     root     4096 Feb 20 06:57 download/
drwxrwxr--  6 javanian javanian 4096 Feb 20 04:59 javanian/
javanian@ubuntu:/home$

 

javanian@ubuntu:/home$ sudo chmod go+w download
javanian@ubuntu:/home$ ll
total 20
drwxr-xr-x  5 root     root     4096 Feb 20 07:00 ./
drwxr-xr-x 19 root     root     4096 Feb 15 03:43 ../
drwxr-xr-x  2 root     root     4096 Feb 20 07:00 document/
drwxrwxrwx  2 root     root     4096 Feb 20 06:57 download/
drwxrwxr--  6 javanian javanian 4096 Feb 20 09:31 javanian/
javanian@ubuntu:/home$

 

 

FTP를 이용하여 서버로 파일 복사

 

 

관련 패키지 설치

 

※ rpm 파일은 레드햇 패키지 관리자에서 사용되는 파일입니다.

   그래서, 데비안(Ubuntu)에서 사용할 수 있도록 deb 파일로 변환합니다.

 - $ alien [패키지이름.rpm]

 - 만약, 패키지에 alien이 설치되어 있지 않으면 먼저 설치한다.

 - $ sudo apt install alien

 

 - 관련 패키지 다운로드

javanian@ubuntu:/home/download$ sudo apt-get -y install alien libaio1 unixodbc

 

javanian@ubuntu:/home/download$ sudo dpkg -l alien
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==========================================
ii  alien          8.95.5       all          convert and install rpm and other packages
javanian@ubuntu:/home/download$ sudo dpkg -l libaio1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-================================================
ii  libaio1:amd64  0.3.112-13build1 amd64        Linux kernel AIO access library - shared library
javanian@ubuntu:/home/download$ sudo dpkg -l unixodbc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  unixodbc       2.3.9-5      amd64        Basic ODBC tools
javanian@ubuntu:/home/download$

 

 - rpm 파일을 deb파일로 변환

javanian@ubuntu:/home/download$ sudo alien --scripts -d oracle*

javanian@ubuntu:/home/download$ alien --help
Usage: alien [options] file [...]
  file [...]                Package file or files to convert.
  -d, --to-deb              Generate a Debian deb package (default).
     Enables these options:
       --patch=<patch>      Specify patch file to use instead of automatically
                            looking for patch in /var/lib/alien.
       --nopatch            Do not use patches.
       --anypatch           Use even old version os patches.
       -s, --single         Like --generate, but do not create .orig
                            directory.
       --fixperms           Munge/fix permissions and owners.
       --test               Test generated packages with lintian.
  -r, --to-rpm              Generate a Red Hat rpm package.
      --to-slp              Generate a Stampede slp package.
  -l, --to-lsb              Generate a LSB package.
  -t, --to-tgz              Generate a Slackware tgz package.
     Enables these options:
       --description=<desc> Specify package description.
       --version=<version>  Specify package version.
  -p, --to-pkg              Generate a Solaris pkg package.
  -i, --install             Install generated package.
  -g, --generate            Generate build tree, but do not build package.
  -c, --scripts             Include scripts in package.
      --target=<arch>       Set architecture of the generated package.
  -v, --verbose             Display each command alien runs.
      --veryverbose         Be verbose, and also display output of run commands.
  -k, --keep-version        Do not change version of generated package.
      --bump=number         Increment package version by this number.
  -h, --help                Display this help message.
  -V, --version             Display alien's version number.

javanian@ubuntu:/home/download$

 

에러발생

oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY

 

 

 - 오라클 설치

javanian@ubuntu:/home/download$ dpkg --install oracle*.deb

 

 

 

728x90
반응형

+ Recent posts