1. Installation

2. Configuration

  • Start the computer.

  • Type the passphrase to unlock the computer.

  • Log in as smru with the default live password.

  • Enter the following commands at a Command Line.

    ip address
  • Log in as smru with the default live password using PuTTY.

  • Enter the following commands at a Command Line.

    sudo su -                               # Get root privileges.
    passwd                                  # Set root password to level 1.
    passwd smru                             # Set smru password to level 2.
  • Enter the following commands at a Command Line with root privileges.

    smru config sudo                        # Install and configure sudo for each user.
    smru config legacy-ethernet 10.30.1.2 10.30.1.170 10.30.1.1 test.shoklo-unit.com
  • Restart the computer.

  • Log in as smru using PuTTY.

  • Enter the following commands at a Command Line.

    ip address
    ip link list
    sudo systemctl --type service
    ls -al /etc/resolv.conf
    cat /etc/resolv.conf
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    sudo apt-get autoremove
    sudo apt-get autoclean
    
    cat /etc/debian_version
    df
    
    sudo smru setup vim                     # Install and configure vim editor for each user.
    sudo check-syslog                       # Check /var/log/syslog for possible remaining issues.

3. CrowdStrike Sensor

4. ANC Server

  • Enter the following commands at a Command Line.

    sudo smru setup apache                  # Install and configure apache http server.
    sudo smru setup exim                    # Install and configure exim message transfer agent.
    sudo smru setup php                     # Install and configure php.
    sudo smru setup postgresql              # Install and configure postgresql database server.
    sudo smru setup samba Other$            # Install and configure samba with Other$ share.

4.1. ANC Debian Packages

  • Enter the following commands at a Command Line.

    sudo apt-get --yes install fakeroot groff make
    
    sudo smru setup git                     # Install and configure git.
    sudo smru setup nodejs-18               # Install and configure nodejs.
    sudo smru setup jshint                  # Install and configure jshint.
    sudo smru setup jslint                  # Install and configure jslint.
    
    # Packages needed for data dictionary.
    sudo smru setup jre-headless            # Install and configure headless java runtime environment.
    
    sudo apt-get --yes install graphviz
    sudo apt-get install p7zip p7zip-full p7zip-rar
    # Get source code from GitHub repository.
    mkdir -p ~/github/git/delta-software-labs
    cd ~/github/git/delta-software-labs
    git clone https://delta-software-labs@github.com/delta-software-labs/ANC-Application.git
    cd ~/github/git/delta-software-labs/ANC-Application
    make
    make clean
    make clean-all
    make check
    
    # Note: The smru-anc-data-dictionary package build asks for the level 2 password.
    make all
    
    # Copy packages to SMRU repository server.
    make publish PUBLISH_TARGET=delta@tbhf-anc-tst:/home/delta

4.2. SMRU Repository

  • Enter the following commands at a Command Line.

    # Create an SMRU.key repository key with the level 2 password.
    sudo smru setup gnupg /root/.gnupg/SMRU.key     # Install and configure gnupg.
    sudo smru setup repository                      # Install and configure repository.
    
    # List debian packages in repository.
    cd /var/www/html/debian
    sudo reprepro list smru
    
    # Remove existing packages from repository.
    packages=$(sudo reprepro list smru | sed -e 's/^.*: //g' | sed -e 's/ .*$//g')
    for package in "$packages"; do sudo reprepro remove smru $package; done         # Use level 2 password.
    
    # Add debian packages to new repository.
    sudo reprepro export                                                            # Use level 2 password.
    packages=$(ls /home/delta/smru-*.deb)
    for package in "$packages"; do sudo reprepro includedeb smru $package; done     # Use level 2 password.
    sudo reprepro list smru
    cd -
    sudo smru config apt tbhf-anc-tst               # Make this computer the SMRU repository server.
    sudo apt-get update

4.3. ANC Application

  • Enter the following commands at a Command Line.

    sudo smru setup anc-application
  • Browse to http://10.30.1.2/anc-app.

    cd /var/www/html/anc-app
    php -a
    require('cerise/cCerise.php');
    print cCerise::run('config/cerise.ini')->send();
    quit
    PHP Warning:  session_start(): Cannot start session when headers already sent in /var/www/html/anc-app/controllers/BaseController.php on line 46
    PHP Notice:  Undefined index: SERVER_NAME in /var/www/html/anc-app/controllers/Main.php on line 29
    PHP Notice:  Undefined index: SERVER_NAME in /var/www/html/anc-app/controllers/Main.php on line 29
    PHP Notice:  Undefined index: SERVER_NAME in /var/www/html/anc-app/controllers/Main.php on line 32
    PHP Notice:  Undefined index: SERVER_NAME in /var/www/html/anc-app/controllers/Main.php on line 32
    PHP Warning:  Uncaught Error: Call to a member function prepare() on null in /var/www/html/anc-app/controllers/Main.php:41
    Stack trace:
    #0 /var/www/html/anc-app/cerise/core/cDispatcher.php(36): Main->index()
    #1 /var/www/html/anc-app/cerise/cCerise.php(59): cDispatcher->dispatch()
    #2 php shell code(1): cCerise::run()
    #3 {main}
      thrown in /var/www/html/anc-app/controllers/Main.php on line 41
    php > quit