System Installation With Internet Access on Ubuntu

Note

There is an example of installing the system on the Ubuntu 22.04 minimal installation server

Warning

Instruction is relevant for Universe MDM installations not older than version 6.9, since migration from Elasticsearch to Opensearch has been performed

Before you start:

Update the repository lists and install the main packages that allow you to work with files:

sudo apt update && sudo apt upgrade && \
sudo apt install mc vim -y

Installing Opensearch

It is recommended to install Opensearch 2.7.0 in a closed environment. For detailed instructions, see the link.

Installing PostgreSQL

  1. Pre-install the required packages:

    sudo apt install vim curl wget gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates -y
    
  2. Add the official repository:

    curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg && sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && sudo apt update
    
  3. Perform the installation:

    sudo apt install postgresql-12 -y
    
  4. PostgreSQL should start automatically - check the service startup:

    systemctl status postgresql@12-main.service
    
  5. The main postgresql cofigure files are located at /etc/postgresql/12/main/postgresql.conf and /etc/postgresql/12/main/pg_hba.conf.

  6. In /etc/postgresql/12/main/postgresql.conf, uncomment and change the following parameters: #listen_addresses = 'localhost' max_connections = 100 #max_prepared_transactions = 0 replace with listen_addresses = '*' max_connections = 1000 max_prepared_transactions = 300; port=5433 replace with port=5432.

  7. Sections of the /etc/postgresql/12/main/pg_hba.conf file should look as follows (parameters are allowed to suit individual needs):

    # Database administrative login by Unix domain socket
    local   all             postgres                                peer
    
    # TYPE  DATABASE        USER            ADDRESS                 METHOD
    
    # "local" is for Unix domain socket connections only
    local   all             all                                     md5
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            trust
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    local   replication     all                                     peer
    host    replication     all             127.0.0.1/32            scram-sha-256
    host    replication     all             ::1/128                 scram-sha-256
    
  8. After installation and configuration, change the password for the postgres user ('notpostgres' is the postgres user password):

    sudo su
    su postgres
    psql
    alter user postgres with password 'notpostgres';
    
  9. Create a database using the command:

    CREATE DATABASE universe;
    

Installing OpenJDK

Note

There is an installation example of openJDK 11

  • Perform the following commands:

    sudo apt install default-jre
    sudo apt install default-jdk
    
  • Check version:

    javac -version
    

Installing Tomcat

  1. Download the Tomcat 9 archive from the official website https://dlcdn.apache.org/tomcat/.

  2. Create a user:

    sudo useradd -m -U -s /bin/false tomcat
    
  3. Unpack the archive to the /opt: directory:

    sudo tar -xvf apache-tomcat-9.x.xx.tar.gz -C /opt/
    
  4. Go to the /opt folder, rename the folder name and give the rights to the tomcat user:

    cd /opt && mv apache-tomcat-9.x.xx tomcat-9 && chown -R tomcat:tomcat tomcat-9
    
  5. Create a tomcat systemd file at the path /etc/systemd/system/tomcat.service:

    sudo vi /etc/systemd/system/tomcat.service
    
  6. Fill the file with the following contents:

    [Unit]
    Description=Apache Tomcat Web Application Container
    After=network.target
    [Service]
    Type=forking
    Environment=JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
    Environment=CATALINA_PID=/opt/tomcat-9/temp/tomcat.pid
    Environment=CATALINA_HOME=/opt/tomcat-9
    Environment=CATALINA_BASE=/opt/tomcat-9
    Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
    Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
    ExecStart=/opt/tomcat-9/bin/startup.sh
    ExecStop=/opt/tomcat-9/bin/shutdown.sh
    User=tomcat
    Group=tomcat
    UMask=0007
    RestartSec=10
    Restart=always
    [Install]
    WantedBy=multi-user.target
    
  7. Save and get out:

    :wq
    
  8. Re-read demons:

    systemctl daemon-reload
    

Installing Universe App

Universe is installed offline. For detailed instructions, see the link.