OCI Linux

En esta sección se describen los pasos para configurar Oracle Cloud Agent y desplegar los plugins de JMS en una instancia informática de Oracle Linux mediante el script de instalación. Para instancias de Oracle Linux en diferentes regiones y/o arrendamientos, y otras plataformas de Linux soportadas, siga las instrucciones de Linux local para configurar Oracle Management Agent.
Nota

Requisitos:
  • Ejecute el script de instalación con sudo o acceso administrativo.
  • Asegúrese de que se ha agregado la siguiente política antes de ejecutar el script de instalación en instancias de OCI Linux.
     ALLOW dynamic-group JMS_DYNAMIC_GROUP TO MANAGE instances IN
        COMPARTMENT <instance_compartment_ocid>
Consulte Configuración de la instancia de OCI Linux para JMS para obtener instrucciones.
Nota

De forma predeterminada, la secuencia de comandos de instalación:
  • Genere un rastreador de uso con funcionalidad adicional para recopilar la propiedad user.name para identificar mejor las aplicaciones que se ejecutan en servidores de aplicaciones como WebLogic y Tomcat. Si no desea activar esta función, actualice el parámetro --enable-user-name=false en el script de instalación. Puede modificar el archivo de propiedades de Java Usage Tracker en el futuro para agregar o eliminar user.name de la sección additionalProperties.
  • Desactive el modo FIPS (Federal Information Processing Standards) para los plugins. Para activar el modo FIPS en los relams USGov, actualice el parámetro --enable-fips-mode=true en la secuencia de comandos de instalación.
  • Instale el agente con la frecuencia de telemetría predeterminada de MACS.

Ejecute el comando --help para ver la descripción de opciones como activar o desactivar el nombre de usuario, la configuración de proxy, FIPS, etc.

A continuación se muestran los parámetros opcionales junto con la descripción:

-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 on Application Servers like WebLogic and Tomcat servers. 
                              Default value is 'true'. 
--enable-fips-mode            Enable FIPS mode for plug-ins in USGov realms.
                              Format is --enable-fips-mode=true|false (for example, --enable-fips-mode=false).
                              Modify /etc/environment and create a line with ENV_AGENT_PLUGIN_FIPS_APPROVED=true or false.
                              Default value is false.
--install-management-agent    Installation of OMA on the OCI compute instance.                               
--uninstall-management-agent  Uninstallation of OMA on the OCI compute instance.                                 
--reinstall-management-agent  Force OMA installation on the OCI compute instance and remove existing OMA.
--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.
--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-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").
--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").
--use-agent-installer-path    Path to management agent installation file if it isn't in the same folder as the install script.
--use-java-path               Specify the Oracle Java 8 installation path for agent installation.  
                              If the path is not specified, the script will attempt to find a suitable Oracle Java 8 installation path from the file system. 
                              Format is --use-java-path={CUSTOM_PATH}(for example, --use-java-path=/usr/java/jdk1.8.0_361)).  
--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.   

Pasos

  1. (Comprobación de diagnóstico opcional) Navegue hasta la carpeta donde guardó el script de instalación. Ejecute el script con el siguiente comando:
    $ sudo bash ./JMS_YourFleetName_linux.sh --diagnostic
    Según el sistema operativo y el tipo de agente, los resultados serán similares a:

    Fallo de diagnóstico:

    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI endpoint? : No
    	Check your internet connection and proxy setting.
    Is clock sync with OCI platform? : Unknown
    	The clock sync check was skipped. Can't read headers as provided OCI endpoint is not reachable.
    Certificate verification has been passed? : Unknown
    	The certificate check was skipped. Can't read certificate as provided OCI endpoint is not reachable.
    Prerequisites for Oracle Cloud Agent were installed? : No
    	OCI Metadata and Instance Config are not available but are required for installation.
    	Try to manually install 'oci-metadata' and run the JMS_YourFleetName_linux_updated.sh script again.
    	Or force Management Agent installation on the instance using the '--install-mgmt-agent' argument.
    Meets Java requirement? : No
    	Management Agent requires a minimum Oracle JDK 1.8 (1.8.0_281). The recommended version is 1.8.0_361 or later.
    	Try to install Java manually and run the JMS_YourFleetName_linux_updated.sh script again.
    Valid Management Agent installer? : No
    	Found 0 files with the 'oracle.mgmt_agent*.rpm' pattern in the /home/opc folder.
    	Run the JMS_YourFleetName_linux_updated.sh script again with 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_linux_updated.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 /var/log/oracle/JMSInstallScript/JMSInstallScriptLogs-<date>.log
    El diagnóstico se ha realizado correctamente:
    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    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
    Meets Java requirement? : Yes
    Certified OS for Oracle Cloud Agent? : Yes
    Oracle Cloud Agent has been detected? : Yes
    =======================================================================================================================================================
    Diagnostics have finished running and no error occurred.
    
    A copy of this installation log can be found at /var/log/oracle/JMSInstallScript/JMSInstallScriptLogs-<date>.log

    Consulte Running Agent Installation Diagnostics para obtener la lista completa de preguntas con soluciones o recomendaciones.

  2. Navegue hasta la carpeta donde guardó el script de instalación. Ejecute el script con el siguiente comando:
    $ sudo bash ./JMS_YourFleetName_linux.sh
    Si la instalación se realiza correctamente, verá un mensaje similar al siguiente:
    ...
    Management Agent installation has been completed.
    Management Agent plugin 'Java Management Service' installation has been completed.
    Management Agent plugin 'Java Usage Tracking' installation has been completed.
    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>).
  3. (Opcional) Para verificar si el plugin de JMS se está ejecutando, ejecute el siguiente script en la máquina Linux:
    curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/
    donde 169.254.169.254 es la dirección IP del servicio de metadatos de instancia informática de OCI.
    Debe aparecer un mensaje similar al siguiente:
    
    {
     "desiredState": "ENABLED",
     "name": "Oracle Java Management Service"
    }
    
    
Los archivos log se encuentran en el directorio /var/log/oracle-cloud-agent/plugins/oci-jms/.