파일 임포트 에이전트 설정

파일 임포트 에이전트는 컴퓨터에서 실행되는 명령행 애플리케이션으로, 폴더 또는 네트워크 드라이브와 같은 모니터되는 파일 시스템 위치에서 콘텐츠를 임포트하기 위한 소스 역할을 합니다. 해당 위치의 콘텐츠를 모니터 및 캡처하고 프로시저에 정의된 규칙에 따라 후속 처리 및 공정을 위해 임포트 프로세서로 피드를 공급합니다.

소스가 모니터되는 폴더(모니터되는 전자메일 계정 아님)인 경우에만 로컬 컴퓨터에 파일 임포트 에이전트를 설치하고 실행해야 합니다. Capture 명령행 유틸리티는 서버 등록, 임포트 작업 구성 및 나열을 도울 수 있습니다.

파일 임포트 에이전트 다운로드 및 설치

모니터되는 폴더에서 파일을 임포트하기 전에 로컬 컴퓨터에 파일 임포트 에이전트를 설치해야 합니다.

시스템 요구사항

파일 임포트 에이전트는 Oracle JDK 버전 8u251 또는 이 애플리케이션을 설치할 당시 사용 가능한 최신 버전이 필요한 Java 애플리케이션입니다. 파일 임포트 에이전트는 Windows, Linux 및 Mac과 호환됩니다(Oracle JDK 8 and JRE 8 Certified System Configurations 참조).

파일 임포트 에이전트를 다운로드 및 설치하려면 다음과 같이 하십시오.
  1. Oracle Content Management 웹 인터페이스에 로그인하고 왼쪽 탐색 패널에서 관리 아래의 캡처를 누릅니다. 이 옵션이 보이지 않으면 필요한 액세스 권한이 없는 것입니다.
  2. Content Capture 프로시저 페이지에서 다운로드 아래의 Oracle Content Capture 파일 임포트 에이전트를 눌러 로컬 컴퓨터에 capture-agent.zip 파일을 다운로드합니다.
  3. ZIP 파일의 압축을 풉니다.
  4. <agent directory>\binPATH에 추가해야 합니다. agent directory는 capture-agent.zip 압축을 푼 폴더입니다. 압축을 푼 디렉토리에 CAPTURE_HOME 환경 변수를 설정하고 $CAPTURE_HOME\binPATH에 추가할 수도 있습니다.
    Mac:
    sudo ln -s <agent directory>/bin/capture /usr/local/bin/capture

    Windows:

    SystemPropertiesAdvanced.exe 파일을 실행하고 환경 변수를 편집한 다음 <agent directory>\binPATH 변수에 추가합니다.

  5. CAPTURE_JAVA_HOME 변수를 환경 변수로 설정하거나 <agent directory>/conf/agent.properties 파일에서 적합한 JDK 위치로 설정합니다.

파일 임포트 에이전트에 대한 Oracle IDCS(Identity Cloud Service) 애플리케이션 생성

파일 임포트 에이전트는 Oracle Content Management와 상호 작용하여 임포트 작업 구성을 검색하고 파일을 업로드합니다. 이는 RESTful 웹 서비스 호출을 통해 수행됩니다. API는 OAuth로 보호되므로 파일 임포트 에이전트를 사용하려면 OAuth 토큰이 필요합니다. IDCS 애플리케이션은 파일 임포트 에이전트가 해당 토큰을 생성할 수 있도록 허용합니다.

