J4Q5j


## STAGE I. DISCO. PREREQUISITES
--------------------------------

Install minimal Disco from ISO:

  ubuntu-19.04-desktop-amd64.iso

  Machine: Linux Ubuntu 64-bit
  RAM:     4096MB
  CPU:     4-cores
  GPU RAM: 128MB
  HDD:     Sata, 32GB
  Network: NAT

Post-installation steps:

  apt update && apt upgrade
  apt autoremove
  apt install net-tools tasksel -y
  sudo tasksel install lamp-server

Turn automatic upgrades OFF:

  Activities -> Software & Updates -> Updates
  [ ] Unsupported updates (disco-backports)

  Automatically check for updates: [ Never | v ]
  When there are security updates: [ Display immediately | v ]
  When there are other updates: [ Display immediately | v ]
  Notify me of a new Ubuntu version: [ Never | v ]

Then turn off daemons not in use.

  # systemctl stop unattended-upgrades.service
  # systemctl disable unattended-upgrades.service
  # systemctl disable avahi-daemon.socket avahi-daemon.service
  # systemctl stop avahi-daemon.socket avahi-daemon.service
  # systemctl mask avahi-daemon.socket avahi-daemon.service
  # systemctl stop cups
  # systemctl disable cups
  # systemctl disable cups-browsed
  # systemctl stop cups-browsed

Install guest additions. Turn shared clipboard on. Reboot the system.


## STAGE 2. SMATH ON DISCO
--------------------------

  sudo apt-get install mono-complete

Dances with a Bodhrán (танцы с бубном)

Download and run

  tar xf ../Downloads/SMathStudioDesktop.0_99_7030.Mono.tar.gz
  ./smathstudio_desktop_mono

Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme

  sudo apt-get install libgtk2.0-0

Gtk-Message: 18:34:11.622: Failed to load module "canberra-gtk-module"

  sudo apt-get install libcanberra-gtk-module

Still hangs (just slow down the boot process, possibly developed on weak CPU).

  mono --verbose ./SMathStudio_Desktop.exe

  Tools +> Options:

    Interface language  English
    Units language      English
    Functions style     World
    Decimal symbol      . (period)
    Arguments separator , (comma)
    Font size           14          <<<<<<<<<<
    Text color          Auto
    Background color    Auto
    Document layout     Pages view

OK. Now exit from File -> Exit , then start normally:

  ./smathstudio_desktop_mono


# STAGE 3. WORDPRESS ON UBUNTU DISCO
------------------------------------

1. Stop and disable NetworkManager, systemd-resolved .

  systemctl stop network-manager.service
  systemctl disable network-manager.service
  systemctl stop systemd-resolved.service
  systemctl disable systemd-resolved.service
  rm -f /etc/resolv.conf
  touch /etc/resolv.conf
  cat /etc/resolv.conf
  nameserver 192.168.1.1

2. Switch to fixed ip on enp0s3.

  auto lo
  iface lo inet loopback

  allow-hotplug enp0s3
  iface enp0s3 inet static
          address 10.0.2.100
          netmask 255.255.255.0
          gateway 10.0.2.2
          dns-nameserver 192.168.1.1

  allow-hotplug enp0s8
  iface enp0s8 inet static
          address 10.0.10.1
          netmask 255.255.255.0
          gateway 10.0.10.1

Note: To answer the question 'what is my gateway on enp0s3?':

  # ip r
  default via 10.0.2.2 dev enp0s3 onlink
  10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.100
  10.0.10.0/24 dev enp0s8 proto kernel scope link src 10.0.10.1
  ..

3. Build Gateway as in Debian document, but:

  cat /etc/hosts | grep ufo

  10.0.10.1       ufo.mars

Install dnsmasq, append to /etc/dnsmasq.conf

  address=/ufo.mars/10.0.10.1
  interface=enp0s8
  dhcp-range=enp0S8,10.0.10.20,10.0.10.25,12h

