# Single Node Installation

## Single Node Install Overview

In a Single Host/All-in-one configuration, all components required for Morpheus are automatically installed and configured during the Morpheus `reconfigure` command.

![../../../_images/morpharchSingleV3.png](https://support.hpe.com/hpesc/public/api/document/sd00007621en_us/GUID-37BE6AA0-10E5-4D0D-BCC1-0834A578B1EC-high.png)

Appliance Host
:   - Application
      :   - Morpheus App
    - Web Server/Proxy
      :   - NGINX
    - Database
      :   - MySQL
    - Messaging
      :   - RabbitMQ
    - Search
      :   - Opensearch
    - Console
      :   - Guacamole
    - Monitoring
      :   - Check Server

### Default Paths

HPE Morpheus Enterprise follows several install location conventions. Below is a list of the system paths.

IMPORTANT

Altering the default system paths is not supported and may break functionality.

- Installation Location: `/opt/morpheus`
- Log Location: `/var/log/morpheus`

  - Morpheus-UI: `/var/log/morpheus/morpheus-ui`
  - MySQL: `/var/log/morpheus/mysql`
  - NginX: `/var/log/morpheus/nginx`
  - Check Server: `/var/log/morpheus/check-server`
  - OpenSearch: `/var/log/morpheus/opensearch`
  - RabbitMQ: `/var/log/morpheus/rabbitmq`
- User-defined install/config: `/etc/morpheus/morpheus.rb`

## Single Node Install on CentOS

NOTE

Appliance Package links are available at <https://app.morpheushub.com> in the downloads section.

### Quick Install

#### Procedure

Install the Appliance package and run `sudo morpheus-ctl reconfigure`.

#### Results

That is it. After the reconfigure completes, HPE Morpheus Enterprise will start and be available at `https://your_machine_name` in a minute or few.

### Step-by-step Install Instructions

#### Procedure

1. Ensure the HPE Morpheus Enterprise Appliance host meets the minimum [requirements](https://support.hpe.com/hpesc/public/api/document/sd00007621en_us/render?page=GUID-A3332B9C-D74E-4095-AE33-18F65AB33A7A.html)
2. Download the target version `.rpm` package for installation in a directory of your choosing. The package can be removed after successful installation. 

   ```
   ```
   wget https://www.hpe.com/support/hpesc/path/to/morpheus-appliance-$version.rpm
   ```
   ```
3. Validate the package checksum matches source checksums. For example: 

   ```
   ```
   sha256sum morpheus-appliance-$version.rpm
   ```
   ```
4. Next install the rpm package 

   ```
   ```
   sudo rpm -ihv morpheus-appliance-x.x.x-1.x86_64.rpm
   ```
   ```
5. By default the appliance\_url uses the machines hostname, ie `https://your_machine_name`. The default url can be changed by editing `/etc/morpheus/morpheus.rb` and changing the value of `appliance_url`. Additional Appliance configuration options are available below. 

   Appliance Configuration Options

   Morpheus allows for additional advanced customizations for system managed services within the morpheus.rb file located in `/etc/morpheus/morpheus.rb`. Below is a list of the supported items available in the `morpheus.rb` file.

   NOTE

   Service configuration settings are not applicable for externalized services such as external MySQL, Opensearch or RabbitMQ clusters. Only connection settings are applicable for external services. Additionally, to configure HPE Morpheus Enterprise to utilize alternate ports for SSL, you may have to take additional configuration steps if simply appending a port to your `appliance_url` value doesn’t work.

   ```
   ```
   app['encryption_key_suffix'] = '$suffix'  
     # Replace $suffix with the suffix string of your choice. See `https://docs.morpheusdata.com/en/latest/getting_started/additional/encryption.html` for important details and warnings.  
   appliance_url 'https://morpheus.appliance-url.com'  
     # Appending alternate port to appliance_url is supported. ie 'https://morpheus.appliance-url.com:8443'  
     # The appliance_url cannot exceed 64 characters  
     # The appliance_url must not contain a trailing `/`.  
   bitcan['backup_directory'] = '/var/opt/morpheus/bitcan/backups'  
   bitcan['working_directory'] = '/var/opt/morpheus/bitcan/working'  
   opensearch['auth_password'] = 'xxxxxxxxxxxxxxxx'  
   opensearch['auth_user'] = 'morpheus-es-user'  
   opensearch['enable'] = true  
   opensearch['es_hosts'] = {'127.0.0.1' => 9200}  
   opensearch['host'] = "127.0.0.1"  
   opensearch['port'] = "9200"  
   opensearch['tmp_dir'] = '/var/tmp/opensearch'  
   opensearch['use_tls'] = false  
   ↓ The following opensearch settings are only valid for Internal/Embedded opensearch services  
   opensearch['log_dir'] = '/var/log/morpheus/opensearch'  
   opensearch['memory_alloc_arena_max'] = 2  
   opensearch['memory_map_max'] = 65536  
   opensearch['memory_map_threshold'] = 131072  
   opensearch['memory_top_pad'] = 131072  
   opensearch['memory_trim_threshold'] = 131072  
   opensearch['open_files'] = 204800  
   opensearch['secure_mode'] = false  
   opensearch['xms'] = 0.25 #### Configurable for customers running into high memory issues, values are the percentage of total RAM. Both ui and es xms/xmx config only apply if Opensearch is enabled.  
   opensearch['xmx'] = 0.25  
   guacd['guacamole_enabled'] = false  
   guacd['host'] = localhost #### The host guacd is listening on, if not configured 'localhost' is the default value  
   logging['svlogd_num'] = 30 #### keep 30 rotated log files  
   logging['svlogd_size'] = 209715200 #### 200 MB in bytes  
   logging['svlogd_timeout'] = 86400 #### rotate after 24 hours in seconds  
   mysql['enable'] = true  
   mysql['host'] = {'127.0.0.1' => 3306}  
   mysql['use_tls'] = false  
   mysql['morpheus_db_user'] = 'morpheus-db-user'  
   mysql['morpheus_password'] = 'morpheus-db-password'  
   mysql['morpheus_db'] = 'xxxxxxxxxxxxxxxx'  
   mysql['mysql_url_overide'] = 'jdbc:mysql://10.30.20.10:3306,10.30.20.11:3306,10.30.20.12:3306/morpheusdb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&failOverReadOnly=false&useSSL=false'  
   ↓ The following mysql settings are only valid for Internal/Embedded mysql services  
   mysql['tmp_dir'] = '/tmp/mysql'  
   mysql['log_dir'] = '/var/log/morpheus/mysql'  
   mysql['max_active'] = 150 # The combined value off all app node max_active values must be lower than max_connections setting in mysql  
   mysql['max_connections'] = 151  
   mysql['max_allowed_packet'] = 67108864  
   mysql['mysql_connect_timeout'] = 60000  
   mysql['mysql_max_reconnects'] = 2  
   mysql['mysql_queries_before_retry_source'] = 0  
   mysql['mysql_seconds_before_retry_source'] = 300  
   nginx['cache_max_size'] = '5000m'  
   nginx['enable'] = true  
   nginx['loading_pages']['failure_page_h1'] = 'Morpheus Server Error'  
   nginx['loading_pages']['failure_page_h2'] = 'Please contact your system administrator for assistance.'  
   nginx['loading_pages']['failure_page_title'] = 'Morpheus Server Error'  
   nginx['loading_pages']['iteration_time'] = 10000 # milliseconds  
   nginx['loading_pages']['loading_page_h1'] = 'Morpheus is Loading...'  
   nginx['loading_pages']['loading_page_h2'] = 'please wait'  
   nginx['loading_pages']['loading_page_title'] = 'Morpheus Loading'  
   nginx['loading_pages']['max_loops'] = 60 # seconds  
   nginx['loading_pages']['timeout_page'] = '/timeout.html'  
   nginx['loading_pages']['timout_page_h1'] = 'Timeout waiting for Morpheus to load, click below to try again.'  
   nginx['loading_pages']['timout_page_title'] = 'Morpheus timeout, please try again...'  
   nginx['log_format_name'] = 'custom'  
   nginx['log_format'] = '\'$remote_addr - $remote_user [$time_local] "$request" \' \'$status $body_bytes_sent "$http_referer" \' \'"$http_user_agent" "$http_x_forwarded_for" \' \'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"\';'  
   nginx['listen_ipv6'] = nil #### IPv6 will be added to ``morpheus.conf`` and ``morpheus-ssl.conf`` listeners if any value is set in morpheus.rb other than ``nil``, including "off" or false  
   nginx['ssl_ciphers'] = "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"  
   nginx['ssl_company_name'] = "Morpheus, LLC"  
   nginx['ssl_country_name'] = "US"  
   nginx['ssl_email_address'] = "personal@email.com"  
   nginx['ssl_locality_name'] = "San Mateo"  
   nginx['ssl_organizational_unit_name'] = "DevOps"  
   nginx['ssl_protocols'] = "TLSv1 TLSv1.1 TLSv1.2"  
   nginx['ssl_session_cache'] = "builtin:1000  shared:SSL:10m"  
   nginx['ssl_session_timeout'] = "5m"  
   nginx['ssl_state_name'] = "CA"  
   nginx['worker_connections'] = 10240  
   nginx['workers'] = integer calculated from number of cpus  
   nginx['ssl_access_ping_log'] = false #### false by default, when true GET requests to the ``/ping`` endpoint are logged in the ``/var/log/morpheus/nginx/morpheus-ssl-access.log`` file on the appliance  
   nginx['access_ping_log'] = false #### false by default, when true GET requests to the ``/ping`` endpoint are logged in the ``/var/log/morpheus/nginx/morpheus-ssl-access.log`` file on the appliance  
   rabbitmq['enable'] = true  
   rabbitmq['host'] = '127.0.0.1'  
   rabbitmq['port'] = '5672'  
   rabbitmq['queue_user_password'] = 'xxxxxxxxxxxxxxxx'  
   rabbitmq['queue_user'] = 'morpheus-rmq-user'  
   rabbitmq['vhost'] = 'morpheus'  
   ↓ The following rabbitmq settings are only valid for Internal/Embedded rabbitmq services  
   rabbitmq['heartbeat'] = nil  
   rabbitmq['log_dir'] = '/var/log/morpheus/rabbitmq'  
   rabbitmq['nodename'] = 'rabbit@localhost'  
   rabbitmq['port'] = '5672'  
   rabbitmq['use_tls'] = false  
   repo['repo_host_url'] = 'https://www.hpe.com/support/hpesc'  
   ui['http_client_connect_timeout'] = 10000  #### milliseconds  
   ui['jobs_enabled'] = true #### This option disables the appliance jobs service on the appliance node when set to false. This should be disabled only when configuring jobs to run on specific app nodes in HA environments.  
   ui['kerberos_config'] = nil  
   ui['kerberos_login_config'] = nil  
   ui['log_dir'] = '/var/log/morpheus/morpheus-ui'  
   ui['max_memory_mb'] = nil  
   ui['memory_alloc_arena_max'] = 2  
   ui['memory_map_max'] = 65536  
   ui['memory_map_threshold'] = 131072  
   ui['memory_top_pad'] = 131072  
   ui['memory_trim_threshold'] = 131072  
   ui['pxe_boot_enabled'] = false #### This option disables the PXE service within the app  
   ui['support_links'] = {  
     'name' => ['url', 'i18n'],  
     'name1' => ['url1', i18n1'],  
     'name2' => ['url2', i18n2']  
   } #### The internationalization configuration is optional. The result of this configuration are entries in the support dropdown menu in the upper bar of the application window which override the default entries.  
   ui['vm_images_cdn_url'] = 'https://morpheus-images.morpheusdata.com'  
   ui['xms'] = 0.25 #### Configurable for customers running into high memory issues, values are the percentage of total RAM. Both ui and es xms/xmx config only apply if Opensearch is enabled.  
   ui['xmx'] = 0.25
   ```
   ```
6. After all configuration options have been set, run: 

   ```
   ```
   sudo morpheus-ctl reconfigure
   ```
   ```

   NOTE

   Configuration options can be updated after the initial reconfigure by editing `/etc/morpheus/morpheus.rb` and running `sudo morpheus-ctl reconfigure` again. Appliance and other services may need to be restarted depending on configuration changes.
7. Once the installation is complete the morpheus-ui service will automatically start up and be available shortly. To monitor the UI startup process, run `morpheus-ctl tail morpheus-ui` and look for the ascii logo accompanied by the install version and start time: 

   ```
   ```
   timestamp:    __  ___              __  
   timestamp:   /  |/  /__  _______  / /  ___ __ _____  
   timestamp:  / /|_/ / _ \/ __/ _ \/ _ \/ -_) // (_-<  
   timestamp: /_/  /_/\___/_/ / .__/_//_/\__/\_,_/___/  
   timestamp: ****************************************  
   timestamp:   Version: |morphver|  
   timestamp:   Start Time: xxx xxx xxx 00:00:00 UTC 2021  
   timestamp: ****************************************
   ```
   ```

#### Results

There are additional install settings that can be viewed in the [Additional Configuration Options](https://support.hpe.com/hpesc/public/api/document/sd00007621en_us/render?page=GUID-6B95E888-6B01-47E2-AB6C-5357324DBAB5.html) section.

Once the browser is pointed to the appliance a first time setup wizard will be presented. Please follow the on screen instructions by creating the master account. From there you will be presented with the license settings page where a license can be applied for use (if a license is required you may request one or purchase one by contacting your sales representative).

More details on setting up infrastructure can be found throughout this guide.

TIP

If any issues occur it may be prudent to check the morpheus log for details at `/var/log/morpheus/morpheus-ui/current`.

## Single Node Install on Debian/Ubuntu

### About this task

To get started installing HPE Morpheus Enterprise on Ubuntu or Debian a few preparatory items should be addressed first.

### Procedure

First make sure the apt repository is up to date by running `sudo apt-get update`. It is advisable to verify the assigned hostname of the machine is self-resolvable. 

IMPORTANT

If the machine is unable to resolve its own hostname `nslookup hostname` some installation commands will be unable to verify service health during installation and fail.

### Results

1. Next simply download the relevant `.deb` package for installation. This package can be acquired from <https://app.morpheushub.com> downloads section.

   TIP

   Use the `wget` command to directly download the package to your appliance server. i.e. `wget https://www.hpe.com/support/hpesc/path/to/package/morpheus-appliance_x.x.x-1_amd64.deb`

1. Next we must install the package onto the machine and configure the morpheus services:

   ```
   ```
   sudo dpkg -i morpheus-appliance_x.x.x-1_amd64.deb  
   sudo morpheus-ctl reconfigure
   ```
   ```
2. Once the installation is complete the web interface will automatically start up. By default it will be resolvable at `https://your_machine_name` and in many cases this may not be resolvable from your browser. The url can be changed by editing `/etc/morpheus/morpheus.rb` and changing the value of `appliance_url`. After this has been changed simply run:

   ```
   ```
   sudo morpheus-ctl reconfigure  
   sudo morpheus-ctl stop morpheus-ui  
   sudo morpheus-ctl start morpheus-ui
   ```
   ```

   NOTE

   The morpheus-ui can take 2-3 minutes to startup before it becomes available.

There are additional install settings that can be viewed in the [Additional Configuration Options](https://support.hpe.com/hpesc/public/api/document/sd00007621en_us/render?page=GUID-6B95E888-6B01-47E2-AB6C-5357324DBAB5.html) section.

Once the browser is pointed to the appliance a first time setup wizard will be presented. Please follow the on screen instructions by creating the master account. From there you will be presented with the license settings page where a license can be applied for use (if a license is required you may request one or purchase one by contacting your sales representative).

More details on setting up infrastructure can be found throughout this guide.

TIP

If any issues occur it may be prudent to check the morpheus log for details at `/var/log/morpheus/morpheus-ui/current`.

## Single Node Install on RHEL

### About this task

To get started installing HPE Morpheus Enterprise on RHEL/RedHat a few prerequisite items are required.

### Procedure

1. Configure firewalld to allow access from users on 443 (Or remove firewall if not required).
2. Make sure the machine is self resolvable to its own hostname.
3. For RHEL 7.x, the Optional RPMs repo needs to be added for Reconfigure to succeed. It does not need to be added For RHEL 8.x, as the Optional RPMs repo is now part of the appstream repo that is enabled by default in RHEL 8.x. 

   - RHEL 7.x Amazon:`yum-config-manager --enable rhel-7-server-rhui-optional-rpms`
   - RHEL 7.x:`yum-config-manager --enable rhel-7-server-optional-rpms`

### Results

NOTE

For Amazon users a Redhat subscription is not required if the appropriate yum REGION repository is added instead as demonstrated above.

The RedHat Enterprise Linux server needs to be registered and activated with Redhat subscription. The server optional rpms repo needs to be enabled as well.

To check if the server has been activated please run the subscription-manager version. Subscription manager will return the version plus the python dependency version.

If the server has not been registered and activated then the subscription manager version will return the below message.

```
```
sudo subscription-manager version  
server type: This system is currently not registered  
subscription management server: 0.9.51.24.-1  
subscription-manager: 1.10.14-7.el7 python-rhsm: 1.10.12-2.el7
```
```

When a server has been registered and activated with Redhat the subscription manager will return the below message.

```
```
sudo subscription-manager version  
server type: Red Hat Subscription Management  
subscription management server: 0.9.51.24-1  
subscription-manager: 1.10.14-7.el7 python-rhsm: 1.10.12-2.el7
```
```

If the subscription manager re-turns the message `This system is currently not registered` please follow the below steps to register the server.

TIP

To register the server you will need to have sudo permissions [Member of the Wheel group] or root access to the server. You will also need your Redhat registered email address and password.

subscription-manager register

```
```
sudo subscription-manager register  
Username: redhat@example.com  
Password: . subscription-manager auto --attach
```
```

NOTE

This can take a minute to complete

```
```
sudo subscription-manager attach --auto  
Installed Product Current Status: Product Name: Red Hat Enterprise Linux  
Server Status: Subscribed
```
```

To check to see if the RHEL server has the Red Hat Enterprise Linux 7 Server - Optional (RPMs) repo enabled please run the following command to return the repo status.

TIP

To check the server repos you will need to have sudo permissions [Member of the Wheel group] or root access to the server.

```
```
sudo yum repolist all | grep "rhel-7-server-optional-rpms" rhel-7-server-optional-rpms/7Server/x86_64 disabled
```
```

If the repo status was returned as disabled then you will need to enable the repo using the subscription manager like below.

```
```
sudo subscription-manager repos --enable rhel-7-server-optional-rpms  
Repository 'rhel-7-server-optional-rpms' is enabled for this system.
```
```

The message `Repo 'rhel-7-server-optional-rpms' is enabled for this system.` will appear after enabling the repo. This will confirm that the repo has been enabled.

Next simply download the relevant `.rpm` package for installation. This package can be acquired from morpheushub.com.

TIP

Use the `wget` command to directly download the package to your appliance server. i.e. `wget https://www.hpe.com/support/hpesc/path/to/package.rpm`

Next we must install the package onto the machine and configure the morpheus services:

```
```
sudo rpm -i morpheus-appliance_x.x.x-1_amd64.rpm  
sudo morpheus-ctl reconfigure
```
```

Once the installation is complete the web interface will automatically start up. By default it will be resolvable at `https://your_machine_name` and in many cases this may not be resolvable from your browser. The url can be changed by editing `/etc/morpheus/morpheus.rb` and changing the value of `appliance_url`. After this has been changed simply run:

```
```
sudo morpheus-ctl reconfigure  
sudo morpheus-ctl stop morpheus-ui  
sudo morpheus-ctl start morpheus-ui
```
```

NOTE

The `morpheus-ui` can take 2-3 minutes to startup before it becomes available.

There are additional install settings that can be viewed in the [Additional Configuration Options](https://support.hpe.com/hpesc/public/api/document/sd00007621en_us/render?page=GUID-6B95E888-6B01-47E2-AB6C-5357324DBAB5.html) section.

Once the browser is pointed to the appliance a first time setup wizard will be presented. Please follow the on screen instructions by creating the master account. From there you will be presented with the license settings page where a license can be applied for use (if a license is required you may request one or purchase one by contacting your sales representative).

More details on setting up infrastructure can be found throughout this guide.

TIP

If any issues occur it may be prudent to check the morpheus log for details at `/var/log/morpheus/morpheus-ui/current`.