IDCS 애플리케이션을 생성하려면 다음과 같이 하십시오.
  1. 내 서비스 대시보드에 로그인합니다.
  2. Identity Cloud를 누릅니다.
  3. 서비스 인스턴스 URL을 복사합니다. 이 URL을 사용하면 Oracle Content Management 인스턴스에 액세스할 수 있습니다. 즉, 이 URL을 사용하여 서버가 설치된 후 서버를 등록할 수 있습니다.
  4. Identity Cloud Service 콘솔에서 탐색 드로어를 확장한 다음 애플리케이션을 누릅니다.
  5. 추가를 누릅니다.
  6. 애플리케이션 추가 페이지에서 기밀 애플리케이션을 누릅니다.
  7. 기밀 애플리케이션 추가 창의 앱 세부정보 창에서 애플리케이션에 대한 이름을 입력하고 다음을 누릅니다.
  8. 지금 이 애플리케이션을 클라이언트로 구성을 선택합니다.
  9. 권한 부여에서 리소스 소유자JWT 검증을 선택합니다.
  10. 토큰 발행 정책에서 인증된 리소스에 대해 모두를 선택하고 다음을 누릅니다.
  11. 리소스 탭에서 기본값을 그대로 적용하고 다음을 누릅니다.
  12. 웹 계층 정책 탭에서 기본값을 그대로 적용하고 다음을 누릅니다.
  13. 권한 부여 탭에서 기본값을 그대로 적용하고 다음을 누릅니다.
  14. 완료를 누릅니다.
    클라이언트 ID클라이언트 암호를 복사합니다. Capture 명령행 유틸리티에 서버를 등록할 때 필요합니다.
  15. 구성 탭에서 클라이언트 구성을 확장합니다.
  16. 토큰 발행 정책 섹션으로 아래로 스크롤하고 범위 추가를 누릅니다.
  17. 범위 선택 대화상자에서 Oracle Content Management 인스턴스를 찾고 >를 누릅니다.
  18. URL에 /urn:opc:...가 포함된 범위를 선택하고 추가를 누릅니다.
  19. 범위 URL을 복사합니다. Capture 명령행 유틸리티에 서버를 등록할 때 필요합니다.
  20. 저장을 누른 다음 활성화를 누릅니다.

IDCS 애플리케이션이 생성되었습니다. 계속해서 Capture 명령행 유틸리티에 서버를 등록할 수 있습니다.

파일 임포트 에이전트에 Oracle Content Management 등록

유틸리티가 Oracle Content Management 인스턴스로 구성된 임포트 작업을 인식하고 이 인스턴스로 파일을 업로드할 수 있도록 Oracle Content Management 인스턴스를 Capture 명령행 유틸리티에 등록해야 합니다.

Oracle Content Management를 등록하려면 다음과 같이 하십시오.
  1. 컴퓨터에 아직 설치하지 않은 경우 파일 임포트 에이전트 다운로드 및 설치를 수행합니다.
  2. Windows, Linux 또는 Mac 운영체제에서 다음 명령을 실행합니다.
    $ capture register-server <NAME> --endpoint https://<oracle content management instance name>.oraclecloud.com -u username -p 'password' --idcsurl https://<server name>.identity.oraclecloud.com/oauth2/v1/token --clientid sampleid --clientsecret sample-secret --scope https://<server name>:<port number>/urn:opc:cec:all
    
    • Oracle Content Management 인스턴스 URL: <oracle content management instance name>.oraclecloud.com

    • Oracle Content Management 인스턴스 URL에 대한 사용자 이름 및 비밀번호입니다.

      주:

      잠재적 보안 위협을 줄이려면 필요한 프로시저에 대해 Content Capture 롤 또는 권한만 지정된 파일 임포트 에이전트 특정 사용자를 생성하는 것이 좋습니다.
    • ID 서비스 인스턴스 URL: https://<server name>.identity.oraclecloud.com/oauth2/v1/token(IDCS 애플리케이션 생성 시 값을 복사함)

    • 클라이언트 ID: sampleid(IDCS 애플리케이션 생성 시 값을 복사함)

    • 클라이언트 암호: sample-secret(IDCS 애플리케이션 생성 시 값을 복사함)

    • 범위 URL: https://<server name>:<port number>/urn:opc:cec:all(IDCS 애플리케이션 생성 시 값을 복사함)

  3. 임포트 작업을 나열하는 명령을 실행하여 접속을 테스트합니다.
    $ capture list-import-jobs
    

    지정된 Oracle Content Management 인스턴스에 대한 Content Capture 프로시저에서 구성된 모든 폴더 및 파일 목록 임포트 작업의 목록이 표시됩니다.

Oracle Content Management를 등록하고 임포트 작업을 구성한 후 폴더에서 파일 임포트 구성 또는 목록 파일 임포트 구성을 수행합니다.

Capture 명령행 유틸리티 사용

capture 명령행 유틸리티를 통해 에이전트가 문서를 Oracle Content Management 저장소에 임포트할 수 있도록 파일 임포트 에이전트를 구성할 수 있습니다. 이 명령행 유틸리티는 파일 임포트 에이전트 사용 및 관리를 위한 명령을 제공합니다.

