In locale macOS

In questa sezione vengono descritti i passi per impostare Oracle Management Agent e distribuire i plugin JMS sull'host macOS utilizzando lo script di installazione.

I prerequisiti

Eseguire lo script di installazione con sudo o accesso amministrativo e concedere l'autorizzazione Full Disk Access.

Nota

Per impostazione predefinita, lo script di installazione consente di:
  • Genera un tracker sull'utilizzo con funzionalità aggiuntive per raccogliere la proprietà user.name per una migliore identificazione delle applicazioni in esecuzione su Application Server come WebLogic e Tomcat. Se non si desidera abilitare questa funzione, aggiornare il parametro --enable-user-name=false nello script di installazione. È possibile modificare il file delle proprietà di Java Usage Tracker in futuro per aggiungere o rimuovere user.name dalla sezione additionalProperties.
  • Disabilitare la modalità FIPS (Federal Information Processing Standards) per i plugin. Per abilitare la modalità FIPS nelle relazioni USGov, aggiornare il parametro --enable-fips-mode=true nello script di installazione.
  • Installare l'agente con frequenza di telemetria JMS inferiore.

Eseguire il comando --help per visualizzare la descrizione di opzioni quali l'abilitazione o la disabilitazione di nome utente, impostazioni proxy, FIPS e così via.

Di seguito sono riportati i parametri facoltativi insieme alla descrizione.

-u, --uninstall             Uninstall plug-ins, delete configuration files or restore originals from backups and exit.
-r, --reinstall             Uninstall plug-ins, delete configuration files or restore originals from backups and continue installation.
-h, --help                  Print usage message end exit.
--diagnostic                Determines if prerequisite conditions are met on the host machine to allow for successful agent installation or upgradation, and plug-in deployment. 
                            Installation attempt will be skipped.
--enable-user-name          Generate usage tracker with additional functionality to collect the user.name property for better
                            identification of applications running in Application Servers like Weblogic and Tomcat servers.
                            If you want to disable this feature, update the parameter --enable-user-name=false in the installation script.
                            Alternatively, modify /Library/Application Support/Oracle/Java/usagetracker.properties and add or remove 'user.name' in 				    'additionalProperties'.
                            Default value is true.
--enable-fips-mode          Enable FIPS mode for plugins in USGov realms.
                            Format is --enable-fips-mode=true|false (for example, --enable-fips-mode=false).
                            Modify /etc/bashrc and create a line with ENV_AGENT_PLUGIN_FIPS_APPROVED=true or false.
                            Without this parameter script won't change anything in /etc/bashrc file.
--ignore-unsupported        The setup will proceed on an unsupported platform. 
                            Installation might be successful, but not all functionality might work as intended.
--proxy-host                Add proxy host to curl commands, add or replace line 'ProxyHost = VALUE' in install key before Management Agent setup.
                            Format is --proxy-host="VALUE" (for example, --proxy-host="100.0.0.10").
                            Default is no proxy. All proxy parameters are optional.
--proxy-port                Add proxy port to curl commands, add or replace line 'ProxyPort = VALUE' in install key before Management Agent setup.
                            Format is --proxy-port="VALUE" (for example, --proxy-port="8050").
--proxy-password            Add proxy password to curl commands, add or replace line 'ProxyPassword = VALUE' in install key before Management Agent 				    setup.
                            Format is --proxy-password="VALUE" (for example, --proxy-password="example").
--proxy-realm               Add or replace line 'ProxyRealm = VALUE' in install key before Management  Agent setup.
                            Format is --proxy-realm="VALUE" (for example, --proxy-realm="OC1").
--proxy-user                Add proxy user to curl commands, add or replace line 'ProxyUser = VALUE' in install key before Management Agent setup.
                            Format is --proxy-user="VALUE" (for example, --proxy-user="opc").
--use-agent-installer-path  Use this file to setup Management Agent. Optional parameter.
                            If exists, script won't try to find installation files in current folder.