Install script /etc/network/if-up.d/00-firewall. Make it executable.

  # cat /etc/network/if-up.d/00-firewall

  #!/bin/sh
  # Reload the iptables rules and activate forwarding

  set -e

  # Only run from ifup.
  if [ "$MODE" != start ]; then
          exit 0
  fi

  # delete all existing rules.
  iptables -Z             # zero counters
  iptables -F             # flush (delete) rules

  iptables -t mangle -F
  iptables -X             # delete all extra chains

  # If you want to clear the chains, then clear the chains:
  iptables --policy INPUT   ACCEPT;
  iptables --policy OUTPUT  ACCEPT;
  iptables --policy FORWARD ACCEPT;

  # Masquerade.
  iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE

  # Enable routing.
  echo 1 > /proc/sys/net/ipv4/ip_forward

  exit 0

4. install lamp with taskselect

5. add mysql database named wordpress, grant rights on wordpress to user php

  CREATE DATABASE wordpress;
  CREATE USER 'php'@'localhost' IDENTIFIED BY 'php';
  GRANT ALL PRIVILEGES ON wordpress.* TO 'php'@'localhost' IDENTIFIED BY 'php';
  FLUSH PRIVILEGES;

6. copy configuration generated by web-installer to /var/www/html/wp-config.php

7.  db        wordpress
    user      php
    password  php
    dbserver  localhost
    email     alien@ufo.mars
    prefix    wp_

8.  site      you may call me everything you want
    user
    password

Backing up

  apt clean
  dd if=/dev/zero of=biiig; rm biiig

On host

  PS D:\vm> md5sum Disco-J52.7z > Disco-J52.7z.md5sum
  PS D:\vm> dir .\Disco-J52.*

  Directory: D:\vm

  Mode                LastWriteTime         Length Name
  ----                -------------         ------ ----
  -a----         5/2/2019  12:39 AM     1717254258 Disco-J52.7z
  -a----         5/2/2019  12:39 AM             98 Disco-J52.7z.md5sum


# STAGE 4. PUPPET LINKS
-----------------------

Eesti keeles (2013)

  https://wiki.itcollege.ee/index.php
    /Puppet_paigaldamine_ja_seadistamine_Centos_%26_Ubuntu

Bionic -- Puppet 6:

  https://www.bogotobogo.com/DevOps/Puppet
    /Puppet6-Install-on-Ubuntu18.0.4.php

Bionic -- Stretch -- Puppet 5:

  https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos
    /how-to-install-puppet-on-ubuntu-16-04.html

Bionic:

  https://computingforgeeks.com
  /how-to-setup-puppet-master-and-agent-ubuntu-18-04-bionic-beaver/

Notes:

  https://www.edureka.co/community/33695
  /resources-guide-setting-puppet-master-ubuntu-slave-windows

Are there any pre-requisites while installing puppet on Ubuntu?

How do I install puppet on Ubuntu? A little help would be useful. Thank you

There are three main things to keep in mind before you start installing puppet on ubuntu:

    Configure your forward and reverse DNS.
    Each server should have a unique hostname
    The Puppet master must be reachable on port 8140.

# LINKS

  1. https://askubuntu.com/questions/157154
    /how-do-i-include-lines-in-resolv-conf-that-wont-get-lost-on-reboot


# DRAFT

  root@UBOX:/var/www/html# netstat -tulpn
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 0.0.0.0:8084            0.0.0.0:*               LISTEN      560/mono
  tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      593/dnsmasq
  tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      625/mysqld
  tcp6       0      0 :::80                   :::*                    LISTEN      627/apache2
  tcp6       0      0 :::53                   :::*                    LISTEN      593/dnsmasq
  udp        0      0 0.0.0.0:53              0.0.0.0:*                           593/dnsmasq
  udp        0      0 0.0.0.0:67              0.0.0.0:*                           593/dnsmasq
  udp6       0      0 :::53                   :::*                                593/dnsmasq
  root@UBOX:/var/www/html# service --status-all | grep '+'
   [ + ]  acpid
   [ + ]  apache2
   [ + ]  apparmor
   [ + ]  apport
   [ + ]  binfmt-support
   [ + ]  cron
   [ + ]  dbus
   [ + ]  dnsmasq
   [ + ]  gdm3
   [ + ]  grub-common
   [ + ]  kerneloops
   [ + ]  kmod
   [ + ]  mono-xsp4
   [ + ]  mysql
   [ + ]  networking
   [ + ]  openvpn
   [ + ]  procps
   [ + ]  rsyslog
   [ + ]  udev
   [ + ]  ufw
   [ + ]  whoopsie