------------------------
capture
------------------------
usage : capture <command> [options]
Run capture <command> -h' to get the detailed help for the command.
Commands:  
capture create-encryption-key <file>     Create an encryption key to encrypt/decrypt password for servers.                       [alias:   cek]  
capture register-server <name>           Registers a CEC server                                                                  [alias:   rs]  
capture list-servers                     Lists registered servers                                                                [alias:   ls]  
capture list-import-jobs                 Lists all Import Jobs from server                                                       [alias:  lij]  
capture configure-import-job             Configures import job. Set Import Folder path. Enable or disable.                       [alias:  cij] 
capture trigger-import-job               Forces import job processing.                                                           [alias:  tij]
capture refresh-config                   Refresh configuration from server.                                                      [alias:   rc]
capture list-procedures                  Displays capture procedures.                                                            [alias:   lp]  
capture register-database <name>         Registers external database.                                                            [alias:   rd]  
capture deregister-database              Deregister previously registered database.                                              [alias:   dd]  
capture list-databases                   Displays registered databases and tables.                                               [alias:   ld]  
capture register-table                   Registers tables in a database.                                                         [alias:   rt]  
capture deregister-table                 Deregister previously registered table.                                                 [alias:   dt]
capture list-table-sync-jobs             Lists all Asset Sync Jobs from server.                                                  [alias: ltsj]
capture trigger-table-sync               Force table / asset synchronization.                                                    [alias:  tts]
capture start                            Starts import agent                                                                     [alias:    s]  
capture stop                             Stops import agent                                                                      [alias:    x]  
capture status                           Shows import agent status                                                               [alias:   st]  
capture help                             Shows this message                                                                      [alias:    h]