--use-java-path             Use the Java Installation on this path to set up Management Agent. Optional parameter
                            Format is --use-java-path="JAVA_PATH" 
                            (for example, --use-java-path=/Library/Java/JavaVirtualMachines/jdk1.8.0361.jdk/Contents/Home).
--use-agent-display-name    Specify the name to be displayed on the MACS console of your Management Agent.
                            If the name is not specified, the script will generate the name automatically.
 

Passi

  1. (Controllo diagnostico facoltativo) Passare alla cartella in cui sono stati salvati lo script di installazione e il software del Management Agent. Eseguire lo script utilizzando il comando seguente:
    $ sudo bash ./JMS_YourFleetName_macos.sh --diagnostic
    A seconda del sistema operativo e del tipo di agente, i risultati saranno simili a:

    Diagnostica non riuscita:

    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI endpoint? : Yes
    Certificate verification has been passed? : Yes
    Is clock sync with OCI platform? : Yes
    Available Java for agent installation ? : Yes
    Management Agent installer available? : No
    	Script JMS_YourFleetName_macos.sh can't find the Management Agent installer /kkk.
    	Check if the path /kkk exists and check the '--use-agent-installer-path' parameter.
    Existing Management Agent has been detected? : No
    ================================================================================
    Diagnostics have failed. Please resolve all issues and run script JMS_YourFleetName_macos.sh again.
    Please refer troubleshooting guide https://docs.oracle.com/en-us/iaas/jms/doc/troubleshooting.html for more details.
    
    A copy of this installation log can be found at /Library/Oracle/JMSInstallScript/JMSInstallScriptLogs-<date>.log
    
    Diagnostica completata e riuscita:
    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    User has sudo/root privileges? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI endpoint? : Yes
    Certificate verification has been passed? : Yes
    Is clock sync with OCI platform? : Yes
    Existing Management Agent has been detected? : No
    Available Java for agent installation ? : Yes
    Management Agent installer available? : Yes
    ======================================================================================================
    Diagnostics have finished running and no error occurred.

    Per l'elenco completo dei criteri controllati durante la diagnostica, insieme alle soluzioni o ai suggerimenti, vedere Esecuzione della diagnostica dell'installazione dell'agente.

  2. Passare alla cartella in cui sono stati salvati lo script di installazione e il software del Management Agent. Eseguire lo script utilizzando il comando seguente:
    $ sudo bash ./JMS_YourFleetName_macos.sh
    • Se l'installazione ha esito positivo, verrà visualizzato un messaggio simile al seguente:
      ...
      Management Agent installation has been completed with 'Java Usage Tracking service plugin (Service.plugin.jms)'
      JMS basic features will be enabled on this instance.
      Management Agent installation has been completed with 'Java Management service plugin (Service.plugin.jm)'
      JMS advanced features can be enabled on this instance.
      Management Agent was successfully registered using key YourFleetName (ocid1.managementagentinstallkey.oc1.iad.<ocid hash>).Assigned JMS Fleet is YourFleetName (ocid1.jmsfleet.oc1.iad.<ocid hash>).
      
    • Se l'agente è già installato, lo script aggiornerà il software dell'agente alla versione più recente, se applicabile. Se i plugin JMS non sono ancora stati distribuiti, distribuire manualmente i plugin Java Usage Tracking e Java Management Service, come descritto nella pagina Distribuisci un plugin servizio utilizzando gli agenti. In alternativa, è possibile reinstallare l'agente insieme alla distribuzione del plugin JMS; eseguire lo script con il parametro --force.
  3. (Facoltativo) Per verificare se il Management Agent è in esecuzione, digitare:
    $ sudo launchctl print system/com.oracle.macs.agent.mgmt_agent | grep state
    I risultati mostreranno:
    state = running

    È inoltre possibile visualizzare la console per verificare se il Management Agent è in esecuzione. Per ulteriori informazioni, vedere Panoramica della console dei Management Agent.

    I file di log si trovano nella directory /Library/Oracle/mgmt_agent/plugins/jm/stateDir/log.