4.4.1 DB 19cスタンドアロンでのOML4Pyの1.0から2.0へのアップグレード

オンプレミスのOracle Database 19cまたは21cにOML4Pyサーバー1.0がすでにインストールされている場合は、OML4Py 2.0サーバーPerlスクリプトを実行してOML4Pyサーバーを2.0にアップグレードできます。

次の手順では、OML4Pyサーバー2.0にアップグレードする方法について説明します:

  1. oml4pyというディレクトリが$ORACLE_HOMEディレクトリに存在するかどうかを確認します。
    • oml4pyディレクトリが$ORACLE_HOMEディレクトリに存在しない場合は、それを作成します。
      mkdir $ORACLE_HOME/oml4py
    • oml4pyディレクトリがすでに存在する場合は、そのサーバー・フォルダをクリーン・アップします。
      rm -rf $ORACLE_HOME/oml4py/server
  2. システムのインストール・ファイルをダウンロードします。
    1. Oracle Technology Networkの「Oracle Machine Learning for Python Downloads」ページにアクセスします。
    2. ライセンス契約に同意し、Oracle Machine Learning for Python Downloads (v2.0)を選択します。
    3. Oracle Machine Learning for Python Server Install for Oracle Database on Linux 64 bitを選択します。
    4. ファイルを$ORACLE_HOME/oml4pyディレクトリに保存します。
  3. インストール・ファイルを$ORACLE_HOME/oml4pyディレクトリに抽出するには、次のコマンドを使用します。
     unzip oml4py-server-linux-x86_64-2.0.zip -d $ORACLE_HOME/oml4py
  4. インストールされたomlモジュールをPythonで検出できるように、サーバー・インストール・スクリプトを実行する前にPYTHONPATH環境変数を設定します。
    export PYTHONPATH=$ORACLE_HOME/oml4py/modules
  5. $ORACLE_HOME/oml4pyディレクトリから、サーバー・インストールperlスクリプトを実行してアップグレードします。次のコマンドは、スクリプトを対話モードで実行します。
    perl -Iserver server/server.pl
  6. このPerlスクリプトにより、既存のバージョン1.0が検出され、2.0へのアップグレードに進むかどうかを尋ねられます。yまたはyesを入力します。アップグレードに成功した場合の出力は次のとおりです:
    Oracle Machine Learning for Python 2.0 Server.
    
    Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights
    reserved.
    
    Checking platform .................. Pass
    Checking ORACLE_HOME ............... Pass
    Checking ORACLE_SID ................ Pass
    Checking sqlplus ................... Pass
    Checking ORACLE instance ........... Pass
    Checking CDB/PDB ................... Pass
    Checking OML4Py Server ............. Pass
    Checking Python .................... Pass
    Checking module dependencies ....... Pass
    Checking Python libraries .......... Pass
    Checking OML4Py version ............ Pass
    
    Current configuration
      ORACLE_HOME ...................... /u01/app/oracle/product/19.3/dbhome_1
      ORACLE_SID ....................... orcl
      Python Version ................... 3.12.0
      PYTHONHOME ....................... /u01/app/oracle/product/19.3/dbhome_1/python
      Existing OML4Py data and code .... 1.0
      Existing OML4Py embed component .. 1.0
      Existing OML4Py module version ... 1.0
      Upgrading to OML4Py .............. 2.0
        
      Operation ........................ Upgrade
        
    Proceed? [yes]y
    
    Found existing installation: oml 1.0
    Uninstalling oml-1.0:
      Successfully uninstalled oml-1.0
    Removing embedded python libraries .. Pass
    Copying embedded python libraries ... Pass
    Processing ./server/oml-2.0-cp312-cp312-linux_x86_64.whl
    Installing collected packages: oml
    Successfully installed oml-2.0
    
    Upgrading PYQSYS 1.0 to 2.0 ......... Pass
    
    Done