-----------------------------
capture create-encryption-key
-----------------------------
usage: create-encryption-key <file> [-h]
Create an encryption key to encrypt/decrypt password for servers and save to <file>.
Options: 
-h,--help   Show help
Example:  
capture create-encryption-key ~/.ceckey                      Create encryption key and save to file ~/.ceckey
------------------------
capture register-server
------------------------
usage: capture register-server <name> -e <endpoint> -u <user> -p <password> [-k <key>] [-i <idcsurl>] [-c <clientid>] [-s <clientsecret>] [-o <scope>] [-m <timeout>] [-h]
Registers a CEC server. Specify -e <endpoint> for the server URL. Specify -u <user> and -p <password> for connecting to the server. Optionally specify -k <key> to encrypt the password.
Optionally specify <idcsurl>, <clientid>, <clientsecret> and <scope> for integration with IDCS app.
Options: 
-e,--endpoint <endpoint>           Server endpoint 
-u,--user <user>                   User name 
-p,--password <password>           Password 
-k,--key <key>                     The key file used to encrypt the password 
-i,--idcsurl <idcsurl>             Oracle Identity Cloud Service Instance URL 
-c,--clientid <clientid>           Client ID 
-s,--clientsecret <clientsecret>   Client secret 
-o,--scope <scope>                 Scope -m,--timeout <timeout>             Timeout in millisecond when try to login to the server. Defaults to 30000ms 
-h,--help                          Show help
Examples:  
capture register-server server1 -e http://server1.com -u user1 -p password1 -i                         The server is a tenant on Oracle Public cloud  
http://idcs1.com -c clientid -s clientsecret -o https://primary-audience-and-scope  
capture register-server server1 -e http://server1.com -u user1 -p password1                            The server is a tenant on Oracle Public cloud  
capture register-server server1 -e http://server1.com -u user1 -p password1 -m 60000                   The timeout is set to 60 seconds  
capture register-server server1 -e http://server1.com -u user1 -p password1 -k ~/.mykey                The password will be encrypted
------------------------
capture list-servers
------------------------
usage: capture list-servers [-u <user>] [-f <pattern>] [-h]
Lists registered CEC servers. Optionally specify -u <user> and -f <pattern> to filter results based on user or server name.
Options: -u,--user <user>         User name 
-f,--pattern <pattern>   String to search in server name 
-h,--help                Show help
Examples:  
capture list-servers                                         Lists all registered servers  
capture list-servers -u user1                                Lists all registered servers linked to user 'user1'  
capture list-servers -f demo                                 Lists all registered servers whose name contains 'demo'
------------------------
capture list-import-jobs
------------------------
usage: capture list-import-jobs [-f] [-l] [-h]
Lists all Import Jobs from server. Optionally specify -f and -l to show only folder or list file import jobs.
Options: 
-f,--folder     Display only folder import jobs 
-l,--listfile   Display only list file import jobs 
-h,--help       Show help
Examples:  
capture list-import-jobs                                         Lists all import jobs  
capture list-import-jobs -f                                      Lists all folder import jobs  
capture list-import-jobs -l                                      Lists all list file import jobs
-----------------------------
capture configure-import-job
-----------------------------
usage: capture configure-import-job -s <server> [-i <import>] [-p <path>] [-e] [-E] [-d] [-D] [-h]
Configures the import job.  Specify -s <server> -i <importjobid> to select the server and import job. Optionally specify -p <path> to set the import folder path. 
Optionally specify -d to disable import job and -e to enable import job
Options: 
-s,--server <server>   Set server name associated with import job 
-i,--import <import>   Set Import Job Id 
-p,--path <path>       Set Local Import Folder Path 
-e,--enable            Enables specific import job 
-E,--enable-all        Enables all import jobs 
-d,--disable           Disables specific import job 
-D,--disable-all       Disables all import job 
-h,--help              Show help
Examples:  
capture configure-import-job -s prod -i import_id -p /Users/user1/data/      Sets the import directory  
capture configure-import-job -s prod -i import_id -e                         Enables a specific import job  
capture configure-import-job -s prod -D                                      Disables all import jobs  
capture configure-import-job -s prod -i import_id -d                         Disables a specific import job
------------------------
capture trigger-import-job
------------------------
usage: capture trigger-import-job -s <server> -i <import> [-h] 
Forces import job processing.  
Options: 
-s,--server <server>   Set server name associated with import job 
-i,--import <import>   Set Import Job Id 
-h,--help              Show help 
Examples:  capture trigger-import-job --server production --import xx-job-id-xx           Forces processing of specified import job
------------------------
capture refresh-config
------------------------
usage: capture refresh-config [-s <server>] [-h] Refresh configuration from server. 
Optionally specify -s to only refresh config for selected server. 
Options: 
-s,--server <server>   Specify the server 
-h,--help              Show help 
Examples:  
capture refresh-config                       Force refresh configuration for all servers  
capture refresh-config -s production         Force refresh configuration from specified server                        
------------------------
capture list-procedures
------------------------
usage: capture list-procedures -s <server> [-h] 
Lists capture procedures. Must specify -s <server> to select a server. 
Options: 
-s,--server <server>   Specify the server 
-h,--help              Show help 
Examples:  capture list-procedures -s ocetest                           Lists all capture procedures available for current user
------------------------
capture register-database
------------------------
usage: capture register-database <name> -s <server> -w <procedure> -c <connection> -u <user> -p <password> [-a] [-h] 
Registers on-prem database with Capture. Specify -c <connection> for the connection URL, -u <user> and -p <password> for connecting to the server. 
Options: 
-s,--server <server>           Specify the server 
-w,--procedure <procedure>     Set procedure to be associated with database 
-c,--connection <connection>   Database connection url 
-u,--user <user>               Database User name 
-p,--password <password>       Database Password 
-a,--attach                    Attach existing database 
-h,--help                      Show help 
Examples:  
capture register-database ebsdb -s server1 -w 1 -c jdbc:oracle:thin:@//host:port/service -u user1 -p pass         Register ebsdb with server1
------------------------
capture deregister-database
------------------------
usage: capture deregister-database  -s <server> -w <procedure> -d <database> [-e] [-h] 
Deregister previously registered database. Specify -s <server>, -w <procedure> and -d <database> to select the database. 
Options: 
-s,--server <server>         Specify the server 
-w,--procedure <procedure>   Procedure associated with database 
-d,--database <database>     Database to deregister 
-e,--detach                  Only detach 
-h,--help                    Show help 
Examples:  
capture deregister-database -s server1 -w 1 -d ebsdb                   Deregister VENDORS table from ebsdb database  
capture deregister-database -s server1 -w 1 -d ebsdb --detach          Detaches ebsdb database without deregistering it
------------------------
capture list-databases
------------------------
usage: capture list-databases -s <server> [-h] Lists registered databases and tables. Must specify -s <server> to select a server. 
Options: 
-s,--server <server>   Specify the server 
-h,--help              Show help 
Examples:  
capture list-databases -s ocetest     Lists all registered databased linked to server 'ocetest'  
------------------------
capture register-table
------------------------
usage: capture register-table -s <server> -w <procedure> -d <database> -t <table> [-m <schema>] [-h]
Registers table with Capture. Specify -s <server>, -w <procedure> and -d <database> to select the database. 
Options: 
-s,--server <server>         Specify the server 
-w,--procedure <procedure>   Specify the procedure 
-d,--database <database>     Specify the database 
-t,--table <table>           Table to sync 
-m,--schema <schema>         Override schema qualifier 
-h,--help                    Show help 
Examples:  
capture register-table -s server1 -w 1 -d ebsdb -t VENDORS                  Register VENDORS table from ebsdb database  
capture register-table -s server1 -w 1 -d ebsdb -t VENDORS -m SVR           Register VENDORS table from ebsdb database in SVR schema
------------------------
capture deregister-table
------------------------
usage: capture deregister-table -s <server> -w <procedure> -d <database> -t <table> [-m <schema>] [-h] 
Deregister table. Specify table details. 
Options: 
-s,--server <server>         Specify the server 
-w,--procedure <procedure>   Procedure associated with database 
-d,--database <database>     Specify the database 
-t,--table <table>           Table to sync 
-m,--schema <schema>         Override schema qualifier 
-h,--help                    Show help 
Examples:  capture deregister-table -s server1 -w 1 -d ebsdb -t VENDORS                      Deregister VENDORS table from ebsdb database      
------------------------
capture list-table-sync-jobs
------------------------
usage: capture list-table-sync-jobs [-r] [-h] Lists all Asset Sync Jobs from server. 
Options: 
-r,--refresh   Force refresh asset sync jobs from server 
-h,--help      Show help 
Examples:  
capture list-table-sync-jobs                                         Lists all asset sync jobs  
capture list-table-sync-jobs -r                                      Refresh asset sync jobs from server and list them
------------------------
capture trigger-table-sync
------------------------
usage: capture trigger-table-sync -s <server> -a <asset> [-h] 
Force table / asset synchronization.  
Options: 
-s,--server <server>   Set server name associated with table sync job 
-a,--asset <asset>     Set Asset Sync Job Id 
-h,--help              Show help 
Examples:  
capture trigger-table-sync -s production -i xx-123-sync-id-xx      Forces processing of asset synchronization job
------------------------
capture start
------------------------
usage: capture start [-h]
Starts capture agent. 
Options: 
-h,--help   Show help
Examples:  
capture start                                                Starts capture agent if not running
------------------------
capture stop
------------------------
usage: capture stop [-h]
Stops capture agent. 
Options: 
-h,--help   Show help
Examples:  
capture stop                                                 Stops capture agent if currently running
------------------------
capture status
------------------------
usage: capture status [-s <server>] [-i <import>] [-u <user>] [-m <machine>] [-l <limit>] [-d <duration>] [-c | -p]  [-h] 
Display capture agent status and activity.  
Options: 
-s,--server <server>       Set Server name 
-i,--import <import>       Set Import Job name 
-u,--user <user>           Set user name. Defaults to current user 
-m,--machine <machine>     Set host name. Defaults to current hostname 
-l,--limit <limit>         Set number of results to return. Defaults to 200 
-d,--duration <duration>   Set duration period in hours 
-c,--completed             Display only completed uploads 
-p,--pending               Display only pending uploads 
-h,--help                  Show help 
Examples:  
capture status                             Display capture agent status  
capture status -u user@example.com         Show upload activity for user : user@example.com  
capture status -i Invoices                 Show upload activity for Invoices import job  
capture status -m myhost.example.com       Show upload activity for a specific host / machine  
capture status -p                          Show uploads pending completion  
capture status -c                          Show completed uploads
------------------------
capture version
------------------------
usage: capture version [-h] 
Displays capture version details. 
Options: 
-h,--help    Show help 
Example:  
capture  version                  Display Capture Agent version